MCS 572 NPACI-SDSC Cray T3E MPI Fortran 90 & C Source Code Examples


(Also Modifications for using mpirun on the NPACI-SDSC Cray T90)


T3E MPI-C & MPI-F90 Source, Ouput, and Batch Job Script Examples:


T90 MPI Example using MPIRUN Execution:

  1. Tested on NPACI-SDSC T90 using the Pi calculation with modified source codes

    pi_mpi_t90.c
    AND
    pi_mpi_t90.f,

    which have been modified by changing the "real*8" datatype to "double precision" to make the datatypes between F90 and MPI consistent to avoid wordsize errors (F90 datatypes differ between T90 and T3D), and the T3E "fprintf" synchronization error has been fixed.

  2. Instructions assumed that source files are copied into dummy or generic names, e.g.,

    "cp pi_mpi_t90.c cpgm.c"
    OR
    "cp pi_mpi_t90.f fpgm.f".

  3. Compile by

    "cc -O3 -h scalar2 -h report=isvf -o cpgm cpgm.c &"
    OR
    "f90 -O3 -r3 -o fpgm fpgm.f &",

    noting that the malleable "-Xm" or "-X[n]" processor number compiler option is not supported on the T90.

  4. Execute on 4 processors by

    "mpirun -np 4 cpgm < cdata >& cpgm.output&"
    OR
    "mprun -np 4 fpgm < fdata >& fpgm.output&",

    noting that the processor number option is "-np [n]" using the "mpirun" command which works on both T90 and T3E, but is different from the "mpprun" command which only works on the T3E; for executing on a different number of processors, just change "[n]" to the actual number.

  5. For the data files used for the PI example codes were

    cdata
    OR
    fdata.

  6. For repeated compilations-executions, you need to remove output files to avoid protection overwrite errors:

    "rm cpgm cpgm.V cpgm.output"
    OR
    "rm fpgm fpgm.lst fpgm.output"

    or just repeated executions, you need just to remove the old output file:

    "rm cpgm.output"
    OR
    "rm fpgm.output"


Web Source: http://www.math.uic.edu/~hanson/mcs572/MPI-Examples.html

Email Comments or Questions to Professor Hanson