next up previous contents
Next: 12 Trouble shooting Up: 3 Installation of the Previous: 3 Installation of the   Contents

Subsections


11 Installation and Dimensioning


1 Requirements

WIEN2k is written in FORTRAN 90 and requires a UNIX operating system since the programs are linked together via C-shell scripts. It has been implemented successfully on the following computer systems: Intel and AMD based PCs running under Linux, IBM RS6000, HP, SGI, DEC Alpha and SUN. Hardware requirements will change from case to case (small cases with 10 atoms per unit cell can be run on a Pentium-II PC with 128 MB under Linux), but we recommend a more powerful PC or workstation with at least 256 MB (better 512 MM or more) memory and plenty of disk space (a few Gb).

For coarse grain parallization on the k-point level, a cluster of PCs with a 100 Mb/s (better 1Bg/s) network is sufficient. Faster communication (Infiniband) is recommended for the fine grain (single k-point) parallel version.

For Intel (AMD) based systems we recommend the Intel ifort compiler and the Intel mkl library (which includes blas, lapack and Scalapack) (see http://www.intel.com). If you have installed ifort yourself on your local PC, don't forget to configure your environment properly. Add some thing like:

source /opt/intel/11.0/074/bin/ifortvars.csh intel64
source /opt/intel/11.0/074/mkl/tools/environment/mklvarsem64t.csh
to your .cshrc file (or similar statements for .bashrc).

In order to use all options and features (such as the new graphical user interface w2web or some of its plotting tools) the following public domain program packages in addition to a F90 compiler must be installed:

Usually these packages should be available on modern systems. If one of these packages is not available it can either be installed from public domain sources (ask your computing center, use the WWW to search for the nearest location of these packages) or the corresponding configuration may be changed (e.g. using vi instead of emacs). Brief installation instructions for mpich and fftw are given below. None of the principal components of WIEN2k requires these packages, only w2web needs them.

1 Installation tips for mpich and fftw-2.1.5

This is only a brief guidance, you may need some Linux experience for this.


2 Installation of WIEN2k


1 Expanding the WIEN2k distribution

The WIEN2k package comes as a single tar file (or you can download about 50 individual tar files separately), which should be placed in a subdirectory which will be your $WIENROOT directory (e.g. ./WIEN2k). In addition you can download three examples, namely TiC.tar.gz, TiO2.tar.gz and Fccni.tar.gz.

Uncompress and expand all files using:

tar -xvf wien2k_00.tar (skip this if you downloaded files separately)
gunzip *.gz
chmod +x ./expand_lapw
./expand_lapw

You should have gotten the following directories:

./SRC
  SRC_2Doptimize
  SRC_afminput 
  SRC_aim
  SRC_arrows
  SRC_balsac-utils
  SRC_broadening
  SRC_cif2struct
  SRC_clmaddsub
  SRC_clmcopy
  SRC_dipan
  SRC_dstart
  SRC_elast
  SRC_eosfit
  SRC_eosfit6
  SRC_filtvec
  SRC_fsgen
  SRC_initxspec
  SRC_irrep
  SRC_joint
  SRC_kgen
  SRC_kram
  SRC_lapw0
  SRC_lapw1
  SRC_lapw2
  SRC_lapw3
  SRC_lapw5
  SRC_lapw7
  SRC_lapwdm
  SRC_lapwso
  SRC_lcore
  SRC_lib
  SRC_lorentz
  SRC_lstart
  SRC_mini
  SRC_mixer
  SRC_nn
  SRC_optic
  SRC_optimize
  SRC_orb
  SRC_pairhess
  SRC_phonon
  SRC_qtl
  SRC_reformat
  SRC_sgroup
  SRC_spacegroup
  SRC_spaghetti
  SRC_structeditor
  SRC_sumpara
  SRC_supercell
  SRC_symmetry
  SRC_symmetso
  SRC_telnes2
  SRC_templates
  SRC_tetra
  SRC_trig
  SRC_txspec
  SRC_usersguide_html
  SRC_vecpratt
  example_struct_files
  TiC
  TiO2
  fccni

Thus, each program has its source code (split into several files) in its own subdirectory. All programs are written in FORTRAN90 (except SRC_sgroup and SRC_reformat, which are in C).

/SRC contains the users guide (in form of a postscript file usersguide.ps and as pdf-file usersguide.pdf), all c-shell scripts and some auxiliary files.

/SRC_usersguide_html contains the html version of the UG.

/Fccni, /TiC and /TiO2 contain three example inputs and the respective outputs.

/example_struct_files contains a collection of various struct files, which could be of use especially for the less experienced user.

/SRC_templates contains various input templates.

In addition to the expansion of the tar-files ./expand_lapw copies also all csh-shell scripts from /SRC to the current directory and creates links for some abbreviated commands.


2 Site configuration for WIEN2k

At the end of expand_lapw you will be prompted to start the script

./siteconfig_lapw

When you start this script for the first time (file INSTALLDATE not present), you will be guided through the setup process.

Later on you can use siteconfig_lapw to redimension parameters, update individual packages and recompile the respective programs.

During the first run, you will be asked to specify:

Later on you can use siteconfig_lapw to change parameters, options or to update a package.


3 User configuration

Each WIEN2k user should run the script userconfig_lapw. This will setup a proper environment.

The script userconfig_lapw will do the following for you:

to your ~/.cshrc or~/.bashrc file. Eventually you should also edit these files and set the $LD_LIBRARY_PATH variable (path where compiler-libs or blas-libraries are located).

Note: This will work only when the csh, tcsh or bash-shell is your login shell. Depending on your settings you may have to add similar lines also in your .login file. If you are using a different login-shell, edit your startup files manually.


4 Performance and special considerations

The script siteconfig_lapw is provided for general configuration and compilation of the WIEN2k package. When you call this script for the first time and follow the suggested answers, WIEN2k should run on your system (see 11.2.2).

The codes in the individual subdirectories /SRC_program are compiled using make. The file Makefile is generated during installation using Makefile.orig as template.

In some directories the source files *.frc, *.F and param.inc_r/c contain both, the real and complex (for systems without inversion symmetry) version of the code. You create the coresponding versions with make and make complex, respectively. (The *.frc and *.F files will then be preprocessed automatically).

The fine-grained parallel versions lapw0_mpi; lapw1_mpi, lapw1c_mpi, lapw2_mpi, lapw2c_mpi are created using make para (lapw0) and make rp; make cp.

For timing purposes a subroutine CPUTIM is used in several programs and specific routines for IBM-AIX, HP-UX, DEC-OSF1, SGI and SUN are available. On other systems cputim_generic.c should work.

On some HP systems you may encounter problems like: ``stack growth failure''. You may recompile with -K, reconfigure your Unix-kernel (with increased stack-size) or put large arrays in the respective program into COMMONS.

Most of the CPU time will be spent in lapw1 and (to a smaller extent) in lapw2 and lapw0. Therefore we recommend to optimize the performance for these 3 programs:


5 Global dimensioning parameters

WIEN2k is written in Fortran 90 and all important arrays are allocated dynamically. The only important parameters left are NMATMAX and NUME, specifying the maximum matrixsize (should be adjusted to the memory of your hardware, see above) and the maximum number of eigenvalues (must be increased for unitcells with large number of electrons)

Some less important parameters are still present and described in chapter ``dimensioning parameters`` of the respective section in chapter 6.

We recommend to use siteconfig_lapw for redimensioning and recompilation. In order to work properly, the parameter XXXX in the respective param.inc files must obey the following syntax:

      PARAMETER(XXXX= ....)

Note: between ``(``, XXXX and ``='' there must be no space.


3 Installation and Configuration of w2web

1 General issues

w2web requires perl, which should be available on most systems. (If not contact your system administrator or install it yourself from the WWW)

When you start w2web for the first time on the computer where you want to execute WIEN2k (you may have to telnet, ssh,.. to this machine) with the command w2web [-p xxxx], you will be asked for a username/password (I recommend you use the same as for your UNIX login).

You must also specify a ``port'' number (which can be changed the next time you start w2web). If the default port (7890) used to serve the interface is already in use by some other process, you will get the error message w2web failed to bind port 7890 - port already in use!. Then you will have to choose a different port number (between 1024 and 65536) . Please remember this port number, you need it when connecting to the w2web server.

Note: Only user root can specify port numbers below 1024!

Once w2webhas been started, use your favorite WWW-browser to connect to w2web, specifying the correct portnumber, e.g. firefox http://hostname_where_w2web_runs:7890

On certain sites a firewall may block all high ports and one cannot connect to this machine. In these cases you can create a ssh-tunnel using the following commands:

At your ``local_host'' (the PC in front of you) connect to the ``w2web_host'' (where you started w2web) using

   ssh -fNL 2000:w2web_host:7890 user@w2web_host
On your local host use a web browser and connect with: firefox http:127.0.0.1:2000.

Using ``Configuration '' you can further tailor the behaviour according to your wishes. In particular you can define new ``execution types'' to adjust to your queuing system.

For example the line

   batch=batch < %f
defines an execution type ``batch'' using the UNIX batch command. (w2web collects its commands in a temporary script and you can access it using %f).

If you run on a machine with a queuing system (like loadleveler, sun-grid-engine, or pbs) you may define an ``execution type''

   qsub=cat %f > w2web-job;qsub-wienjob_lapw 
The following scripts may serve as templates: qsub-wienjob_lapw in $WIENROOT needs a master-job-template qsub-job0_lapw and examples for loadleveler and SGE are provided in $WIENROOT (you may need to adapt them ! Other examples you can find on our FAQ-page on the web). Of course, with some small modifications you can define several ``execution types'' with eg. different number of processors or mpi vs. k-point parallel runs,....

w2web saves several variables in startup files which are in the (~/.w2web) directory.

2 How does w2web work?

w2web acts like a normal web-server - except that it runs on a ''user level port'' instead of the default http-port 80. It serves html-files and executes perl-scripts or executes system or user commands on the server host.

3 w2web-files in you home directory

w2web creates on the first start of w2web on host ``hostname'' the directory .w2web/hostname in your home directory with the following content:

4 The configuration file conf/w2web.conf

In this file various configuration parameters are stored by w2web. To restrict the access to certain IP addresses you can add lines like:

deny=*.*.*.*   
allow=128.130.134.* 128.130.142.10

5 The password file conf/w2web.users

This file is created during the first run of w2web.

If you remove this file, the next start of w2webwill activate the installation procedure again.

6 Using the https-protocol with w2web

In order to use the https-protocol the perl-library Net::SSLeay in addition to the OpenSSL package must be installed on your system. Both are freely available.

Then you must include a line with ssl=1 in w2web.conf.

If you run w2web-server in ssl-mode you need a site certificate for your server. You may use the supplied certificate in $WIENROOT/SRC_w2web/bin/w2web.pem (copy this file to your conf-directory and set the keyfile= /.w2web/<hostname>/conf/w2web.pem line in your w2web.conf).

This certificate will not expire until 2015, but usually browsers will complain that they do not know the Certificate Authority who issued this certificate - if you don't like this message, you must buy a certificate from VeriSign, Thawte or a similar CA.

Of course you must connect to https: instead of http:, i.e. use:

netscape https://hostname_where_w2web_runs:7890.

4 Environment Variables

WIEN2k uses the following environment variables:

WIENROOT
base directory where WIEN2k is installed
PDFREADER
specifies program to read pdf files (acroread, xpdf,...)
SCRATCH
directory where case.vector and case.help?? are stored.
EDITOR
path and name of your prefered editor
STRUCTEDIT_PATH
path where the structeditor tool is located
OCTAVE_PATH
path where the structeditor tool is located
OCTAVE_EXEC_PATH
path where octave looks for executables (structeditor)
XCRYSDEN_TOPDIR
if this variable is set WIEN2k will activate all interface extensions to XCrysDen.
USE_REMOTE
[0$\vert$1] determines whether parallel jobs are run in background (on shared memory machines) or using rsh. It is overridden by settings in $WIENROOT/parallel_options
WIEN_GRANULARITY
Default granularity for parallel execution. It is overridden by setting the granularity in the .machines file or in $WIENROOT/parallel_options
WIEN_EXTRAFINE
if set, the residual k-points are spread one by one over the processors.

In addition on some systems variables like:

LD_LIBRARY_PATH
path to libraries of compiler and math-libs
OMP_NUM_THREADS
on multi-core machines for parallelization in certain libraries (mkl, goto)


next up previous contents
Next: 12 Trouble shooting Up: 3 Installation of the Previous: 3 Installation of the   Contents
pblaha 2011-03-22