.\" $Id: pvm_config.3,v 1.1 1996/09/23 22:01:08 pvmsrc Exp $ .TH CONFIG 3PVM "31 August, 1994" "" "PVM Version 3.4" .SH NAME pvm_config \- Returns information about the present virtual machine configuration. .SH SYNOPSIS .nf .ft B C int info = pvm_config( int *nhost, int *narch, struct pvmhostinfo **hostp ) .br struct pvmhostinfo { .br int hi_tid; .br char *hi_name; .br char *hi_arch; .br int hi_speed; .br }; .br Fortran call pvmfconfig( nhost, narch, dtid, name, arch, speed, info ) .fi .SH PARAMETERS .IP nhost 0.8i Integer returning the number of hosts (pvmds) in the virtual machine. .br .IP narch Integer returning the number of different data formats being used. .br .IP hostp Returns pointer to an array of structures which contain information about each host including its pvmd task ID, name, architecture, and relative speed. .br .IP dtid Integer returning pvmd task ID for host .br .IP name Character string returning name of host .br .IP arch Character string returning architecture name of host .br .IP speed Integer returning relative speed of host. Default value is 1000. .br .IP info Integer status code returned by the routine. Values less than zero indicate an error. .SH DESCRIPTION The routine .I pvm_config returns information about the present virtual machine. The information returned is similar to that available from the console command .I conf. .PP 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 .I 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 complete cycle. The user can reset pvmfconfig() at any time by calling it with .I nhost = -1. If pvm_config is successful, .I info will be 0. If some error occurs then .I info will be < 0. .SH EXAMPLES .nf C: struct pvmhostinfo *hostp; int i, nhost, narch; info = pvm_config( &nhost, &narch, &hostp ); for (i = 0; i < nhost; i++) printf("%s\\n", hostp[i].hi_name); .sp Fortran: Do i=1, NHOST CALL PVMFCONFIG( NHOST,NARCH,DTID(i),HOST(i),ARCH(i),SPEED(i),INFO ) Enddo .fi .SH ERRORS The following error condition can be returned by .I pvm_config .IP PvmSysErr pvmd not responding. .PP .SH SEE ALSO pvm_tasks(3PVM)