UK Logo High Performance Computing November 23, 2009
Home News System Status User Policies Account Info Hardware Software Documentation FAQs Search
UKy HPC Frequently-Asked Questions

Frequently-Asked Questions related to:

For questions about this faq, please contact: help-hpc@uky.edu


FAQ Revised: Tuesday 02 March 2004 14:49:03

Table of Contents

1. MPI

1. MPI

1.1. How do I compile an executable file in order to run an MPI application ?

To compile an executable file named my_application written in C enter:
    mpicc -o my_application my_application.c

To compile an executable file named my_application written in Fortran 90 enter:
    mpif90 +DD64 -o my_application my_application.f90

NOTE: HP MPI supports both a 32-bit and 64-bit version of the MPI library on platforms running HP-UX 11.0. When you use mpif90, compile with the +DD64 option to link the 64-bit version of the library. Otherwise, mpif90 links the 32-bit version of the library.
See the MPI Documentation section of this Web site for more information on MPI compiling. Also, see man mpicc for C compiler specifics and man mpif90 for Fortran90 compiler specifics.

1.2. Which compilers should I use to compile an MPI application ?

For applications written in C use: /opt/mpi/bin/mpicc.
For applications written in Fortran 90 use: /opt/mpi/bin/mpif90.
For applications written in Fortran 77 use: /opt/mpi/bin/mpif90. Fortran 77 has been superceded by Fortran 90, and is not available on this machine.

1.3. How do I execute an MPI code on multiple CPUs ?

Use -np # to specify the number of CPUs on which you want the code to run.
For example, the following MPI code will run the executable file named my_application on four CPUs:
    mpirun -np 4 my_application

where -np # specifies the number of processors that is to be used.
Note: This assumes all the processors are on one node.

1.4. How do I execute an MPI code on multiple CPUs on multiple nodes ?

Consult the following link: Submitting a job to be run on multiple nodes.

It is highly advisable to NOT attempt to constuct an appfile yourself. The above documentation shows how to use the runpam command to have LSF automatically contruct an appfile containing any required options. Appfiles constructed by hand will not, as a rule, use the machines allocated to the job by LSF, which will prevent your job from running properly.

1.5. Which environment variables should I be concered with ?

Set the MPI_ROOT to mpi location (the default is /opt/mpi).

Set PATH to $MPI_ROOT/bin

Set MANPATH to $MPI_ROOT/share/man.

1.6. Where do I go to get more MPI documentation ?

See the MPI documentation in the Documentation section of this Web site or see the HP MPI User's Guide in the HP-UX Documentation listing here.

1.7. mpid: ERROR: HP MPI version incompatibility detected

MPI applications compiled prior to version 1.7 may receive this message.

You have two options:

  • recompile the application or
  • invoke with mpirun1.6 (instead of mpirun)


1.8. I want to use multiple-level parallelism (running an MPI job which uses OpenMP, loop-parallelism, or calls a parallelized library routine). How do I do it?

Consult the following link: Running a job using multi-level parallelism


FAQ generated by: makefaq