VMMCRE(3) VERSION 1.0 VMMCRE(3)
NAME
VMMCRE - create or modify a variable for VMM.
USAGE
key = vmmcre(varname,lslice,nslice,attrib)
integer vmmcre
integer key, lslice, nslice
character*8 varname
character*40 attrib
DESCRIPTION
VMMCRE is an integer function used to create variables for use with
the VMM (Virtual Memory Management) package. VMMCRE may also be used to modify
some of the attributes given to a variable. Upon successful completion, VMMCRE
returns a key pointing at the first of the nslices of the variable created.
In order to access subsequent slices, the user must add to the value of key,
the number of the slice desired: For example, key+2 points to the second
slice while key+3 points to the third slice. Both key and key+1 point to the
first slice.
ARGUMENTS
varname -(input) user defined name used to identify a variable.
lslice -(input) dimensions of each piece of the variable. For
example, lslice could be the dimensions ni*nj of a grid
at a given level. lslice is given in words.
nslice -(input) number of pieces of size lslice. For instance,
the number of levels.
attrib -(input) user defined list of attributes associated with
the variable. Valid attributes are:
SAVE= ,CL= ,W= ,MUSTEXIST,SIZE= ,INIT=
SAVE=Y/N when this attribute is set to the value Y, the
variable will be written to disk before being
ejected from memory by the VMM package.
Default value is N.
CL=n this attribute is used to categorize variables
according to their use. Values from 1 to 9 are
allowed. The value given to CLASS is used to
determine to which of the VMM data files a
variable will be saved. Default value is 1.
W=n this attribute serves to quantify the usage
intensity of a variable. The more intensely
used variables should be given higher WEIGHT
values than less frequently used variables.
Variables are expelled from memory in order of
increasing WEIGHT when additional memory is
required for loading a variable. Valid WEIGHT
values range from 0 to 9. Default value is 0.
SIZE=n this attribute is used to indicate whether a
variable is of type REAL*4 or REAL*8. When
SIZE is set to a value other than 8, the
variable will be of type REAL*4.
SIZE=0: REAL*4 [default]
SIZE=8: REAL*8
It goes without saying that this attribute has
no effect when compiling in 64 bit mode.
MUSTEXIST the presence of this attribute indicates to
the VMM package that the variable must already
exist during a restart (i.e. the variable
was saved to disk at the end of the previous
execution). During restart, the absence of a
variable with the MUSTEXIST attribute will
result in the premature end of execution of
the program.
INIT=n this attribute indicates to which value each
slice of a variable must be initialized when
loaded for the first time or after a call to
VMMFGT . Legal values are 0, R and -.
INIT=0 : initialize the field to zero.
INIT=R : initialize the field to the
machine's biggest floating point
value.
INIT=- : no initialization is performed
By default, no initialization is done.
NOTE: When VMMCRE is used to modify an already
existing variable, only the following
attributes may be changed: SAVE, INIT, CL and
W.
EXAMPLE
key1= vmmcre('VAR_1',ni1*nj1*nk1,1,'CLASS=1,WEIGHT=9,MUSTEXIST,SAVE=Y')
key2= vmmcre('VAR_2',ni2*nj2,nk2,'CLASS=3,WEIGHT=5,INIT=R,SAVE=Y')
AUTHORS
J.Caveen, M. Lepine, M.Roch - RPN
NOTES
You will notice from the first example above, that it is possible to
define a variable having one (or more) three dimensional slice(s). In fact,
this should be done whenever there is no real need to break a variable into
smaller multiple slices since bigger slices are handled more efficiently by
VMM.
Errors that will cause a premature end of program execution:
-no previous call to VMMALLC
-password is set (System is locked)
-variable must exist when in restart mode
Latest revision, November 1993
See also vmmallc(3), vmmatt(3),vmmcpk(3),vmmdbg(3), vmmdmp(3),
vmm_example(1), vmmfgt(3), vmmget(3), vmmhpa(3), vmmhpd(3), vmmint(3),
vmmintro(1), vmmcks(3), vmmlck(3), vmmlod(3), vmmpwd(3), vmmrls(3), vmmsav(3),
vmmuld(3), vmmulk(3), vmmuln(3).