CARC web archive · Archived copy of ahpcc.unm.edu/Systems/Documentation/Truchas/index.html as captured by the Internet Archive on 5 February 2001. Links to pages that were not saved here go to the Wayback Machine. Wayback copy · All pages in this snapshot · Web archive index

Linux Supercluster Reference Card
News
Accounts-Allocations
All Machines
Help Desk
Documentation
Training
Research
Downloads
Ask Users

Running Parallel Programs on Truchas Cluster




  • Compilation

      To compile and link your MPI code in one step, use the appropriate command from the following:

        mpif77 -i mpich -c ch_p4 -- -o <progname> <filename>.f

        mpif90 -i mpich -c ch_p4 -- -o <progname> <filename>.f90

        mpicc -i mpich -c ch_p4 -- -o <progname> <filename>.f

        mpiCC -i mpich -c ch_p4 -- -o <progname> <filename>.f

      Arguments after the double dash are passed to gcc, g77, or f95 directly and can be anything accepted by those compilers. The mpif90 script compiles both FORTRAN 90 and FORTRAN 95 programs.


  • Execution

      Before running the program you must construct a process group file in the directory where your executable is. This file is called <progname>.pg and should look something like this:

        local 0

        turing01 1 /complete/path/to/your/executable

        turing02 1 /complete/path/to/your/executable

        turing03 1 /complete/path/to/your/executable

      The first line specifies the number of processes on the local processor (in addition to the one that runs there by default). Each subsiquent line specifies the machines to use for the other processes, the number of processes on that processor, and the path to use to find the executable. It is advisable to use the ruptime command to choose the machines with the lightest load to use for your job.

      Note: A similar file is constructed automatically by the mpirun script on the IBM machines; this isn't yet set up on the cluster.

      Now run the executable. MPICH uses secure shell to launch a copy on each machine listed in the .pg file.


  • Example

      Suppose that the program hello.c is in the directory /linux.

      Compile:

        mpicc -i mpich -c ch_p4 -- -o hello hello.c

      The file hello.pg:

        local 0

        turing01 1 /linux/hello

        turing02 1 /linux/hello

        turing03 1 /linux/hello

      Run the program by typing "hello"

      Questions or comments can be directed to Ken Summers (summers@arc.unm.edu), or the systems support staff at the AHPCC.


Copyright 1998-2000, High Performance Computing Education and Research Center

The University of New Mexico
Albuquerque High Performance Computing Center
Galles Building - 1601 Central Avenue, NE
Albuquerque, NM 87131UNM
Phone # 505.277.8249000000Fax # 505.277.8235
Last Modified: December 1, 2000