Compute Canada

How do I compile my PVM code?

Please note: The FAQ pages at the HPCVL website are continuously being revised. Some pages might pertain to an older configuration of the system. Please let us know if you encounter problems or inaccuracies, and we will correct the entries.

Your PVM applications must contain the header files that defines all the functions and constants used by the PVM. Programs written in C should include header file pvm3.h, as follows

#include

The Fortran programs should include header file fpvm3.h as follows

#INCLUDE 'fpvm3.h'

- In order to create your PVM executables, you must compile and link them with th appropriate libraries. For example the command

cc/f77/CC [compiler flags] [source files] [loader flags] -L$PVM_ROOT/lib/$PVM_ARCH -I$PVM_ROOT/include -lfpvm3 -lgpvm3 -lpvm3 [libraries needed by PVM] [other libraries]

will compile your program and link it to all needed libraries and include files.

The -lpmv3 is always required in the compile command,

the -lfpvm3 flag is required only in case you are using Fortran,

the -lgpvm3 flag is required only in case you are using dynamic groups.

- A more portable and efficient way to compile your programs is the use of the aimk makefile utility that come with PVM, it is a wrapper program for the UNIX make that determines the PVM machine architecture and sets the ARCHLIB to the necessary system libraries. To keep a portable environment for your PVM applications you can create your own portable aimk makefile called Makefile.aimk and use it to build and compile your codes.