mpich

About

MPICH is a collaboratively developed open-source implementation of MPI distributed under the BSD license. MPICH is based on the MPI-1 standard.

Note: MPICH is provided for backwards compatibility. Any project developing new software should consider using MPICH2 or MVAPICH2.

Versions and Availability

Module Names for mpich on philip
Machine Version Module Name
philip 3.1.4 mpich/3.1.4/GCC-4.9.0
philip 3.1.4 mpich/3.1.4/INTEL-15.0.3
▶ **FIX-ME** FAQ?

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 the MPICH library and use it with the Intel C compiler. Do not simply copy them, as they are subject to change. Use the softenv command to verify them before use.
  2. +mpich-1.2.7-intel-11.1
    +intel-fc-11.1
    @default
    
  3. The compiler, mpicc, will use icc and link with mpich 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.
  6. ▶ 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

  • Documentation site. You will have to use MPICH2 documentation and pay attention only to those features support by MPI-1.

Last modified: November 11 2014 16:58:42.