MPI Compilers
mpicc vs gcc¶
OpenMPI¶
# shaojiemike @ node5 in ~ [7:20:31]
$ mpicc -showme
gcc -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -pthread -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi
IntelMPI¶
source /opt/intel/oneapi/setvars.sh
# shaojiemike @ node5 in ~/github/IPCC/SLIC on git:main x [15:45:06] C:1
$ mpicc -compile_info
gcc -I'/opt/intel/oneapi/mpi/2021.1.1/include' -L'/opt/intel/oneapi/mpi/2021.1.1/lib/release' -L'/opt/intel/oneapi/mpi/2021.1.1/lib' -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker '/opt/intel/oneapi/mpi/2021.1.1/lib/release' -Xlinker -rpath -Xlinker '/opt/intel/oneapi/mpi/2021.1.1/lib' -lmpifort -lmpi -lrt -lpthread -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Xlinker --enable-new-dtags -ldl
> mpicc -v
mpigcc for the Intel(R) MPI Library 2021.5 for Linux*
Copyright Intel Corporation.
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/public1/soft/gcc/8.1.0/libexec/gcc/x86_64-pc-linux-gnu/8.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/public1/soft/gcc/8.1.0 --enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 8.1.0 (GCC)
# shaojiemike @ node5 in ~/github/IPCC/SLIC on git:main x [15:45:16]
$ mpiicc -compile_info
icc -I'/opt/intel/oneapi/mpi/2021.1.1/include' -L'/opt/intel/oneapi/mpi/2021.1.1/lib/release' -L'/opt/intel/oneapi/mpi/2021.1.1/lib' -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker '/opt/intel/oneapi/mpi/2021.1.1/lib/release' -Xlinker -rpath -Xlinker '/opt/intel/oneapi/mpi/2021.1.1/lib' -lmpifort -lmpi -ldl -lrt -lpthread
# shaojiemike @ node5 in ~/github/IPCC/SLIC on git:main x [15:50:09] C:255
$ mpiicc -show
icc -I'/opt/intel/oneapi/mpi/2021.1.1/include' -L'/opt/intel/oneapi/mpi/2021.1.1/lib/release' -L'/opt/intel/oneapi/mpi/2021.1.1/lib' -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker '/opt/intel/oneapi/mpi/2021.1.1/lib/release' -Xlinker -rpath -Xlinker '/opt/intel/oneapi/mpi/2021.1.1/lib' -lmpifort -lmpi -ldl -lrt -lpthread
MPICH¶
ipcc22_0029@ln121 ~/github/IPCC2022-preliminary/run (float_trick*) [10:49:48]
> mpicc -show
gcc -I/public1/soft/mpich/3.1.4-gcc8.1.0/include -L/public1/soft/mpich/3.1.4-gcc8.1.0/lib -Wl,-rpath -Wl,/public1/soft/mpich/3.1.4-gcc8.1.0/lib -Wl,--enable-new-dtags -lmpi
-showme (Open MPI) or -show (Open MPI, MPICH and derivates) use -showme:compile and -showme:link to obtain the options automatically
安装选项查看¶
intelmpi¶
> mpirun -info
HYDRA build details:
Version: 2021.5
Release Date: 20211102 (id: 9279b7d62)
Process Manager: pmi
Bootstrap servers available: ssh slurm rsh ll sge pbs pbsdsh pdsh srun lsf blaunch qrsh fork
Resource management kernels available: slurm ll lsf sge pbs cobalt
MPICH¶
ipcc22_0029@ln121 ~ [11:55:08]
> mpiexec --version
HYDRA build details:
Version: 3.1.4
Release Date: Fri Feb 20 15:02:56 CST 2015
CC: gcc
CXX: g++
F77: gfortran
F90: gfortran
Configure options: '--disable-option-checking' '--prefix=/public1/soft/mpich/3.1.4-gcc8.1.0' 'CC=gcc' 'CXX=g++' 'FC=gfortran' '--cache-file=/dev/null' '--srcdir=.' 'CFLAGS= -O2' 'LDFLAGS= ' 'LIBS=-lpthread ' 'CPPFLAGS= -I/public1/home/deploy/amd-mpich/mpich-3.1.4/src/mpl/include -I/public1/home/deploy/amd-mpich/mpich-3.1.4/src/mpl/include -I/public1/home/deploy/amd-mpich/mpich-3.1.4/src/openpa/src -I/public1/home/deploy/amd-mpich/mpich-3.1.4/src/openpa/src -D_REENTRANT -I/public1/home/deploy/amd-mpich/mpich-3.1.4/src/mpi/romio/include'
Process Manager: pmi
Launchers available: ssh rsh fork slurm ll lsf sge manual persist
Topology libraries available: hwloc
Resource management kernels available: user slurm ll lsf sge pbs cobalt
Checkpointing libraries available:
Demux engines available: poll select
ipcc22_0029@ln121 ~ [11:55:31]
> mpichversion
MPICH Version: 3.1.4
MPICH Release date: Fri Feb 20 15:02:56 CST 2015
MPICH Device: ch3:nemesis
MPICH configure: --prefix=/public1/soft/mpich/3.1.4-gcc8.1.0/ CC=gcc CXX=g++ FC=gfortran
MPICH CC: gcc -O2
MPICH CXX: g++ -O2
MPICH F77: gfortran -O2
MPICH FC: gfortran -O2
OpenMPI¶
## 安装了IB支持
> ompi_info | grep openib
MCA btl: openib (MCA v2.1.0, API v3.0.0, Component v3.1.6)
> mpiexec --version
mpiexec (OpenRTE) 4.1.1
Report bugs to http://www.open-mpi.org/community/help/
ipcc22_0029@ln121 ~/slurm/MPIInit [12:24:19]
> module load mpi/openmpi/4.1.1-gcc7.3.0
ipcc22_0029@ln121 ~/slurm/MPIInit [12:24:51]
> mpicc -v
Using built-in specs.
COLLECT_GCC=/public1/soft/gcc/7.3.0/bin/gcc
COLLECT_LTO_WRAPPER=/public1/soft/gcc/7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/public1/soft/gcc/7.3.0 --disable-multilib
Thread model: posix
gcc version 7.3.0 (GCC)
需要进一步的研究学习¶
暂无
遇到的问题¶
暂无
开题缘由、总结、反思、吐槽~~¶
参考文献¶
https://stackoverflow.com/questions/11312719/how-to-compile-mpi-with-gcc