Running MPI and PVM Programs on the Cray SV1
- Things that are DIFFERENT on the Cray:
- The UPARROW and TAB shorthand keys do not work,
you have to type in the entire command line each time
(or you can highlight and copy previous lines)
- Right now, the ONLY editor is VI, so ask for help in using vi,
or edit your programs on our regular network, then copy over to the
Cray
(also, Matt Hanson is working on a way to use Emacs on the Cray)
- The compiling script pvmc won't work: "gcc $1.c -o $1 -lpvm3",
instead, use the process listed below for running a PVM program
- Log on to the SV1
- For now, we will all share the same user account: "suprcomp" (no 'e')
- ssh -l suprcomp seymour.tjhsst.edu (or "seymour" for short)
- enter the password
- Make a directory for your programs:
mkdir myusername
cd myusername
check the current directory path: use "pwd" (print working directory)
The path should be: /usr/home/suprcomp/yourusername/
- copy the necessary files from your regular account:
cp /usr/cronos/yourusername/file file
You can use a period for the new file name:
cp /usr/cronos/yourusername/file .
- To run an MPI program: (We think only C or Fortran MPI programs will work,
sorry no C++, but we'll check on this)
- compile your MPI program: cc -o myprog myprog.c
This creates an output, executable file called "myprog"
- Run your MPI program: mpirun -np 5 myprog
This runs myprog with 5 processes
- To run a PVM program:
- Note, the compiling script pvmc won't work:
"gcc $1.c -o $1 -lpvm3",
instead, use the process listed here
- Open two x-terms that are logged onto the Cray
- Run pvm: Enter "pvm" at the prompt
- In the other x-term, compile the master and slave programs:
cc -o mastername mastername.c
cc -o slavename slavename.c
- IMPORTANT CHANGES YOU MAY HAVE TO MAKE:
- The path to pvm3.h should be: #include <pvm3.h>
- The "slavename" needs the entire path:
#define SLAVENAME "/usr/home/suprcomp/slavename"
- Run the pvm master program: ./mastername
- HALT pvm: pvm>halt
- For credit, put these results on your portfolio webpage:
- Include a description what you've done, which program(s)
- Screenshot(s) of your output of running programs on the Cray
- Links to code that you ran on the Cray (try to save a copy as "txt"
-
this makes it easier to load and view in a browser)