MVAPICH2 is an implementation of the MPI 2.2 Message Passing Interface standard. It is produced by the Network-Based Computing Labortory, Dept of Computer Science and Engineering, The Ohio State University. It is optimized for use over InfiniBand interconnects and related protocols.

Versions and Availability

Module Names for mvapich2 on qb2
Machine Version Module Name
None Available N/A N/A
▶ **FIX-ME** FAQ?


  1. Set up your .soft file to select the library version, and the compilers you want to use for building and executing your code. Keep in mind that keys take effect in the order they appear. The following shows how to select and MVAPICH2 library and use it with the GNU gcc compiler. Do not simply copy them, as they are subject to change. Use the softenv command to verify them before use.
  2. +mvapich2-1.4-gcc-4.3.2 
  3. The compiler, mpicc, will use gcc and link with mvapich2 with no further ado.
  4. Run with: mpirun_rsh -hostfile $PBS_NODEFILE -np $NPROCS /path/to/executable
  5. An example PBS script can be viewed below.
  6. ▶ Open Example?
    # No shell commands until PBS setup is completed!
    # Before you submit your job, make sure the following are customized
    # for your particular needs:
    # Provide your allocation code.
    # "workq" is the default job queue.
    #PBS -q workq
    # Set to your email address.
    # Queen Bee uses "ppn=8", all others use "ppn=4"
    #PBS -l nodes=1:ppn=4
    # Set amount of time job may run in hh:mm:ss
    #PBS -l walltime=00:10:00
    # Have PBS pass all shell variables to the job environment
    #PBS -V
    # Send stdout and stderr to named files.
    #PBS -o MPI_test.out
    #PBS -e MPI_test.err
    # Give the job a name to make tracking it easier
    #PBS -N MPI_test 
    # Shell commands may begin here.
    # Your executable should either be in your path, or defined explicitly.
    # Here we'll assume a custom program named "hello" that exists in the
    # work directory:
    export EXEC=hello
    export WORK_DIR=/work/uname/path
    export NPROCS=`wc -l $PBS_NODEFILE |gawk '//{print $1}'`
    cd $WORK_DIR 
    # Note that order in which the options appear is important, and the
    # names may have changed since MVAPICH:
    mpirun_rsh -np $NPROCS -hostfile $PBS_NODEFILE $WORK_DIR/$EXEC 


Last modified: July 08 2016 12:42:29.