|
|
DOWNLOAD | |
www.netlib.org/pvm3/index.html | www.mpi.nd.edu/lam/download/ |
GENERAL | |
PVM comes with 2 main parts:
libfpvm3.a: Library for Fortran language. libgpvm3.a: Library for dynamic groups management |
MPI comes with 3 main parts:
libmpi.a : Require for every program in C/ Fortran libargs.a, libt.a, libtrillium.a, libtstdio.a for additional options. hcc: compiler for C program hcp: compiler for C++ hf77: compiler for Fortran |
ACCESS TO PVM & MPI FROM SUN LAB. | |
#### This is rhosts file, each host on 1 line lapis.rocks.uhcl.edu jasper catseye.rocks aragonite Download sample of rhosts file here.
############################### # SETTING FOR PVM AND XPVM # setenv PVM_ROOT /faculty/shihproj/pvm3 setenv PVM_ARCH SUN4SOL2 setenv PVM_DPATH $PVM_ROOT/lib/pvmd setenv CC gcc Download sample of .cshrc here. |
#### This is the contain of my_host_file file lapis.rocks.uhcl.edu jasper catseye.rocks localhost Download sample of myhost_file file here.
############################### # SETTING FOR MPI # setenv LAMHOME /faculty/shihproj/lam61 Download sample of .cshrc here. |
STARTING | |
Start PVM: run command "pvm rhosts" or "pvmd rhosts" (users can specify a difference file name for rhosts and run "pvm myfile") When command prompt pvm> displayed, user can add/delete hosts, view tasks, run program ... Type help for list of command. Type quit to go back to unix shell prompt (PVM still running) Type halt to exit PVM. |
Start MPI: (LAM version 6.X) run command When MPI is done, it displays a message "Topology done" and you can run your program. |
COMPILING AND RUNNING | |
PVM provides a script file called aimk to compile a master
and slave program in C or Fortran, but aimk is not a convenience
tool to use. We can use standard compiler in UNIX to do that.
For C program: For C++: To use with Dynamic Groups, also need libgpvm3.a added before libpvm3.a: % gcc (or c++) -o myprog myprog.c -I$PVM_ROOT/include
Note:
After compiling program, we can run it by typing program name at shell prompt or by spawn command from pvm prompt pvm>
|
For C program: For C++: For Fortran: To run program: use mpirun
prompt%> mpirun -c 4 my_program
Note:
|
PVM & MPI LINKS | |
PVM Tutorial PVM User Reference (PostScript) |
MPI User Reference (PostScript) |