-
Notifications
You must be signed in to change notification settings - Fork 145
Building and Running ABACUS
Please refer to installation guide. Below, we will discuss each required components:
- Compiler, including MPI support
- Math libs, including FFTW
- ELPA
- Cereal
Too long; don't read: see also dockerfile.* under abacus repositry root path for reference. The lines starting with RUN indicate commands.
The Intel® oneAPI toolkit provides a complete toolchain. The Intel® oneAPI Base Toolkit contains Intel® oneAPI Math Kernel Library (aka MKL), providing a fast BLAS library. The Intel® oneAPI HPC Toolkit contains compilers with MPI Library.
Pros: you don't need to compile varios BLAS libraries by yourself.
Cons: large disk usage; potential backfire on non-Intel platform.
Below are minimum required components by ABACUS:
apt-get install -y \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \
intel-oneapi-compiler-fortran \
intel-oneapi-mkl-devel \
intel-oneapi-mpi-develAlternatively, install the whole Toolkit by the links above (recommended), or by the commands below. Be sure to check disk free space before:
wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18236/l_BaseKit_p_2021.4.0.3422_offline.sh
sudo bash l_BaseKit_p_2021.4.0.3422_offline.sh
wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18211/l_HPCKit_p_2021.4.0.3347_offline.sh
sudo bash l_HPCKit_p_2021.4.0.3347_offline.shAfter installing, configure your system. To work at a Command Line Interface (CLI), you may configure the components of the oneAPI toolkits using environment variable script.
source /opt/intel/oneapi/setvars.shDO NOT forget to set env vars each time you create a new shell window! Most error happens here. To configure environment variables to be set up automatically, add the command above to your ~/.bashrc or ~/.zshrc, respectively. Check correctness by mpiicc --version, and it should show something like:
icc (ICC) 2021.1 Beta 20201112 Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
The compilers we use are: mpiicc, mpiicpc and mpiifort, being counterparts to mpicc, mpicxx and gfortran.
Now, go to the ELPA part after completing the installation. Continue to read if you decide not using Intel oneAPI kit.
Abacus requires a minimum gcc version of 4.9.2. Check by gcc --version.
We recommend using the latest gcc.
If the gcc is not qualified,
- Install from apt/yum:
apt-get install gcc - Install [Red Hat Developer Toolset](Red Hat Developer Toolset)
ELPA requires a fortran compiler. apt-get install gfortran helps.
Abacus relies on MPI to scale up. This requires compilers with MPI wrapper, e.g. mpicc. We recommend using MPICH:
apt-get install mpich libmpich-devWe use OpenBLAS.
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make -j9 FC=gfortran
make PREFIX=/usr/local installgit clone https://github.com/darelbeida/scalapack.git -b v2.0.2-openblas --single-branch --depth=1 \
cd scalapack && make lib
cp libscalapack.a /usr/local/lib/ The support to FFTW2 is out-dated in ABACUS; FFTW here only reference to FFTW3.
Simply installing FFTW by apt-get will not install the MPI support part, i.e. a serial version of FFTW. To get FFTW with parallelism support, build from source:
wget http://www.fftw.org/fftw-3.3.9.tar.gz
tar zxvf fftw-3.3.9.tar.gz
cd fftw-3.3.9
./configure --enable-mpi-fortran --enable-orterun-prefix-by-default FC=gfortran
make -j9
make PREFIX=/usr/local install