Skip to content

Elk

Elk

An all-electron full-potential linearised augmented-plane wave (LAPW) code with many advanced features. Written originally at Karl-Franzens-Universität Graz as a milestone of the EXCITING EU Research and Training Network, the code is designed to be as simple as possible so that new developments in the field of density functional theory (DFT) can be added quickly and reliably. The code is freely available under the GNU General Public License.

Usage

Elk module

Elk has to be loaded using Lmod prior to running it.

$ module load Elk

Once the module has been loaded you will need to set some enviroment variables:

You can also list all available versions using Lmod's spider command:

$ module spider Elk
---------------------------------------------------------
  Elk:
---------------------------------------------------------
     Versions:
        Elk/4.3.6-intel-2017b-hybrid
        Elk/4.3.6-intel-2017b-mt
        Elk/4.3.6-intel-2017b
        Elk/5.2.14-intel-2017b-hybrid
        Elk/5.2.14-intel-2017b-mt
        Elk/5.2.14-intel-2017b
        Elk/6.8.4-intel-2019b-hybrid
        Elk/6.8.4-intel-2019b-mt
        Elk/6.8.4-intel-2019b

---------------------------------------------------------
  For detailed information about a specific "Elk" module 
  (including how to load the modules) use the module's full name.
  For example:

     $ module spider Elk/6.8.4-intel-2019b
---------------------------------------------------------

There are three different compilations for Elk depending on the type of parallelism they exhibit:

  • Suffixed by -hybrid: These compilations are both MPI and OpenMP capable.
  • Suffixed by -mt: These compilations are only OpenMP capable and jobs using this version can only be single-node.
  • Non-suffixed: These compilations are only MPI capable.

Software version

Here you can check the available versions for Elk in the different clusters

Elk/4.3.6-intel-2017b-hybrid
Elk/4.3.6-intel-2017b-mt
Elk/4.3.6-intel-2017b
Elk/5.2.14-intel-2017b-hybrid
Elk/5.2.14-intel-2017b-mt
Elk/5.2.14-intel-2017b
Elk/6.8.4-intel-2019b-hybrid
Elk/6.8.4-intel-2019b-mt
Elk/6.8.4-intel-2019b
Elk/7.2.42-foss-2021a
Elk/6.3.2-intel-2019b
Elk/7.2.42-foss-2021a

How to run Elk

Submission scripts should contain the following lines to run Elk:

Batch script for a threaded (OpenMP) execution of Elk
#!/bin/bash
#SBATCH --qos=regular
#SBATCH --job-name=Elk_job
#SBATCH --mem=200gb
#SBATCH --cpus-per-task=48
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --output=%x-%j.out
#SBATCH --error=%x-%j.err

module load Elk/6.8.4-intel-2019b-mt

export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK 

elk 
Batch script for a distributed (MPI) execution of Elk
#!/bin/bash
#SBATCH --qos=regular
#SBATCH --job-name=Elk_job
#SBATCH --mem=200gb
#SBATCH --cpus-per-task=1
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=48
#SBATCH --output=%x-%j.out
#SBATCH --error=%x-%j.err

module load Elk/6.8.4-intel-2019b

srun --cpu-bind=cores elk 

Highest efficiency is obtained by using hybrid parallelism with OpenMP on each node and MPI across nodes. At runtime set export OMP NUM THREADS=$SLURM_CPUS_PER_TASK and start the MPI run with one process per node.

Batch script for a hybrid (MPI + OpenMP) execution of Elk
#!/bin/bash
#SBATCH --qos=regular
#SBATCH --job-name=Elk_job
#SBATCH --mem=200gb
#SBATCH --cpus-per-task=6
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=8
#SBATCH --output=%x-%j.out
#SBATCH --error=%x-%j.err

module load Elk/6.8.4-intel-2019b-hybrid

# Number of threads to be used per process
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK 

# We will place 8 process per node (2 nodes total) and use a total of 16 processes
# Each process will create 6 threads.
srun elk