Go To Top Go Up Go Back Go Forward

FMSILG
FMSRLG
FMSCLG

PURPOSE: Get Local Memory

To allocate local memory on all the processors.

SYNOPSIS

CALL FMSILG (IMD, LOC, LEN)
CALL FMSRLG (RMD, LOC, LEN)
CALL FMSCLG (CMD, LOC, LEN)

INPUT PARAMETERS:

OUTPUT PARAMETERS:

FMS PARAMETERS:

The following FMS Parameters are especially important to this routine:

Parameter Description
MAXMD Amount of memory to use
MAXCPU The number of processors on which memory is allocated.
NUMAFL Use NUMA directive
MDINIT How memory is initialized
MDWHEN When memory is allocated.
MDUSED Amount of memory already used
SHOW Display reports

DESCRIPTION:

These subroutines provide your program with access to the FMS memory manager.

The first step is to declare an array in your program that you will use to reference the allocated memory. There are currently two mechanisms used to do this.

Once the reference arrays are established in your subroutine, you call FMSILG to allocate LEN integer words on each processor, starting at IMD(LOC) on processor 0 (Parent). Similarly you may call FMSRMG to allocate LEN REAL*8 words starting at RMD(LOC), or FMSCMG to allocate LEN COMPLEX*16 words starting at CMD(LOC).

The value of LOC returned is relative to the array value you provide on the call. For example, if you make the call:

        CALL FMSIMG (IMD(10), LOC, LEN)
the allocated memory will start at IMD(10+LOC).

You may make the value of LOC be an actual subscript of the array by dimensioning the array to start at 0,

	INTEGER IMD (0:1)
Then when you call the memory allocation subroutine
	CALL FMSILG (IMD, LOC, LEN)
the allocated memory will start at IMD(LOC).

Examples

As an example, to allocate a vector for each processor X(NUMEQ) call FMSRLG as follows:
	LEN = NUMEQ
	CALL FMSRLG (RMD, LCPU1, LEN)
For processor N (where N=0 is the parent) the allocated memory is addressed as
	L = LCPU1 + LEN*(N-1)
	X(I) = RMD(L-1+I)

The memory will be local to processor N.

These routines are similar to FMSIMG, FMSRMG, and FMSCMG with the following differences:

  1. LEN is rounded up to be page length,
  2. LEN words are allocated on each processor,
  3. The allocated memory is placed locally next to the processor

Go To Top Go Up Go Back Go Forward
Copyright © Multipath Corporation