Hprc banner tamu.png

Difference between revisions of "Ada:Compile:MPI"

From TAMU HPRC
Jump to: navigation, search
(MPI Code)
Line 3: Line 3:
 
The table below shows the commands to compile mpi programs. These commands are basically wrapper scripts that call the respective intel compilers with additional linker flags\
 
The table below shows the commands to compile mpi programs. These commands are basically wrapper scripts that call the respective intel compilers with additional linker flags\
 
. Any intel compiler flag will also work when using the wrappers below.
 
. Any intel compiler flag will also work when using the wrappers below.
 +
The following table shows the wrapper compiler names used by Intel MPI. These wrappers will invoke the underlying compilers with the appropriate compiler and linker flags for Intel MPI. Any arguments not recognized by the wrappers will be passed to the underlying Intel compilers. See each wrapper's man page for more information.
 +
  
 
{| class="wikitable" style="text-align: left;"
 
{| class="wikitable" style="text-align: left;"
 +
!MPI wrapper
 +
!Compiler
 
!Language
 
!Language
!Compiler
 
 
!Example
 
!Example
 
|-
 
|-
 +
|mpiicc
 +
|icc
 
|C
 
|C
|mpiicc
 
 
|mpiicc  <compiler_flags> prog.c
 
|mpiicc  <compiler_flags> prog.c
 
|-
 
|-
 +
|mpicc
 +
|gcc
 +
|C
 +
|mpicc  <compiler_flags> prog.c
 +
|-
 +
|mpiicpc
 +
|icpc
 
|C++
 
|C++
|mpiicpc
 
 
|mpiicpcp <compiler_flags> prog.cpp
 
|mpiicpcp <compiler_flags> prog.cpp
 
|-
 
|-
|F90
+
|mpicxx
 +
|g++
 +
|C++
 +
|mpicxx <compiler_flags> prog.cpp
 +
|-
 
|mpiifort
 
|mpiifort
 +
|ifort
 +
|Fortran
 
|mpiifort <compiler_flags> prog.f90
 
|mpiifort <compiler_flags> prog.f90
 +
|-
 +
|mpif90
 +
|gfortran
 +
Fortran
 +
|mpif90 <compiler_flags> prog.f90
 
|-
 
|-
 
|F77  
 
|F77  
 
|mpiifort
 
|mpiifort
 +
|ifort
 
|mpiifort <compiler_flags> prog.f
 
|mpiifort <compiler_flags> prog.f
 +
|-
 +
|-
 +
|C
 +
|mpicc
 +
|gcc
 +
|mpicc  <compiler_flags> prog.c
 +
 
|}
 
|}
  

Revision as of 13:50, 1 December 2014

MPI Code

The table below shows the commands to compile mpi programs. These commands are basically wrapper scripts that call the respective intel compilers with additional linker flags\ . Any intel compiler flag will also work when using the wrappers below. The following table shows the wrapper compiler names used by Intel MPI. These wrappers will invoke the underlying compilers with the appropriate compiler and linker flags for Intel MPI. Any arguments not recognized by the wrappers will be passed to the underlying Intel compilers. See each wrapper's man page for more information.


MPI wrapper Compiler Language Example
mpiicc icc C mpiicc <compiler_flags> prog.c
mpicc gcc C mpicc <compiler_flags> prog.c
mpiicpc icpc C++ mpiicpcp <compiler_flags> prog.cpp
mpicxx g++ C++ mpicxx <compiler_flags> prog.cpp
mpiifort ifort Fortran mpiifort <compiler_flags> prog.f90
mpif90 gfortran

Fortran

mpif90 <compiler_flags> prog.f90
F77 mpiifort ifort mpiifort <compiler_flags> prog.f
C mpicc gcc mpicc <compiler_flags> prog.c

To see complete compiler command when calling the wrapper functions above use the **-show** flag:

 -bash-4.1$ mpiifort -show 
ifort -I/software/easybuild/software/impi/4.1.3.049/intel64/include -I/software/easybuild/software/impi/4.1.3.049/intel64/include 
-L/software/easybuild/software/impi/4.1.3.049/intel64/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker 
/software/easybuild/software/impi/4.1.3.049/intel64/lib -Xlinker -rpath -Xlinker -/opt/intel/mpi-rt/4.1 -lmpigf -lmpi -lmpigi -ldl -lrt -lpthread`