OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

Foam::PstreamGlobals Namespace Reference

Global functions and variables for working with parallel streams, but principally for gamma/mpi. More...


Functions

void gammaWait (const label procNo)
 Block wait for message on port procNo.
label copyReceive (const label procNo, char *buf, const label bufSize)
 Helper routine to copy out newly received data.
label getSizeFromHeader (const char *buf, const label len)
 Helper routine to check if a message is a resize message.
void setResizeMessage (const label len)
 Change the resize message to contain the new length.
label getMaxBufSize (const int procNo)
 Get max size of all receive buffers to procNo.

Variables

FixedList< List< List< char > >, 4 > recvBuf
 Receive buffers.
FixedList< labelList, 4 > recvBufLen
 Length of receive buffers.
labelList recvIndex
 Currently active buffer in receiving.
labelList consumeIndex
 Receive buffer that has to be consumed.
const int resizeMessageLen = 6
 Special message to signal resizing.
uint64_t resizeMessage []
const int initialBufferLen = 2*resizeMessageLen*sizeof(uint64_t)
 Initial buffer length. Should be able to contain the message comfortably.

Detailed Description

Global functions and variables for working with parallel streams, but principally for gamma/mpi.

Source files


Function Documentation

void gammaWait ( const label  procNo  ) 

Block wait for message on port procNo.

Definition at line 58 of file PstreamGlobals.C.

label copyReceive ( const label  procNo,
char *  buf,
const label  bufSize 
)

Helper routine to copy out newly received data.

Definition at line 90 of file PstreamGlobals.C.

label getSizeFromHeader ( const char *  buf,
const label  len 
)

Helper routine to check if a message is a resize message.

Returns -1 if not or the new size.

Definition at line 154 of file PstreamGlobals.C.

Referenced by Foam::handler().

Here is the caller graph for this function:

void setResizeMessage ( const label  len  ) 

Change the resize message to contain the new length.

Definition at line 176 of file PstreamGlobals.C.

label getMaxBufSize ( const int  procNo  ) 

Get max size of all receive buffers to procNo.

Definition at line 182 of file PstreamGlobals.C.

Referenced by Foam::handler().

Here is the caller graph for this function:


Variable Documentation

FixedList< List< List< char > >, 4 > recvBuf

Receive buffers.

Definition at line 36 of file PstreamGlobals.C.

Referenced by Foam::handler().

Length of receive buffers.

Definition at line 39 of file PstreamGlobals.C.

Referenced by Foam::handler().

Currently active buffer in receiving.

Definition at line 41 of file PstreamGlobals.C.

Referenced by Foam::handler().

Receive buffer that has to be consumed.

Definition at line 42 of file PstreamGlobals.C.

Referenced by Foam::handler().

const int resizeMessageLen = 6

Special message to signal resizing.

Definition at line 75 of file PstreamGlobals.H.

uint64_t resizeMessage

Initial value:

{
    0x7ff7ffffffffffABllu,
    0x7ff7ffffffffffCDllu,
    0x7ff7ffffffffff12llu,
    0x7ff7ffffffffff30llu,
    0x7ff7ffffffffff19llu,
    0x0000000000000000llu       
}

Definition at line 46 of file PstreamGlobals.C.

const int initialBufferLen = 2*resizeMessageLen*sizeof(uint64_t)

Initial buffer length. Should be able to contain the message comfortably.

Definition at line 78 of file PstreamGlobals.H.

Referenced by Foam::handler().

Copyright © 2000-2009 OpenCFD Ltd