CARC web archive · Archived copy of ahpcc.unm.edu/Computing/AHPCC/Documentation/User_Guides/ug-truchas.html as captured by the Internet Archive on 28 August 2001. Links to pages that were not saved here go to the Wayback Machine. Icons the Internet Archive did not save were redrawn for this copy and are not originals (hover over one to see). Grey boxes mark images that were never archived. Wayback copy · All pages in this snapshot · Web archive index
 Education  (image not archived)

Running Parallel Programs on Truchas Cluster


 

Compilation

Execution

Example


 

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

trucha01 1 /complete/path/to/your/executable

trucha02 1 /complete/path/to/your/executable

trucha03 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

trucha01 1 /linux/hello

trucha02 1 /linux/hello

truchag03 1 /linux/hello

Run the program by typing "hello"

 

[Home] [Inside Us] [Computing] [Research] [Education] [SiteMap]

Please contact our Webmaster with questions or comments.
© Copyright 2001 Albuquerque High Performance Computing Center.  All rights reserved.