Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pvm_archcode(3pvm) [debian man page]

ARCHCODE(3PVM)							  PVM Version 3.4						    ARCHCODE(3PVM)

NAME
pvm_archcode - Returns the data representation code for a PVM architecture name. SYNOPSIS
C int cod = pvm_archcode( char *arch ) Fortran call pvmfarchcode( arch, cod ) PARAMETERS
arch Character string containing the architecture name. cod Integer returning architecture code. DESCRIPTION
The routine pvm_archcode returns an integer given an architecture name. The code returned identifies machines with compatible binary data formats. For example, SUN4 and RS6K have the same code, while ALPHA has a different one (because a few datatypes have different sizes). This lets you know when you can get away with using PvmDataRaw instead of PvmDataDefault encoding to pass messages between tasks on two machines. Naturally, you shouldn't assume the values returned by pvm_archcode are etched in stone; the numbers have no intrinsic meaning except that if two different arch names map to the same value then they're compatible. This routine is actually obsolete in the sense that the architecture codes returned are already available in the hi_dsig field of the pvmhostinfo structure returned by pvm_config(), as shown in the below example. The routine is maintained for backwards compatibility only. EXAMPLES
C: struct pvmhostinfo *hip; int i; pvm_config((int *)0, (int *)0, &hip); i = pvm_archcode(hip[0].hi_arch); /* or you could just do: i = hip[0].hi_dsig; */ Fortran: CALL PVMFARCHCODE( 'RS6K', k ) ERRORS
On success, pvm_archcode returns a positive integer data signature. The following error conditions can be returned as well: PvmBadParam giving an invalid architecture name. PvmNotFound there is no host with the given architecture name in the current virtual machine configuration. PvmSysErr pvmd not responding. SEE ALSO
pvm_config(3PVM), pvm_initsend(3PVM), pvm_notify(3PVM), pvm_tasks(3PVM), pvm_tidtohost(3PVM) 15 March, 1994 ARCHCODE(3PVM)

Check Out this Related Man Page

CONFIG(3PVM)							  PVM Version 3.4						      CONFIG(3PVM)

NAME
pvm_config - Returns information about the present virtual machine configuration. SYNOPSIS
C int info = pvm_config( int *nhost, int *narch, struct pvmhostinfo **hostp ) struct pvmhostinfo { int hi_tid; char *hi_name; char *hi_arch; int hi_speed; }; Fortran call pvmfconfig( nhost, narch, dtid, name, arch, speed, info ) PARAMETERS
nhost Integer returning the number of hosts (pvmds) in the virtual machine. narch Integer returning the number of different data formats being used. hostp Returns pointer to an array of structures which contain information about each host including its pvmd task ID, name, architecture, and relative speed. dtid Integer returning pvmd task ID for host name Character string returning name of host arch Character string returning architecture name of host speed Integer returning relative speed of host. Default value is 1000. info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
The routine pvm_config returns information about the present virtual machine. The information returned is similar to that available from the console command conf. The C function returns information about the entire virtual machine in one call. The Fortran function returns information about one host per call and cycles through all the hosts. Thus, if pvmfconfig is called nhost times, the entire virtual machine will be represented. Note that in C the hostp array is allocated and owned by libpvm. It is automatically freed or reused on the next call to pvm_config. Note that in Fortran the reported value of nhost and the host configuration do not change until the function resets at the end of a com- plete cycle. The user can reset pvmfconfig() at any time by calling it with nhost = -1. If pvm_config is successful, info will be 0. If some error occurs then info will be < 0. EXAMPLES
C: struct pvmhostinfo *hostp; int i, nhost, narch; info = pvm_config( &nhost, &narch, &hostp ); for (i = 0; i < nhost; i++) printf("%s ", hostp[i].hi_name); Fortran: Do i=1, NHOST CALL PVMFCONFIG( NHOST,NARCH,DTID(i),HOST(i),ARCH(i),SPEED(i),INFO ) Enddo ERRORS
The following error condition can be returned by pvm_config PvmSysErr pvmd not responding. SEE ALSO
pvm_tasks(3PVM) 31 August, 1994 CONFIG(3PVM)
Man Page