본문 바로가기
HPC

MPI compiler 연동

by Yoon_estar 2024. 4. 26.
728x90
반응형

Open MPI 컴파일러별 연동 

1. Open MPI 4 + gcc 8

2. Open MPI 4 + Intel(OneAPI 2024)

3. Open MPI 4 + Intel(OneAPI 2023)

4. Open MPI 4 + gcc11

5. OpenMPI 4 + gcc13

 

Open MPI 다운로드

# wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.5.tar.gz
# tar zxvf openmpi-4.1.5.tar.gz

1. Open MPI 4 + gcc 8

# cd /openmpi-4.1.5-gcc8

// OpenMPI 에서 이용하고자 하는 Compiler 버전을 정확히 확인한다. 
// 현재 쉘에 적용된 gnu 버전이 정확히 무엇인지 확인(gnu-8.5 or gnu-11.4) 

# which gfortran
# which gcc
# which g++
# gcc --version

export FC=gfortran
export CC=gcc
export CXX=g++
./configure --prefix=/APP/hpc/mpi/openmpi-4.1.5-gcc8/ \\
--enable-mpi-fortran --enable-mpi-cxx --enable-shared --enable-mpi-threads --with-slurm

# make && make install

# vi /APP/hpc/profile.d/1.openmpi4-gcc8.sh
------------------------------------------------- 
#!/bin/sh

MPI_HOME=/APP/hpc/mpi/openmpi-4.1.5-gcc8
PATH=${MPI_HOME}/bin:$PATH
LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MPI_HOME PATH LD_LIBRARY_PATH
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_ALLOW_RUN_AS_ROOT=1

2. Open MPI 4 + Intel(OneAPI 2024)

위의 GCC8 버전과는 다르게 컴파일러를 따로 설치하여 적용해야한다. 아래 글을 참고하여 설치한다.

https://estar987.tistory.com/127

 

One API(2023,2024) 수동 설치

One API (2024) 설치최신 버전인 2024 버전과 이전 버전을 같이 올리는 이유는 상용 소프트웨어들 중 호환이 안 되는 것들이 많기 때문이다. 2024 버전은 Intel cpu 외에 amd 에서도 쓸 수 있도록 바뀌어 나

estar987.tistory.com

# source /APP/hpc/profile.d/intel64_v2024.sh
# cd /APP/hpc/mpi/openmpi-4.1.5-intel

# which mpirun
# which ifort

export FC=ifort
export F77=ifort

./configure --prefix=/APP/hpc/mpi/openmpi-4.1.5-intel/ \\
--enable-mpi-fortran --enable-mpi-cxx --enable-shared --enable-mpi-threads --with-slurm

# make && make install

# vi /APP/hpc/profile.d/2.openmpi4-intel_v2024.sh
-------------------------------------------------
#!/bin/sh

source /APP/hpc/profile.d/intel64_v2024.sh
MPI_HOME=/APP/hpc/mpi/openmpi-4.1.5-intel
PATH=${MPI_HOME}/bin:$PATH
LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MPI_HOME PATH LD_LIBRARY_PATH
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_ALLOW_RUN_AS_ROOT=1

3. Open MPI 4 +  Intel(OneAPI 2023)

wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.5.tar.gz
tar xvzf openmpi-4.1.5.tar.gz
cd openmpi-4.1.5
source /APP/hpc/profile.d/intel64_v2023.sh

// OpenMPI 에서 이용하고자 하는 Compiler 버전을 정확히 확인한다. 
// 현재 쉘에 적용된 gnu 버전이 정확히 무엇인지 확인(gnu-8.5 or gnu-11.4) 

which icc
which ifort
which icpc
export FC=ifort
export F77=ifort
export CC=icc
export CXX=icpc

./configure --prefix=/APP/hpc/mpi/openmpi4-intel --enable-mpi-fortran \\
--enable-mpi-cxx --enable-shared --enable-mpi-threads \\
--with-slurm 
make && make install

vi /APP/hpc/profile.d/openmpi4-intel_v2023.sh 
-----------------------------------------------
#!/bin/sh

source /APP/hpc/profile.d/intel64_v2023.sh
MPI_HOME=/APP/hpc/mpi/openmpi4-intel
PATH=${MPI_HOME}/bin:$PATH
LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MPI_HOME PATH LD_LIBRARY_PATH
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_ALLOW_RUN_AS_ROOT=1
------------------------------------------------

4. Open MPI 4 + gcc11

# source /APP/hpc/profile.d/gnu_gcc.v11.sh
# cd /APP/hpc/mpi/openmpi-4.1.5-gcc11

# which gfortran
# which gcc
# which g++
# gcc --version

export FC=gfortran
export CC=gcc
export CXX=g++

./configure --prefix=/APP/hpc/mpi/openmpi-4.1.5-gcc11/ \\
--enable-mpi-fortran --enable-mpi-cxx --enable-shared --enable-mpi-threads --with-slurm

# make && make install

# vi /APP/hpc/profile.d/3.openmpi4-gcc11.sh
------------------------------------------------- 
#!/bin/sh

source /APP/hpc/profile.d/gnu_gcc.v11.sh
MPI_HOME=/APP/hpc/mpi/openmpi-4.1.5-gcc11
PATH=${MPI_HOME}/bin:$PATH
LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MPI_HOME PATH LD_LIBRARY_PATH
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_ALLOW_RUN_AS_ROOT=1

5. Open MPI 4 + gcc13

# source /APP/hpc/profile.d/gnu_gcc.v13.sh
# cd /APP/hpc/mpi/openmpi-4.1.5-gcc13

# which gfortran
# which gcc
# which g++
# gcc --version

export FC=gfortran
export CC=gcc
export CXX=g++

./configure --prefix=/APP/hpc/mpi/openmpi-4.1.5-gcc13/ \\
--enable-mpi-fortran --enable-mpi-cxx --enable-shared --enable-mpi-threads --with-slurm

# make && make install

# vi /APP/hpc/profile.d/4.openmpi4-gcc13.sh
------------------------------------------------- 
#!/bin/sh

source /APP/hpc/profile.d/gnu_gcc.v13.sh
MPI_HOME=/APP/hpc/mpi/openmpi-4.1.5-gcc13
PATH=${MPI_HOME}/bin:$PATH
LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MPI_HOME PATH LD_LIBRARY_PATH
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_ALLOW_RUN_AS_ROOT=1

 

 

 

반응형