CONFIG(3PVM)

πŸ“¦ version 3.4.6, in debian bookworm, ubuntu jammy

πŸ’– CONFIG β€” the pvm_config era πŸ’–

okay bestie, sit down, we're doing pvm_config(3PVM) from PVM Version 3.4 and it's literally the "who's in the group chat rn" function. It returns info about the present virtual machine configuration. no cap. πŸ¦‹


✨ NAME ✨

pvm_config β€” returns information about the present virtual machine configuration. that's it, that's the whole job, and she does it flawlessly πŸ’…


🌸 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 β€” an Integer that returns the number of hosts (pvmds) in the virtual machine. basically "how many besties are in here" 🌈
  • narch β€” an Integer that returns the number of different data formats being used. the diversity metric fr fr ✨
  • hostp β€” returns a pointer to an array of structures which contain information about each host including its pvmd task ID, name, architecture, and relative speed. it's giving full roster with receipts πŸ‘‘
  • 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. yes, one thousand, that's the baseline, iconic default behavior πŸ’―
  • info β€” Integer status code returned by the routine. Values less than zero indicate an error. 😭 (watch this one, she's the vibe check)

πŸ’œ 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. like, same energy, different delivery method, yk? 🧚

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. so C is the "drop the whole photo dump at once" friend and Fortran is the "one story at a time" friend, and both are valid πŸ’…

not me about to forget the memory rules: in C the hostp array is allocated and owned by libpvm. It is automatically freed or reused on the next call to pvm_config. so do NOT go freeing it yourself, she's not yours, she's libpvm's πŸ’€
and for the Fortran girlies: 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 nhost = -1. that's your little escape hatch, no cap πŸ”₯

If pvm_config is successful, info will be 0. If some error occurs then info will be < 0. zero is the slay, negative is the cry 😭


⭐ 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

see how we just loop through and print every host name? that's the whole vibe. lowkey the cutest little for-loop in the game πŸ₯Ή


πŸ™ˆ ERRORS πŸ™ˆ

The following error condition can be returned by pvm_config:

  • PvmSysErr β€” pvmd not responding. she's ghosting you bestie, the daemon left you on read πŸ’€

🌈 SEE ALSO 🌈

  • pvm_tasks(3PVM) β€” go read that one next, iykyk 🫢

and that's the whole page, mwah πŸ’– this was CONFIG(3PVM) from PVM Version 3.4, dated 31 August, 1994 β€” yes she's a 90s baby and she still ate, periodt. now go call pvm_config and find out who's actually in your virtual machine βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from