integer function fsmini (contextid, flags) |
The FSM initialization routine attaches a Fortran process or thread
to an
existing
shared memory context. These are created with the ESM create function
or
command. It also set flags that control the operation of
FSM. The flags are specified by adding one or more of the
following constants (at most once each):
The specified context ID becomes the current context. All other FSM functions operate within this context. A process can switch contexts by calling FSMINI again. Subsequent calls operate in the new context, but in the previous context are still valid. Use ESM (from C) to create and delete contexts.
Must be called exactly once for every thread (or process if threads
are not being used) before calling all other FSM routines.
Returns one (FSM_OK) if successful or zero (FSM_ERROR) if an error occurred.
integer function makptr (key, type, length) |
The make pointer function allocates a new pointer, or returns the
pointer
associated with an existing key. If the key already exists, it
must have been made with the same type and length in a previous call,
otherwise an error occurs. MAKPTR
return the pointer of the new or existing key, or zero (FSM_ERROR) if an error occurred.
integer function getptr (key) |
The get pointer function returns the pointer associated with the
specified
key, or zero (FSM_ERROR)
if the key does not exist (or an error occurred).
integer function relptr (key) |
The release pointer function frees the memory associated with the
key, and removes the key from the key table. It returns the newly
invalid pointer upon success, or zero (FSM_ERROR) if the key does not
exist or an error occurred.
integer function prtkey |
The print key routine writes to Fortran unit 5 (standard output) a human-readable listing of the current key table associated with the current context. Useful for debugging. See also ESM_ListContexts and ESM_ListRegions. Always returns zero.
integer function fsmerr (string) |
Write a description of the most recent FSM error message into the specified string. Useful for when FSM_SILENT is on. Always returns zero.
integer function fsmtrf (filename) |
If the FSM_TRACE flag
is set during initialization, a trace of every operation is written to
standard output. The FSMTRF
function can be used to specify an alternative file. Each thread
that uses FSM can have its own trace file. Returns FSM_OK upon success or FSM_ERROR if the file could not
be created or appended to.