CONQUEST-release
CONQUEST-release copied to clipboard
Instructions for installation (Ubuntu/WSL)
At present, there is an installation
section in the documentation, which describes how to compile the code in general.
However, it would be convenient and attractive for new users to have specific sections dedicated to specific systems besides the HPC ones, for instance MacOS, Linux or Windows. In particular, recent versions of Windows (10 and 11) have the Windows Subsystem for Linux, allowing for seamless use of a Linux virtual machine.
Here, we propose a detailed procedure to install required packages and compile CONQUEST on Ubuntu. The following have been tested so far:
- Works on Ubuntu, including with WSL in Windows [Ubuntu 22.04 and Windows 10/11 tested]
- Enables using CONQUEST in Windows through WSL (including MPI)
- Install packages
sudo apt update
sudo apt upgrade
sudo apt install -y build-essential # gcc and other tools for software development
sudo apt install -y openmpi-bin libopenmpi-dev # MPI
sudo apt install -y libfftw3-dev # FFT
sudo apt install -y libblas-dev liblapack-dev libscalapack-openmpi-dev # Linear algebra
- Install libxc
mkdir -p $HOME/local/src
cd $HOME/local/src
wget http://www.tddft.org/programs/libxc/down.php?file=6.2.2/libxc-6.2.2.tar.gz -O libxc.tar.gz
tar -zxf libxc.tar.gz
cd libxc-6.2.2 && ./configure --prefix=$HOME/local
make -j4
make check && make install
- Get CONQUEST source
cd $HOME/local/src
git clone https://github.com/OrderN/CONQUEST-release.git conquest_master
cd conquest_master/src
- Copy the appropriate system.make makefile
To be provided as system.make.ubuntu or some similar name
#
# Set compilers
FC=mpif90
F77=mpif77
# Linking flags
LINKFLAGS= -L\${HOME}/local/lib -L/usr/local/lib -fopenmp
ARFLAGS=
# Compilation flags
# NB for gcc10 you need to add -fallow-argument-mismatch
COMPFLAGS= -O3 \$(XC_COMPFLAGS) -fallow-argument-mismatch
COMPFLAGS_F77= \$(COMPFLAGS)
# Set BLAS and LAPACK libraries
# MacOS X
# BLAS= -lvecLibFort
# Intel MKL use the Intel tool
# Generic
BLAS= -llapack -lblas
# Full library call; remove scalapack if using dummy diag module
LIBS= \$(FFT_LIB) \$(XC_LIB) -lscalapack-openmpi \$(BLAS)
# LibXC compatibility (LibXC below) or Conquest XC library
# Conquest XC library
#XC_LIBRARY = CQ
#XC_LIB =
#XC_COMPFLAGS =
# LibXC compatibility
# Choose LibXC version: v4 (deprecated) or v5/6 (v5 and v6 have the same interface)
# XC_LIBRARY = LibXC_v4
XC_LIBRARY = LibXC_v5
XC_LIB = -lxcf90 -lxc
#XC_COMPFLAGS = -I/usr/local/include
XC_COMPFLAGS = -I\${HOME}/local/include -I/usr/local/include
# Set FFT library
FFT_LIB=-lfftw3
FFT_OBJ=fft_fftw3.o
# Matrix multiplication kernel type
MULT_KERN = default
# Use dummy DiagModule or not
DIAG_DUMMY =
- Compile CONQUEST
dos2unix ./makedeps # Some windows/unix incompatibilities may occur
make -j4 # Or make -j`nproc` # Uses all cores available
This could also be useful for Windows/Ubuntu users at tutorial/hands-on sessions.
Any feedback is welcome.
Thank you.