Now we will learn how to compile and run PVM programs. To compile the program change to directory pvm/lib/archname where archname is architecture name of your computer. Then the subsequent command:
cc program.c -lpvm3 -o prgram
shall compile a program termed as program.c. After compiling we should put the executable file in directory pvm3/bin/ARCH. As well as we need to compile program separately for each architecture in virtual machine. In case we employ dynamic groups we must also add -lgpvm3 to compile command. Then the executable file is able to be run. To achieve this first run PVM. After PVM is running executable file can be run from UNIX command line as any other program.
PVM supplies an architecture-independent make and aimk which automatically concludes PVM_ARCH and links any OS (operating system) specific libraries to your application. To compile this C example type
% aimk master.c
Now from one window initialize PVM and configure some hosts. In other window alter directory to $HOME/pvm3/bin/PVM_ARCH in addition type
% master
It will ask for some tasks to be executed. Then specify number of tasks.