Tags:
create new tag
, view all tags

Using the GNU compilers to run under OpenMPI

  • OpenMPI comes pre-built with Rocks using the gnu compilers.
  • Use the compilers in /opt/openmpi/bin/
  • OpenMPI jobs must use the orte PE (parallel environment),
  • Look, on hydra, at ~hpc/tests/mpi/orte, for a simple example.

The Makefile, for a trivial 'hello world!" example, is

#
# mpi location
MPICH  = /opt/openmpi
#
# flags
CFLAGS = 
MFLAGS = -I$(MPICH)/include
#
# compiler/linker
CC     = $(MPICH)/bin/mpicc  $(CFLAGS) $(MFLAGS) $(IFLAGS)
MPICC  = $(MPICH)/bin/mpicc  $(CFLAGS)
#
# ---------------------------------------------------------------------------
#
hello: hello.o
        $(MPICC) -o $@ hello.o

Alternative

  • A version of OpenMPI (1.4.3) is in /usr/mpi/gcc/openmpi-1.4.3
  • It has IB support built-in (see below)
  • This version of OpenMPI must also use the orte PE
  • Look , on hydra, at ~hpc/tests/mpi/gnu/openmpi-1.4.3/, for a simple example.

  • Compare the output of /opt/openmpi/bin/ompi_info to /usr/mpi/gcc/openmpi-1.4.3/bin/ompi_info:
    1c1
    <                  Package: Open MPI root@aurora.rocksclusters.org Distribution
    ---
    >                  Package: Open MPI root@hydra-2.si.edu Distribution
    12,14c12,14
    <                   Prefix: /opt/openmpi
    <  Configured architecture: x86_64-unknown-linux-gnu
    <           Configure host: aurora.rocksclusters.org
    ---
    >                   Prefix: /usr/mpi/gcc/openmpi-1.4.3
    >  Configured architecture: x86_64-redhat-linux-gnu
    >           Configure host: hydra-2.si.edu
    16,17c16,17
    <            Configured on: Fri Oct  7 12:15:57 PDT 2011
    <           Configure host: aurora.rocksclusters.org
    ---
    >            Configured on: Wed Feb 29 11:26:45 EST 2012
    >           Configure host: hydra-2.si.edu
    19,20c19,20
    <                 Built on: Fri Oct  7 12:31:57 PDT 2011
    <               Built host: aurora.rocksclusters.org
    ---
    >                 Built on: Wed Feb 29 11:29:54 EST 2012
    >               Built host: hydra-2.si.edu
    47c47
    <  mpirun default --prefix: no
    ---
    >  mpirun default --prefix: yes
    81a82,83
    >                  MCA btl: ofud (MCA v2.0, API v2.0, Component v1.4.3)
    >                  MCA btl: openib (MCA v2.0, API v2.0, Component v1.4.3)
    

-- SylvainKorzennikHPCAnalyst - 25 Jan 2012

Topic revision: r4 - 2012-06-28 - 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