|
本帖最后由 万里云 于 2023-10-21 18:09 编辑
Download the source code of OpenMPI which matches the requirements of ORCA binary, unpack it with- tar -xf openmpi-X.X.X.tar.gz
复制代码 or- tar -xf openmpi-X.X.X.tar.bz2
复制代码 depending on the format of the source code you have downloaded. Then cd into the source code directory and run configure
- export CC=icc
- export CXX=icpc
- export FC=ifort
- export CFLAGS=-O2
- export CXXFLAGS=-O2
- export FCFLAGS=-O2
- ./configure \
- --prefix=$HOME/soft/openmpi-X.X.X \
- --enable-mpi-fortran=yes --enable-mpi-cxx=yes --enable-mpi-java=no \
- --enable-wrapper-rpath=yes --enable-cxx-exceptions=yes \
- --enable-shared=yes --enable-static=yes
复制代码 Note here we have utilized Intel Compilers to compile OpenMPI. You can also use GCC by
- export CC=gcc
- export CXX=g++
- export FC=gfortran
复制代码 After the configuration succeeds, build OpenMPI with
followed by testing the build
If everything goes well, you can install it with
OpenMPI will be installed to $HOME/soft/openmpi-X.X.X. After installation, update the environment variabls in ~/.bashrc such that openmpi will be available
- export PATH=$HOME/soft/openmpi-X.X.X/bin:$PATH
- export LD_LIBRARY_PATH=$HOME/soft/openmpi-X.X.X/lib:$LD_LIBRARY_PATH
复制代码 If you have multiple versions of MPI installed on your server, try Environment Modules for elegantly switching between different versions.
|
|