Skip to main content

mvapich

Versions and Availability

About the Software

Description Path: key[@id="mvapich"]/whatis Not Found!

Usage

  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 MVAPICH 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. +mvapich-1.1-gcc-4.3.2 
    +gcc-4.3.2
    @default
    
  3. The compiler, mpicc, will use gcc and link with mvapich with no further ado.
  4. Run with: mpirun -machinefile $PBS_NODEFILE -np $NPROCS /path/to/executable
  5. An example PBS script can be viewed below.

▶ Open Example?

#!/bin/sh
#
# No shell commands until PBS setup is completed!
#
# Provide your allocation code.
#PBS -A ALLOCATION_CODE
#
# "workq" is the default job queue.
#PBS -q workq
#
# Set to your email address.
#PBS -M EMAIL_ADDRESS
#
# PPN should be 4, 8, 16, 20, etc., depending on machine/queue you are using.
#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 
 
# The order in which options are provided is important:
mpirun -machinefile $PBS_NODEFILE -np $NPROCS $WORK_DIR/$EXEC 

Resources

  • MVAPICH Home Page
  • User Guides. You may have to use the MVAPICH2 guides, follow the documentation for features common to MPI 1.2 and MPI 2.2, and avoid using features implement only in MPI 2.2.

Last modified: September 10 2020 11:58:50.