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 Carver with both the serial and parallel versions.

How to Access Wien2k

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

% module load wien2k

in your .profile.ext or .login.ext files.

Using Wien2k on Carver

A sample job script for k-point parallel execution of Wien2k is as follows:

#PBS -l nodes=1:ppn=8,walltime=00:03:00
#PBS -q interactive
#PBS -j oe
#PBS -N test_wien2k

cd $PBS_O_WORKDIR

module load wien2k

#example for k-point parallel lapw1/2
echo '#' > .machines
echo 'granularity:1' >>.machines
awk '{print "1:"$1":1"}' $PBS_NODEFILE >>.machines
echo 'extrafine:1' >>.machines

#define here your Wien2k command
run_lapw -p -i 40 -ec .0001 -I

A sample job script to run a mixed k-point and MPI parallel execution of Wien2k is as follows:

#PBS -S /bin/csh
#PBS -l nodes=6:ppn=8,walltime=00:30:00
#PBS -q system
#PBS -j oe
#PBS -N test_wien2k

module load wien2k

cd $PBS_O_WORKDIR
limit vmemoryuse unlimited

#set how many cores to be used for each mpi job
set mpijob=6

set proclist=`cat $PBS_NODEFILE `
echo $proclist
set nproc=$#proclist
echo number of processors: $nproc

#---------- writing .machines file ------------------
echo '#' > .machines
# example for an MPI parallel lapw0
#echo -n 'lapw0:' >> .machines
#set i=1
#
#while ($i <= $nproc )
#  echo -n "$proclist[$i] " >>.machines
#  @ i = $i + 1
#  # remove comment when you want to use only every second core for lapw0mpi (memory-limitations)
#  ####@ i = $i + 1
#end
#echo ' ' >>.machines

#example for k-point and mpi parallel lapw1/2
set i=1
while ($i <= $nproc )
  echo -n '1:' >>.machines
  @ i1 = $i + $mpijob
  @ i2 = $i1 - 1
  echo $proclist[$i-$i2] >>.machines
  set i=$i1
end
echo 'granularity:1' >>.machines
echo 'extrafine:1' >>.machines
echo 'lapw2_vector_split:1 ' >>.machines
# --------- end of .machines file

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

Using W2web on Carver

Wien2k on Carver is built with the graphical user interface w2web enabled. To use w2web, you need to use a local ssh tunnel. Carver doesn't allow a web browser to directly point 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 carver.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 examle 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 Carver, 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
  • carver.nersc.gov in the destination host field

Using local tunnels with putty is similar, except that for the destination host field you enter carver.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 Hopper

WIEN2k on Hopper runs under Cluster Compatibility Mode. As you may know, the Hopper compute nodes run a stripped down operating system, the Compute Node Linux (CNL), therefore some of the standard Linux services are not available on Hopper compute nodes. WIEN2k needs to use ssh to lanch jobs to the remote nodes in the kpoint parallel execution,  therefore it couldnt run on Hopper in the past due to ssh was not supported on the Hopper compute nodes. Now with the Cray Cluster Compatibility Mode (CCM) which provides the standard Linux services on Hopper compute nodes,  WIEN2k runs on Hopper. For more details about using CCM on Hopper, please visit our CCM website.

To run Wien2k jobs under CCM, you need to add the following in your .cshrc.ext file under the if bolck for hopper.

module swap PrgEnv-pgi PrgEnv-intel
module load openmpi_ccm
module load wien2k_ccm

Here is a smaple job script to run kpoint + MPI parallel jobs under Hopper CCM. In this example, 12 cores are used to run each mpi job (lapw1/2).

#PBS -S /bin/csh
#PBS -l mppwidth=96,walltime=03:00:00
#PBS -q ccm_queue
#PBS -j oe
#PBS -N test_wien2k

module load wien2k_ccm
module load ccm
setenv CRAY_ROOTFS DSL

cd $PBS_O_WORKDIR
rm -f *.broyd*
limit vmemoryuse unlimited

set mpijob=12

set proclist=`cat $PBS_NODEFILE `
echo $proclist
set nproc=$#proclist
echo number of processors: $nproc

#---------- writing .machines file ------------------
echo '#' > .machines
# example for an MPI parallel lapw0
#echo -n 'lapw0:' >> .machines
#set i=1
#
#while ($i <= $nproc )
#  echo -n "$proclist[$i] " >>.machines
#  @ i = $i + 1
#  # remove comment when you want to use only every second core for lapw0mpi (memory-limitations)
#  ####@ i = $i + 1
#end
#echo ' ' >>.machines

#example for k-point and mpi parallel lapw1/2
set i=1
while ($i <= $nproc )
  echo -n '1:' >>.machines
  @ i1 = $i + $mpijob
  @ i2 = $i1 - 1
  echo $proclist[$i-$i2] >>.machines
  set i=$i1
end
echo 'granularity:1' >>.machines
echo 'extrafine:1' >>.machines
echo 'lapw2_vector_split:1 ' >>.machines
# --------- end of .machines file

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

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 carver applications/ material sciences 10.1 wien2k/10.1 2010-10-05 2011-02-22
WIEN2k carver applications/ material sciences 10.1.debug wien2k/10.1.debug 2012-01-13
WIEN2k carver applications/ material sciences 10.1.test wien2k/10.1.test 2012-01-13
WIEN2k carver applications/ material sciences 11.1 wien2k/11.1 2012-01-13 2012-03-07
WIEN2k carver applications/ material sciences 2009.2 wien2k/2009.2 2010-02-27
WIEN2k carver applications/ material sciences 2009.2.test wien2k/2009.2.test 2012-01-13
WIEN2k edison applications/ material sciences 11.1 wien2k-ccm/11.1 2013-02-15 2013-02-15
WIEN2k edison applications/ material sciences 12.1 wien2k-ccm/12.1 2013-02-19 2013-02-19
WIEN2k hopper applications/ material sciences 11.1 wien2k_ccm/11.1 2012-03-29 2012-03-29
WIEN2k hopper applications/ material sciences 11.1.test wien2k_ccm/11.1.test 2013-02-15
WIEN2k hopper applications/ material sciences 11.1_ccm wien2k/11.1_ccm 2012-01-21 2012-01-21