create new tag
, view all tags

Using the GNU compilers to run MPI code with IB support

  • MPI with IB support (mvapich) is available for the GNU compilers
  • No changes to any of your codes are needed, but you must compile and link with the right libraries.
  • MPI v1 and v2 are available, i.e.:
    • mvapich 1.2.0 (MPI 1.x)
    • mvapich2 1.7 (MPI 2.x)
    • mvapich2 1.9 (MPI 2.x)
  • OpenMPI (ORTE) with IB support is also available (/usr/mpi/gcc/openmpi-1.4.3)
  • Look, on hydra, under ~hpc/tests/mpi/gnu, for simple examples.

The Makefile, for a trivial 'hello world!" example, is (mvapich2-1.9)

# mpi location
MPICH  = /usr/mpi/gcc/mvapich2-1.9
# flags
MFLAGS = -I$(MPICH)/include -I$(MPICH)/include/f90choice
# compiler/linker
CC     = $(MPICH)/bin/mpicc  $(CFLAGS) $(MFLAGS) $(IFLAGS)
MPICC  = $(MPICH)/bin/mpicc  $(CFLAGS)
hello: hello.o
        $(MPICC) -o $@ hello.o

To use other version of mvapich change the value of MPICH to the respective value
MPICH  = /usr/mpi/gcc/mvapich-1.2.0 or MPICH  = /usr/mpi/gcc/mvapich2-1.7

Note that in higher version of mvapich, the command mpirun uses your $path to look for the executable.
If you don't include '.' in your path, you must use the ./mycode construct on the mpirun line to avoid an error message like:
[proxy:0:0@compute-N-M.local] HYDU_create_process (./utils/launch/launch.c:75): execvp error on file mycode (No such file or directory)

-- SylvainKorzennikHPCAnalyst - 28 Jun 2012

Topic revision: r3 - 2013-10-02 - SylvainKorzennikHPCAnalyst
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback