create new tag
, view all tags

Using MPI with the Intel Compilers

Environment Configuration

  • To configure your environment to include the Intel compilers and MPI, add the following two line in your ~/.bashrc or ~/.cshrc file:
    bash/sh users tcsh/csh users
    source  /share/apps/intel/bin/compilervars.sh intel64 source /share/apps/intel/bin/compilervars.csh intel64
    export PATH=$PATH:/software/intel/impi/ set path = ($path /software/intel/impi/

The second line gives you access to the MPI linkers, mpiifort, mpiicc, mpiicpc


  • A trivial example ("hello word!" example is, on hydra, in ~hpc/tests/mpi/intel,
  • The Makefile, for this trivial example, is
    MPDIR = /software/intel/impi/
    MPINC = $(MPDIR)/include64
    MPLIB = $(MPDIR)/lib64
    # flags
    CFLAGS = 
    # compiler/linker
    CC     = icc     $(CFLAGS) $(IFLAGS)
    MPICC  = mpiicc  $(CFLAGS) -L$(MPLIB) -lmpi
    hello: hello.o
            $(MPICC) -o $@ hello.o

-- SylvainKorzennikHPCAnalyst - 28 Jun 2012

Topic revision: r2 - 2012-07-13 - 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