CONFIG(3PVM)
π CONFIG(3PVM) π
okay bestie, welcome to the pvm_config page from the PVM Version 3.4 manual β yes, the whole manual is literally called 3PVM, cute right? this is the little function that tells you everything about your current virtual machine, no cap. π¦
β¨ NAME β¨
pvm_config β returns information about the present virtual machine configuration. it's giving "let me tell you about the whole squad" energy. π
πΈ 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 )
see how C gets the whole struct and Fortran gets a little snack of arguments? yeah. that's the vibe. π«Ά
π PARAMETERS π
nhostβ an Integer that hands back the number of hosts (pvmds) chilling in the virtual machine. it's the headcount bestie.narchβ an Integer that hands back how many different data formats are being used. multiple architectures? we contain multitudes. πhostpβ returns a pointer to an array of structures, and each structure has the tea on one host: its pvmd task ID, its name, its architecture, and its relative speed.dtidβ an Integer returning the pvmd task ID for the host.nameβ a Character string returning the name of the host.archβ a Character string returning the architecture name of the host.speedβ an Integer returning the relative speed of the host. the default value is1000. not a benchmark, just a vibe rating. βinfoβ the Integer status code the routine hands back. anything less than zero means something went wrong, and we do NOT love that. π
π DESCRIPTION π
the routine pvm_config returns information about the present virtual machine. the info you get back is similar to what the console command conf gives you β same energy, different delivery method. β¨
here's the split, and it matters:
- the C function returns information about the entire virtual machine in one call. one and done, iconic.
- the Fortran function returns information about one host per call and cycles through all the hosts. so if
pvmfconfigis callednhosttimes, the entire virtual machine will be represented. it's a little tour, host by host. πΆβοΈ
Note that in C thehostparray is allocated and owned bylibpvm. It is automatically freed or reused on the next call topvm_config. so do NOT go freeing it yourself bestie, that's not your business, that's libpvm's business. π
Note that in Fortran the reported value ofnhostand the host configuration do not change until the function resets at the end of a complete cycle. The user can resetpvmfconfig()at any time by calling it withnhost = -1. that's your little reset button, use it when you need a fresh start. π§
if pvm_config is successful, info will be 0. if some error occurs then info will be < 0. simple as that. π
π₯ EXAMPLES π₯
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);
Fortran:
Do i=1, NHOST
CALL PVMFCONFIG( NHOST,NARCH,DTID(i),HOST(i),ARCH(i),SPEED(i),INFO )
Enddo
look at us looping through the hosts and printing their names. we ate. π
π ERRORS π
the following error condition can be returned by pvm_config:
PvmSysErrβ pvmd not responding. π yeah that one hurts. your pvmd ghosted you.
π SEE ALSO π
pvm_tasks(3PVM) β go read that one next bestie, it's the sibling page.
and that's the whole page!! slay π this was from PVM Version 3.4, dated 31 August, 1994 β yeah she's vintage, she's a classic, she's still serving. periodt. πβ¨π¦
π¦ where this page comes from
- debian bookworm: pvm-dev 3.4.6-5
- ubuntu jammy: pvm-dev 3.4.6-3.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms