This connects all the processes together and initializes the environment. Should be the first executable statement in the parallel program.
Terminates parallel execution. Must be called before exit by all processes.
This tidies up any shared resources and notifies the load balancing server that it has completed. PEND does return but only to allow you to exit normally. It is important that the FORTRAN runtime environment be allowed to tidy up after itself. Calling PBEGINF or PEND more than once per process is bound to produce some bizarre sort of screw up.
Returns number of processes.
Returns logical node no. of the current process (0,1,...,NNODES()-1).
Opens separate logfiles in the current directory for each process. The files are named log.<NODEID()>.
Print out summary of communication statistics for calling process.
Return wall time from an arbitrary origin in centi-seconds.
Return wall time from an arbitrary origin in seconds as accurately as possible.
INTEGER TYPE [input]
BYTE BUF(LENBUF) [input]
INTEGER LENBUF [input]
INTEGER NODE [input]
INTEGER SYNC [input]
Send a message of type TYPE to node NODE. LENBUF is the length of the message in bytes. BUF may be any type other than a FORTRAN CHARACTER variable or constant. SYNC indicates synchronous (1) or asynchronous (0) communication. If asynchronous communication is requested the buffer may not be modified until WAITCOM is called. This avoids having to waste valuable local memory taking a copy of the message. If a bit is set in the TYPE matching MSGDBL, MSGINT or MSGCHR then XDR is used if communication is over sockets.
Requests for asynchronous communication on UNIX machines where it is not supported are quietly ignored.
INTEGER TYPE [input]
BYTE BUF(LENBUF) [output]
INTEGER LENBUF [input]
INTEGER LENMES [output]
INTEGER NODESEL [input]
INTEGER NODEFROM [output]
INTEGER SYNC [input]
Receive a message of type TYPE from node NODESEL. LENBUF is the length of the receiving buffer in bytes. LENMES returns the length of the message received. An error results if the buffer is not large enough. NODEFROM returns the node from which the message was received. If the NODESEL is specified as -1 then the next node to send to this process is chosen. The selection of the 'next' process is guaranteed to be fair. The length of the buffer is checked and the type of the message must agree with that being received (there is only one channel between processes so messages are received in the order sent). BUF may be of any type other than CHARACTER. SYNC indicates synchronous (1) or asynchronous (0) communication. If a bit is set in the TYPE matching MSGDBL, MSGINT or MSGCHR then XDR is used if communication is over sockets.
Requests for asynchronous communication on UNIX machines where it is not supported are quietly ignored.
INTEGER TYPE [input]
INTEGER NODE [input]
Return 1/0 for TRUE/FALSE if a message of the given type is available from the given node. If node is specified as -1 then a message of the given type from any node will match (note that a wildcard probe is much more expensive than probing a specific node).
INTEGER TYPE [input]
BYTE BUF(LENBUF) [input/output]
INTEGER LENBUF [input]
INTEGER IFROM [input]
Broadcast from process IFROM to all other processes a message of type TYPE and length LENBUF. All processes call this routine which uses an optimized algorithm to distribute the data in O(log p) time. If a bit is set in the TYPE matching MSGDBL, MSGINT or MSGCHR then XDR is used if communication is over sockets. Note that LENBUF presently must have the correct value on the originating and receiving nodes. This call may be modified to include an extra parameter with the function of LENMES in the RCV() syntax.
INTEGER TYPE [input]
Synchronize all processes by exchanging messages of the given type in time O(log p). Internally might use messages with TYPE tag.
INTEGER ONOFF [input]
Switch debugging output on (ONOFF=1) or off (ONOFF=0). This output is useful to trace messages being passed and also to help debug the message passing software.
INTEGER MPROC [input]
This call simulates a simple shared counter by communicating with a dedicated server process. It returns the next counter associated with a single active loop (0,1,2,...). MPROC is the number of processes actively requesting values. After the end of the loop each process calls NXTVAL(-MPROC) which implements a barrier. It is used as follows:
next = nxtval(mproc)
do 10 i = 0,big
if (i .eq. next) then
... do work for iteration i
next = nxtval(mproc)
endif
enddo
Call with negative mproc to indicate end of loop ... processes c block here until mproc processes have registered completion.
On most UNIX machines (A.D. 1993) the cost is approx. 0.05s per call. On the DELTA and IPSC the cost is less than 0.0003s assuming no contention. Clearly the value from NXTVAL can be used to indicate that some locally determined no. of iterations should be done as the overhead of NXTVAL may be relatively large.
INTEGER CODE [input]
Call to request error termination .. it tries to zap all the other processes and generally tidy up. The value of code is printed out in the error message.
C programs should call ERROR_(char *message, long status).
INTEGER NODE [input]
Wait for all asynchronous communication with node NODE to be completed. NODE=-1 implies all nodes. Currently this is only applicable to the Intel MPPs where the actual value of NODE is ignored and -1 assumed.
INTEGER TYPE [input]
DOUBLE PRECISION X(N) [input/output]
CHARACTER*(*) OP [input]
Double Global OPeration. X(1:N) is a vector present on each process. DGOP 'sums' elements of X accross all nodes using the commutative operator OP. The result is broadcast to all nodes. Supported operations include '+', '*', 'max', 'min', 'absmax', 'absmin'. The use of lowerecase is presently necessary. XDR data translation is internally enabled.
INTEGER TYPE [input]
INTEGER X(N) [input/output]
CHARACTER*(*) OP [input]
Integer Global OPeration. The integer version of DGOP described above, also include the bitwise OR operation.
INTEGER N [input]
Returns the no. of bytes that N Fortran integers occupy.
INTEGER N [input]
Returns the no. of bytes that N DOUBLE PRECISIONs occupy.
INTEGER N [input]
Returns the minimum no. of DOUBLRE PRECSIONs numbers which representation in machine memory occupies as much storage as N INTEGERs.
INTEGER N [input]
Returns the minimum no. of INTEGER numbers which representation in machine memory occupies as much storage as N DOUBLE PRECISION numbers.
INTEGER TYPE [input]
INTEGER NODE0 [input]
CHARACTER*(*) FILENAME [input]
NODE0 has access to the unopened file with name in FILENAME the contents of which are to be copied to files known to all other processes using messages of type TYPE. All processes call PFCOPY() simultaneously, as for BRDCST(). Since processes may be working in the same directory it is advisable to have each process use a unique file name. The file is closed at the end of the operation.
If the data in the file is all of the same type (integer, double etc.) AND there is no additional record structure (such as that imposed by FORTRAN) TYPE should be set to reflect this so that data translation can occur between different machines (the blocking is set to accomodate this). machines (the blocking is set to accomodate this). Otherwise if binary transfer is not meaningful U'll have to write your own application specific routine.
INTEGER INCR [input]
Portable rapper around nice for FORTRAN users. See the local nice() system call man page for info. On the IPSC/DELTA this is a null operation and returns 0.
Enable/disable event logging. Each process logs events to the ASCII file 'events.<nodeid>' (with much buffering so for modest applications it is only dumped out at the end). This includes events such as process creation/termination, message passing etc. Event logging may be enabled just around critical sections of code. Applications may generate additional information with the following (FORTRAN) calls.
CHARACTER*(*) INFO
EVBGIN marks the beginning of an extended event (state?) by logging the message in INFO to the event file (along with a timestamp). EVEND marks the termination of a state similarly. These calls need not be paired for correct functioning, but are in the logical interpretation of the event file. EVENT logs the message INFO to the file with a timestamp.
PBEGINF(), if compiled with -DEVENTLOG opens the file 'events.<nodeid>' and PEND() dumps out event information and closes the file. Imbetween, event logging is disabled by default and must be enabled by the application.
JN/01.21.97