With PVM you will need additional libraries and parameters to compile the C code. To make the live easier for you it is better to use a shell script, which includes all the needed parameters. For that reason you should create a new file in your pvm_directory called "pcc".
Add the following rows into this file:
#!/bin/sh
#script to compile all C-progs in the subdirs
if [ $1 ]
then
echo "start compiling"
hcc $1.c -o $1 -L/usr/lib/pvm3/lib/LINUX -lpvm3 -lgpvm3
echo "done"
else
echo "Parameter (filename without ending .c) missing."
fi
Save the file and make it executable with chmod: "chmod u+x pcc"
Now you can compile your code just with a simple command "pcc program_name"
PVM daemon
Before you can try to test your program you need to start the pvm daemon. For this you should open a second shell and run the following commands:
pvm /etc/bhosts
pvm is a stand alone PVM task which allows the user to interactively query and modify the virtual machine. The console can be started and stopped multiple times on any of the hosts in the virtual machine without affecting PVM or any applications that may be running.
Here are some importend commands:
Do not forget to stop the PVM daemon after you finished your work.
examples
Here is the hello sample to make some first test's (please change in the hello.c file the path to hello_other.c to your own directory): hello.c hello_other.c
To see the difference between SPMD and Master/Slave look here: examples