PACK(3PVM) PVM Version 3.4 PACK(3PVM)
NAME
pvm_pack - Pack the active message buffer with arrays of prescribed data type.
SYNOPSIS
C
int info = pvm_packf( const char *fmt, ... )
int info = pvm_pkbyte( char *xp, int nitem, int stride )
int info = pvm_pkcplx( float *cp, int nitem, int stride )
int info = pvm_pkdcplx( double *zp, int nitem, int stride )
int info = pvm_pkdouble( double *dp, int nitem, int stride )
int info = pvm_pkfloat( float *fp, int nitem, int stride )
int info = pvm_pkint( int *ip, int nitem, int stride )
int info = pvm_pkuint( unsigned int *ip, int nitem, int stride )
int info = pvm_pkushort( unsigned short *ip, int nitem, int stride )
int info = pvm_pkulong( unsigned long *ip, int nitem, int stride )
int info = pvm_pklong( long *ip, int nitem, int stride )
int info = pvm_pkshort( short *jp, int nitem, int stride )
int info = pvm_pkstr( char *sp )
Fortran
call pvmfpack( what, xp, nitem, stride, info )
PARAMETERS
fmt Printf-like format expression specifying what to pack. (See discussion).
nitem The total number of items to be packed (not the number of bytes).
stride The stride to be used when packing the items. For example, if stride = 2 in pvm_pkcplx, then every other complex number will be
packed.
xp Pointer to the beginning of a block of bytes. Can be any data type, but must match the corresponding unpack data type.
cp Complex array at least nitem*stride items long.
zp Double precision complex array at least nitem*stride items long.
dp Double precision real array at least nitem*stride items long.
fp Real array at least nitem*stride items long.
ip Integer array at least nitem*stride items long.
jp Integer*2 array at least nitem*stride items long.
sp Pointer to a null terminated character string.
what Integer specifying the type of data being packed.
what options
STRING 0 REAL4 4
BYTE1 1 COMPLEX8 5
INTEGER2 2 REAL8 6
INTEGER4 3 COMPLEX16 7
info Integer status code returned by the routine. Values less than zero indicate an error.
DESCRIPTION
Each of the pvm_pk* routines packs an array of the given data type into the active send buffer. The arguments for each of the routines are
a pointer to the first item to be packed, nitem which is the total number of items to pack from this array, and stride which is the stride
to use when packing.
An exception is pvm_pkstr() which by definition packs a NULL terminated character string and thus does not need nitem or stride arguments.
The Fortran routine pvmfpack( STRING, ... ) expects nitem to be the number of characters in the string and stride to be 1.
A null string ("") can be packed; this is just a string with no characters before the terminating '