Elk FP-LAPW on Ubuntu
This guide will help the user understand how to compile, install, and use ELK on their own Ubuntu workstation. If you are using another platform, please refer to the appropriate documentation or contact Benjamin Alldritt for assistance.
Step-by-step guide
Requirements
To compile Elk, you will need the following software:
- Fortran compiler (gfortran)
- C compiler (gcc)
- MPI
- FFTW
- LAPACK
- BLAS
- Libxc
Instructions
Ubuntu 12.04 (64 bit)
Install the required packages:
sudo apt-get install gfortran libmpich2-dev liblapack-dev libblas-dev libfftw3-devDownload the latest version of the Elk source code and unpack into a new directory.
mkdir ${HOME}/software
mkdir ${HOME}/software/elk
cd ${HOME}/software/elk
wget -O elk-2.3.22.tgz http://sourceforge.net/projects/elk/files/elk-2.3.22.tgz/download
tar -xvzf elk-2.3.22.tgzDownload the latest version of the Libxc source code and unpack into a new directory.
mkdir ${HOME}/software/libxc
cd ${HOME}/software/libxc
wget libxc-2.2.0.tar.gz http://www.tddft.org/programs/octopus/download/libxc/libxc-2.2.0.tar.gz
tar -xvzf libxc-2.2.0.tar.gz
cd libxc-2.2.0Configure, build, and install Libxc.
./configure --prefix=${HOME}/software/libxc LIBS=-lm
make
make installCreate a file with the name make.inc and copy the following into the empty file
cd ${HOME}/software/elk/elk-2.3.22
nano make.inc# make.inc - Ubuntu 12.04 64 bit
# Compiler Flags
MAKE = make
F90 = mpif90
F90_OPTS = -O3 -m64 -ffast-math -funroll-loops -fopenmp
F77 = mpif90
F77_OPTS = -O3 -m64 -ffast-math -funroll-loops -fopenmp
AR = ar
LIB_SYS =
# LAPACK and BLAS library locations
LIB_LPK = lapack.a blas.a
# MPI Settings
SRC_MPI =
# FFTW Settings
SRC_FFT = zfftifc_fftw.f90
LIB_FFT = -L/usr/lib -lfftw3_threads -lfftw3
# LibXC Settings
LIB_libxc = ${HOME}/software/libxc/lib/libxcf90.a ${HOME}/software/libxc/lib/libxc.a
SRC_libxc = libxc_funcs.f90 libxc.f90 libxcifc.f90Compile, test, and run Elk.
make
make test
./src/elk <input file>
Ubuntu 14.04 (64 bit)
Install the required packages:
sudo apt-get install gfortran libmpich2-dev liblapack-dev libblas-dev libfftw3-dev libxc-devDownload the latest version of the Elk source code and unpack into a new directory.
mkdir ${HOME}/software
mkdir ${HOME}/software/elk
cd ${HOME}/software/elk
wget -O elk-2.3.22.tgz http://sourceforge.net/projects/elk/files/elk-2.3.22.tgz/download
tar -xvzf elk-2.3.22.tgzDownload the latest version of the Libxc source code and unpack into a new directory.
mkdir ${HOME}/software/libxc
cd ${HOME}/software/libxc
wget libxc-2.2.0.tar.gz http://www.tddft.org/programs/octopus/download/libxc/libxc-2.2.0.tar.gz
tar -xvzf libxc-2.2.0.tar.gz
cd libxc-2.2.0Configure, build, and install Libxc.
./configure prefix=${HOME}/software/libxc LIBS=-lm
make
make installCreate a file with the name make.inc and copy the following into the empty file
cd ${HOME}/software/elk/elk-2.3.22
nano make.inc# make.inc - Ubuntu 14.04 64-bit
# Compiler Flags
MAKE = make
F90 = mpif90
F90_OPTS = -O3 -m64 -ffast-math -funroll-loops -fopenmp
F77 = mpif90
F77_OPTS = -O3 -m64 -ffast-math -funroll-loops -fopenmp
AR = ar
LIB_SYS =
# LAPACK and BLAS library locations
LIB_LPK = lapack.a blas.a
# MPI Settings
SRC_MPI =
# FFTW Settings
SRC_FFT = zfftifc_fftw.f90
LIB_FFT = -L/usr/lib/x86_64-linux-gnu -lfftw3_threads -lfftw3
# LibXC Settings
LIB_libxc = ${HOME}/software/libxc/lib/libxcf90.a ${HOME}/software/libxc/lib/libxc.a
SRC_libxc = libxc_funcs.f90 libxc.f90 libxcifc.f90Compile, test, and run Elk.
make
make test
./src/elk <input file>
Related articles
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
Unknown macro: contentbylabel. Click on this message for details.