Running C, C++, and MPI Programs on the Cray SV1

  1. ssh cray

  2. enter the password - "a" + student number

  3. To copy the necessary files from your regular account use ftp:

  4. Compile your program:

  5. Run mpi:
  6. Editing your files - Use emacs or vi, otherwise edit on your workstation

  7. To Run C/C++ on the Cray SV1:
    1. cc -o filename filename.c -O 3
    2. The "-O 3" above optimizes the C compiler
    3. C++: CC -o filename filename.c -O 3
    4. running the program: filename (this runs the executable)

  8. To compile and run an MPI program: (only C or Fortran MPI programs will work)
    1. compile your MPI program: cc -o myprog myprog.c
      This creates an output, executable file called "myprog"
    2. Run your MPI program: mpirun -np 5 myprog
      This runs myprog with 5 processes

  9. Put these results on your portfolio webpage: