Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #33
Difficulty: Easy
In HTTPS, the letter 'S' stands for 'safe'.
True or False?
Linux & Unix Commands - Search Man Pages

pvm_config(3pvm) [debian man page]

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

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)

Check Out this Related Man Page

ADDHOSTS(3PVM)							  PVM Version 3.4						    ADDHOSTS(3PVM)

pvm_addhosts - Add hosts to the virtual machine. SYNOPSIS
C int info = pvm_addhosts( char **hosts, int nhost, int *infos ) Fortran call pvmfaddhost( host, info ) PARAMETERS
hosts An array of strings naming the hosts to be added. Pvmd must already be installed and the user must have an account on the speci- fied hosts. nhost Integer specifying the length of array hosts. infos Integer array of length nhost which returns the status for each host. Values less than zero indicate an error, while positive val- ues are TIDs of the new hosts. host Character string naming the host to be added. info Integer status code returned by the routine. Values less than nhost indicate partial failure, and values less than 1 indicate total failure. DESCRIPTION
The routine pvm_addhosts adds the computers named in hosts to the configuration of computers making up the virtual machine. The names should have the same syntax as lines of a pvmd hostfile (see man page for pvmd3): A hostname followed by options of the form xx=y. If pvm_addhosts is successful, info will be equal to nhost. Partial success is indicated by 0 < info < nhost, and total failure by info < 1. The array infos can be checked to determine which host caused the error. The Fortran routine pvmfaddhost adds a single host to the configuration with each call. info will be 1 if successful or < 0 if error. The status of hosts can be requested by the application using pvm_mstat and pvm_config. If a host fails it will be automatically deleted from the configuration. Using pvm_addhosts a replacement host can be added by the application, however it is the responsibility of the application developer to make his application tolerant of host failure. Another use of this feature would be to add more hosts as they become available, for example on a weekend, or if the application dynamically determines it could use more computational power. EXAMPLES
C: static char *hosts[] = { "sparky", "", }; info = pvm_addhosts( hosts, 2, infos ); Fortran: CALL PVMFADDHOST( 'azure', INFO ) ERRORS
The following error conditions can be returned by pvm_addhosts: PvmBadParam giving an invalid argument value. PvmAlready another task is currently adding hosts. PvmSysErr local pvmd is not responding. and in the infos vector: PvmBadParam bad hostname syntax. PvmNoHost no such host. PvmCantStart failed to start pvmd on host. PvmDupHost host already configured. PvmBadVersion pvmd protocol versions don't match. PvmOutOfRes PVM has run out of system resources. SEE ALSO
pvm_pvmd3(1PVM), pvm_delhosts(3PVM), pvm_start_pvmd(3PVM), pvm_config(3PVM), pvm_mstat(3PVM) 22 February, 1994 ADDHOSTS(3PVM)

Featured Tech Videos