ARCHIVED: On AVIDD at IU, how do I compile my program so I can run it as a parallel job using LAM?
Note: UITS began retiring the AVIDD system on May 1 as originally scheduled, but portions of the system will remain online until mid-August. UITS retired AVIDD-T, AVIDD-N, and AVIDD-I on May 1, but is delaying the retirement of AVIDD-B and AVIDD-O pending the installation of a replacement system based on Intel's X86-64 technology. If you use AVIDD-B or AVIDD-O, UITS encourages you to migrate to Big Red and/or the TeraGrid; for help, email High Performance Computing. If you cannot migrate, AVIDD-B and AVIDD-O will remain available to you until the new system is ready for use in mid-August.
Follow these instructions to compile your MPI program so that you can run it as a parallel job on AVIDD at Indiana University:
- If your environment is not set up to use LAM, use
softenvto set it up: [hpc@bh2 hpc]$ soft add +lam-gm-intelThe above command will add PATH and related settings needed to use LAM, built using Intel compilers, to your environment. To list all software you can possibly add to your environment, at the command line, enter
softenv.If you want the setting to be permanent, add
+lam-gm-intel ## possibly more entries @avidd+lam-gm-intelon a separate line in your~/.softfile before the@aviddline, for example:Then execute
resoftor log out and log back in for the change to take effect. - Compile your program using MPI-based compilers. For example, you
can use
mpicc, the MPI wrapper for C programs, as follows: [hpc@bh2 hpc]$ mpicc -o ~/bin/helloworlds helloworlds.cYou can use
mpicc,mpif77, andmpif90to compile C++, Fortran 77, and Fortran 90 programs respectively.Note: UITS recommends that you compile programs on the head node (bhX or ihX) to make sure all components of the compilers as well as libraries are available.
A simple rule of thumb to follow is: Compile and link on the head node; run code on compute nodes (bcXX or icXX).
For instructions on how to run your job interactively, see the Knowledge Base document ARCHIVED: On AVIDD at IU, how do I run a parallel job interactively using LAM? For instructions on how to run your job as a batch job, see the Knowledge Base document ARCHIVED: On AVIDD at IU, how do I run my MPI program as a parallel batch job using LAM?
For more information on LAM, please refer to the LAM FAQ at:
http://www.lam-mpi.org/faq/This document was developed with support from the National Science Foundation (NSF) under Grant No. 0503697 to the University of Chicago and subcontracted to Indiana University. Additional support was provided by IU through its participation in the TeraGrid, which is supported by the NSF under Grants No. 0833618, SCI451237, SCI535258, and SCI504075. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.
Last modified on December 18, 2007.







