NERSCPowering Scientific Discovery Since 1974

WIEN2k

Description

WIEN2k performs electronic structure calculations of solids using density functional theory (DFT). It is based on the full-potential (linearized) augmented plane-wave ((L)APW) + local orbitals (lo) method, one of the most accurate schemes for band structure calculations.

Wien2k is available on Cori, and Edison. One special note for this application is that Wien2k runs under the Cray Cluster Compatibility Mode ONLY. It is important for users to follow the instructions posted here to use Wien2k on NERSC systems.

How to Access Wien2k

NERSC uses modules to manage access to software.  To use the default version of WIEN2k, include the following line:

% module load wien2k-ccm

in your ~/.bashrc.ext or ~/.cshrc.ext files. To see all avaible modules, do

% module avail wien2k-ccm

Using Wien2k on Cori

Update on 7/18/2016: The ssh between compute nodes do not work on Cori, so that Wien2k jobs are not running on Cori. We will put a fix during the maintenance on 7/20/2016. We will update this website once the ssh between compute nodes works again. 

 

Note: Cori has been upgraded to CLE 6.0 which has changed the way Wien2k runs. One important change is that now we do not need CCM to run Wien2k code. We will soon update the website with new instructions. Meanwhile, the old instructions will still work  except you need to remove the #SBATCH --ccm directive in your job script. 

 

 

WIEN2k on Cori and Edison runs under the Cluster Compatibility Mode (CCM). As you may know, the Cori and Edison compute nodes run a stripped-down operating system, the Compute Node Linux (CNL), therefore some of the standard Linux services are not available on the compute nodes, e.g., ssh. WIEN2k needs to use ssh to launch jobs to the remote nodes with its k point parallel execution, therefore it can not run on the Cori and Edison compute nodes by default. The CCM is the Cray's solution to this problem, which provides the standard Linux services on compute nodes, so that WIEN2k runs on Cori and Edison. For more information about the CCM, please refer to our CCM website.

To run Wien2k jobs on Cori, you need to do the following:

1) Loading the wien2k-ccm module in your shell startup file, ~/.bashrc.ext or ~/.cshrc.ext file for Cori, depending on your default shell (~/.cshrc.ext for csh, ~/.bashrc.ext for bash).

module load wien2k-ccm

If you run Wien2k jobs on a single node only, then you do not have to have to load the wien2k-ccm module in the shell startup files. 

2) Using a job script similar to the sample job scripts below to submit batch jobs

Sample job script to run a k point + MPI parallel job on Cori

#!/bin/bash -l
#SBATCH -N 4
#SBATCH -n 128
#SBATCH -t 03:00:00
#SBATCH -p regular
#SBATCH -J test_wien2k
##SBATCH --ccm --note this directive need to be commented out or removed now under CLE 6.0

#module load wien2k-ccm

#generating .machines file for k-point and mpi parallel lapw1/2
let ntasks_per_kgroup=8
gen.machines -m $ntasks_per_kgroup

#need to disable SLURM envs hereafter
unset `env|grep SLURM_|awk -F= '{print $1}'`

#put your Wien2k command here
run_lapw -p -i 2 -ec .0001 -I -in1ef 

#remove leftover .machines file
rm -fr .machine*

 This job script rquests 4 nodes. Note that #SBARCH --ccm must be used for Wien2k jobs to enable the CCM mode. Where the script gen.machines is a NERSC provided script that generates the .machines file for Wien2k parallel execution from the SLURM_JOB_NODELIST environment. ($SLURM_JOB_NODELIST is the nodelist provided allocated to your job). In this example, each kpoint group will use 8 cores to run its mpi parallel execution. Here is more info about how to use this script to generate a desired .machines file.

 Sample job script to run a k point parallel job on Cori

#!/bin/bash -l
#SBATCH -n 64
#SBATCH -t 03:00:00
#SBATCH -p regular
#SBATCH -J test_wien2k
#SBATCH --ccm

#module load wien2k-ccm

#generating .machines file for k-point and mpi parallel lapw1/2
let ntasks_per_kgroup=1
gen.machines -m $ntasks_per_kgroup

#need to disable SLURM envs hereafter
unset `env|grep SLURM_|awk -F= '{print $1}'`

#put your Wien2k command here
run_lapw -p -i 2 -ec .0001 -I -in1ef

#remove leftover .machines file
rm -fr .machine* 

Using W2web on Cori

Note, w2web is currently disabled on Cori due to a security issue. We will let you know when it is re-enabled. 

 

Wien2k on Cori was built with the graphical user interface w2web enabled. To use w2web, you must use a local ssh tunnel for security concern. You should not point a web browser to directly to Cori (Wien2k manual may instruct you to do so), instead you should use a secure local tunnel to forward a given port to it, but it does allow a given local port to be forwarded through a secure local tunnel.

You can use ssh as follows:

ssh -L 46500:localhost:46600 cori.nersc.gov  

After you login, you should load the wien2k module, and then run the w2web application. It will ask you to pick a port number: in this example the port number is 46600. After pointing your web browser to http://localhost:46500, you should be able to see w2web's startup screen.

If you use windows and the F_secure or putty shell client to access Cori, then specify a local tunnel as follows.

Open the F-Secure shell client, and choose Edit-->settings.  This will pop up a settings window, in which you should click add. Another pop-up window will then appear, requesting that you define your local tunnel.  Enter

  • 46500 in the source port field
  • 46600 in the destination field
  • cori.nersc.gov in the destination host field

Using local tunnels with putty is similar, except that for the destination host field you enter cori.nersc.gov:46600 (there is no separate field for the destination port as with F-secure).

Note: the port numbers 46600 and 46500 used here are just examples, you can choose any port number larger than 1024 and less than 65535.

Using Wien2k on Edison

Wien2k also runs under the CCM on Edison, and the steps to run Wein2k on Edison is the same as on Cori. Considering Edison has a different core count per node (24) compared to Cori (32), we list the sample job scripts for Edison separately for your convenience. 

To run Wien2k jobs on Edison, you need to do the following:

1) Loading the wien2k-ccm module in your shell startup file, ~/.bashrc.ext or ~/.cshrc.ext file for Edison, depending on your default shell (~/.cshrc.ext for csh, ~/.bashrc.ext for bash).

module load wien2k-ccm

If you run Wien2k jobs on a single node only, then you do not have to have to load the wien2k-ccm module in the shell startup files. 

2) Using a job script similar to the sample job scripts below to submit batch jobs

Sample job script to run a k point + MPI parallel job on Edison

#!/bin/bash -l
#SBATCH -N 4
#SBATCH -n 96
#SBATCH -t 03:00:00
#SBATCH -p regular
#SBATCH -J test_wien2k
#SBATCH --ccm

#module load wien2k-ccm

#generating .machines file for k-point and mpi parallel lapw1/2
let ntasks_per_kgroup=8
gen.machines -m $ntasks_per_kgroup

#need to disable SLURM envs hereafter
unset `env|grep SLURM_|awk -F= '{print $1}'`

#put your Wien2k command here
run_lapw -p -i 2 -ec .0001 -I -in1ef 

#remove leftover .machines file
rm -fr .machine*

 This job script rquests 4 nodes to run a Wien2k job. Note that #SBARCH --ccm must be used for Wien2k jobs to enable the CCM mode. The script gen.machines is a NERSC provided script that generates the .machines file for Wien2k parallel execution from the SLURM_JOB_NODELIST environment. ($SLURM_JOB_NODELIST is the nodelist provided allocated to your job). In this example, each kpoint group will use 8 cores to execute its mpi parallel execution. Here is more info about how to use this script to generate a desired .machines file.

 Sample job script to run a k point parallel job on Edison

#!/bin/bash -l
#SBATCH -N 4
#SBATCH -n 96
#SBATCH -t 03:00:00
#SBATCH -p regular
#SBATCH -J test_wien2k
#SBATCH --ccm

#module load wien2k-ccm

#generating .machines file for k-point and mpi parallel lapw1/2
let ntasks_per_kgroup=1
gen.machines -m $ntasks_per_kgroup

#need to disable SLURM envs hereafter
unset `env|grep SLURM_|awk -F= '{print $1}'`

#put your Wien2k command here
run_lapw -p -i 2 -ec .0001 -I -in1ef 

#remove leftover .machines file
rm -fr .machine*

Using W2web on Edison

Note, w2web is currently disabled on Edison due to a security issue. We will let you know when it is re-enabled.

 

Wien2k on Edison was built with the graphical user interface w2web enabled. To use w2web, you must use a local ssh tunnel for security concern. You should not point a web browser to directly to Edison (Wien2k manual may instruct you to do so), instead you should use a secure local tunnel to forward a given port to it, but it does allow a given local port to be forwarded through a secure local tunnel.

You can use ssh as follows:

ssh -L 46500:localhost:46600 edison.nersc.gov  

After you login, you should load the wien2k module, and then run the w2web application. It will ask you to pick a port number: in this example the port number is 46600. After pointing your web browser to http://localhost:46500, you should be able to see w2web's startup screen.

If you use windows and the F_secure or putty shell client to access Edison, then specify a local tunnel as follows.

Open the F-Secure shell client, and choose Edit-->settings.  This will pop up a settings window, in which you should click add. Another pop-up window will then appear, requesting that you define your local tunnel.  Enter

  • 46500 in the source port field
  • 46600 in the destination field
  • edison.nersc.gov in the destination host field

Using local tunnels with putty is similar, except that for the destination host field you enter edison.nersc.gov:46600 (there is no separate field for the destination port as with F-secure).

Note: the port numbers 46600 and 46500 used here are just examples, you can choose any port number larger than 1024 and less than 65535.

Documentation

Wien2k was developed at the Institute for Materials Chemistry at the Technical University, Vienna. The Wien2k Textbooks website has a detailed description of the electronic structure methods available in Wien2k, and a set of technical notes. The Wien2k Users Manual is particularly useful.

Availability

PackagePlatformCategoryVersionModuleInstall DateDate Made Default
WIEN2k cori applications/ material sciences 14.2 wien2k-ccm/14.2 2015-11-16 2016-07-01
WIEN2k cori applications/ material sciences 14.2.debug wien2k-ccm/14.2.debug 2016-02-25
WIEN2k edison applications/ material sciences 14.2 wien2k-ccm/14.2 2015-01-06 2016-08-31
WIEN2k edison applications/ material sciences 14.2.debug wien2k-ccm/14.2.debug 2015-09-21
WIEN2k edison applications/ material sciences 14.2.test wien2k-ccm/14.2.test 2015-11-03