Chemistry and other software

Compiler variables

Intel compilers

These settings are used for LLVM Intel compilers (Intel OneAPI kit):

export CC=icx
export CXX=icpx
export FC=ifx
export F77=ifx
export F90=ifx
export MPIFC="mpiifx -fc=ifx"
export MPIF77="mpiifx -fc=ifx"
export MPIF90="mpiifx -fc=ifx"
export MPICC="mpiicx -cc=icx"
export MPICXX="mpicxx -cxx=icpx"
export I_MPI_F90=ifx
export I_MPI_CC=icx
export I_MPI_CXX=icpx

…and these are for classic Intel compilers:

export CC=icc
export CXX=icpc
export FC=ifort
export F77=ifort
export F90=ifort
export MPIFC="mpiifort -fc=ifort"
export MPIF77="mpiifort -fc=ifort"
export MPIF90="mpiifort -fc=ifort"
export MPICC="mpiicc -cc=icc"
export MPICXX="mpiicpc -cxx=icpc"
export I_MPI_F90=ifort
export I_MPI_CC=icc
export I_MPI_CXX=icpc

OpenMPI

openmpi_version="5.0.10"
mkdir -p /home/$(whoami)/software/openmpi
cd /home/$(whoami)/software/openmpi
curl -LO https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-${openmpi_version}.tar.gz
tar -xvf ${openmpi_version}.tar.gz
cd openmpi-${openmpi_version}

:") Compile…

./configure --prefix=/home/$(whoami)/software/openmpi/5.0.10_gnu CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS="-m64 -fdefault-integer-8" FCFLAGS="-m64 -fdefault-integer-8" --enable-mpi-fortran=usempi 
make -j8
make install

1. NWChem

First, cd to the folder that contains NWChem then run:

1.1. Intel

Variables for compilers

mkdir -p /home/$(whoami)/software/nwchem
cd /home/$(whoami)/software/nwchem
git clone https://github.com/nwchemgit/nwchem.git
mv nwchem master

export nwchem_ver="master"
export ifx_ver=$(ifx --version 2>&1 | head -n1 | sed -E 's/[^0-9]*([0-9.]+).*/\1/')

export NWCHEM_TOP=/home/$(whoami)/software/nwchem/master_${ifx_ver}
export NWCHEM_TARGET=LINUX64
export USE_MPI=y
export USE_MPIF=y
export BLAS_SIZE=8
export SCALAPACK_SIZE=8
export NWCHEM_MODULES="smallqm"
export BLASOPT="-L$MKLROOT/lib/intel64 -lmkl_intel_ilp64 -lmkl_core -lmkl_sequential -lpthread -lm"
export LAPACK_LIB="-L$MKLROOT/lib/intel64 -lmkl_intel_ilp64 -lmkl_core -lmkl_sequential -lpthread -lm"
SCALAPACK="-L$MKLROOT/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_core -lmkl_sequential -lmkl_blacs_intelmpi_ilp64 -lpthread -lm"
cd src
make -j8

1.3. GNU

mkdir -p /home/$(whoami)/software/nwchem
cd /home/$(whoami)/software/nwchem
git clone https://github.com/nwchemgit/nwchem.git
mv nwchem master

export nwchem_ver="master"
export gcc_ver=$(gcc -dumpfullversion -dumpversion)

export NWCHEM_TOP=/home/$(whoami)/software/nwchem/${nwchem_ver}_${ifx_ver}
export NWCHEM_TARGET=LINUX64
export USE_MPI=y
export USE_MPIF=y
export NWCHEM_MODULES="smallqm"
export BUILD_OPENBLAS=1
export BUILD_SCALAPACK=1
export BLAS_SIZE=8
export SCALAPACK_SIZE=8

Global Array

GNU compilers with Intel MPI+MKL

export ga_ver="5.9.2"

mkdir -p /home/$(whoami)/software/ga
cd /home/$(whoami)/software/ga
curl -LO https://github.com/GlobalArrays/ga/releases/download/v5.9.2/ga-5.9.2.tar.gz
tar -xvf ga-5.9.2.tar.gz
rm ga-5.9.2.tar.gz

cd ga-5.9.2
mkdir build
CC=gcc CXX=g++ FC=gfortran cmake .. -DCMAKE_INSTALL_PREFIX=/home/$(whoami)/software/ga/${ga_ver}_gnu_impi_imkl -DGA_RUNTIME=MPI_PROGRESS_RANK -DENABLE_BLAS=ON -DLINALG_VENDOR=IntelMKL -DLINALG_PREFIX=$MKLROOT -DENABLE_TESTS=ON -DENABLE_CXX=ON -DENABLE_FORTRAN=ON -DENABLE_PROFILING=OFF -DENABLE_SCALAPACK=ON
make -j8
make install
cd ..
rm -rf ga-5.9.2

2. OpenMolcas [Intel OneAPI]

Install OpenMolcas

Export HDF5ROOT, GAROOT or OPENBLASROOT (if you use OpenBLAS). It’s better that you install numpy without MKL support if you want to use Intel OneAPI. Furthermore, you have to install pyparsing too.

export openmolcas_ver="master"

mkdir -p /home/$(whoami)/software/openmolcas
cd /home/$(whoami)/software/openmolcas
git clone https://gitlab.com/Molcas/OpenMolcas.git
mv OpenMolcas ${openmolcas_ver}_gnu_impi_imkl
cd ${openmolcas_ver}_gnu_impi_imkl
mkdir build
cd build
CC=mpicc FC=mpif90 cmake ../.. -DGEN1INT=ON -DGA=ON -DMPI=ON -DLINALG=MKL
make -j8

To verify the installation:

pymolcas verify --clean -j 8

3. Miniconda3

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh

bash ~/miniconda.sh -b -u -p ~/miniconda3
~/miniconda3/bin/conda init bash

4. Neovim

curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.appimage
chmod u+x nvim-linux-x86_64.appimage
mkdir -p /opt/nvim
mv nvim-linux-x86_64.appimage /opt/nvim/nvim

Put this in bashrc:

export PATH="$PATH:/opt/nvim/"

4. HDF5

Build HDF5 from source, then install to Conda environment:

cmake -S .. -B build -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DHDF5_BUILD_FORTRAN=ON -DHDF5_BUILD_CPP_LIB=ON -DZLIB_USE_EXTERNAL=ON -DHDF5_ENABLE_SZIP_SUPPORT=ON
cmake --build build -j 8
cmake --install build
conda install -c conda-forge cython
pip install --upgrade pip
pip install --upgrade setuptools
HDF5_DIR=$CONDA_PREFIX python -m pip install --no-binary=h5py --no-build-isolation h5py

© Q. Dong Le 2018-2026 All Rights Reserved.