-
Notifications
You must be signed in to change notification settings - Fork 630
Setting up Linux environment
Ensure that git
and CMake
is installed. If not, depending on your linux distribution execute the git
and CMake
installation commands from the next section.
To build FDS with the Intel oneAPI compilers, download and install the Base and HPC toolkits at the links below. Install the base toolkit first, then the HPC toolkit.
Add intel compiler to your environment by adding the following lines to your .bash_profile
file (replace the path with your intel installation path):
# oneAPI setup
source /opt/intel/oneapi/setvars.sh >& /dev/null
Now check if mpirun
and mpiifx
executable exist in your environment.
$ which mpirun
/opt/intel/oneapi/mpi/2021.14/bin/mpirun
$ mpiifx -show
ifx -I"/opt/intel/oneapi/mpi/2021.14/include/mpi" -I"/opt/intel/oneapi/mpi/2021.14/include" -I"/opt/intel/oneapi/mpi/2021.14/include/mpi" -L"/opt/intel/oneapi/mpi/2021.14/lib" -L"/opt/intel/oneapi/mpi/2021.14/lib" -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker "/opt/intel/oneapi/mpi/2021.14/lib" -Xlinker -rpath -Xlinker "/opt/intel/oneapi/mpi/2021.14/lib" -lmpifort -lmpi -ldl -lrt -lpthread
If you already have git
and CMake
installed, skip the git
and CMake
installation step.
- To install
git
andCMake
:
sudo apt update -y
sudo apt install git -y
sudo apt install cmake -y
- To install gcc and openmpi:
sudo apt update -y
sudo apt install build-essential -y
sudo apt install gfortran -y
sudo apt install openmpi-bin openmpi-common libopenmpi-dev -y
- To install
git
andCMake
:
sudo dnf update -y
sudo dnf install git -y
sudo dnf install cmake -y
- To install GNU compilers and openmpi:
sudo dnf update -y
sudo dnf install gcc-toolset-14
source /opt/rh/gcc-toolset-14/enable
sudo dnf install openmpi openmpi-devel -y
Add following lines to you ~/.bash_profile:
# MPI Library:
export MPIDIST=/usr/lib64/openmpi
export PATH=$MPIDIST/bin:$PATH
export LD_LIBRARY_PATH=$MPIDIST/lib:$LD_LIBRARY_PATH
Check the Linux distribution manual about how to install git, CMake, GNU compilers, and openmpi.
In order to use Intel MKL library with GNU compilers, export the MKLROOT with Intel MKL installed path:
export MKLROOT=/opt/intel/oneapi/mkl/2023.1.0/
Now check if mpirun
and mpifort
executable exist in your environment.
$ which mpirun
/usr/lib64/openmpi/bin/mpirun
$ mpifort -show
gfortran -I/usr/include/openmpi-x86_64 -pthread -I/usr/lib64/openmpi/lib -Wl,-rpath -Wl,/usr/lib64/openmpi/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi