SHPALLOC(3F)SHPALLOC(3F)NAME
SHPALLOC - Allocates a block of memory from the symmetric heap
SYNOPSIS
POINTER (addr, A(1))
INTEGER (length, errcode, abort)
CALL SHPALLOC(addr, length, errcode, abort)
DESCRIPTION
SHPALLOC allocates a block of memory from the program's symmetric heap
that is greater than or equal to the size requested. To maintain
symmetric heap consistency, all PEs in an program must call SHPALLOC
with the same value of length; if any processing elements (PEs) are
missing, the program will hang.
The SHPALLOC function accepts the following arguments:
Argument Description
addr First word address of the allocated block (output).
length Number of words of memory requested (input). One word
is 32 bits.
errcode Error code is 0 if no error was detected; otherwise, it
is a negative integer code for the type of error
(output).
abort Abort code; nonzero requests abort on error; 0 requests
an error code (input).
By using the Fortran POINTER mechanism in the following manner, you
can use array A to refer to the block allocated by SHPALLOC:
POINTER (addr, A(1))
NOTES
The total size of the symmetric heap is determined at job startup.
One can adjust the size of the heap using the SMA_SYMMETRIC_SIZE
environment variable. See the intro_shmem(3) man page for futher
details.
RETURN VALUES
Error conditions are as follows:
Error Code Condition
-1 Length is not an integer greater than 0.
-2 No more memory is available from the system (checked if
the request cannot be satisfied from the available
blocks on the symmetric heap).
SEE ALSOintro_shmem(3), shmalloc(3F), shpclmove(3F), shpdeallc(3F)