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 Pentium 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 network is sufficient. Faster communication is recommended for the fine grain (single k-point) parallel version.
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). None of the principal components of WIEN2k requires these packages, only w2web needs them.
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:
./lapw SRC SRC_afminput SRC_aim SRC_analyse SRC_balsac-utils SRC_clmcopy SRC_dstart SRC_elast SRC_eosfit SRC_filtvec SRC_fsgen SRC_initelnes 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_reformat SRC_sgroup SRC_spacegroup SRC_spaghetti SRC_sumpara SRC_symmetry SRC_telnes SRC_templates SRC_tetra SRC_trig SRC_txspec SRC_usersguide_html 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.
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:
Compilation might take quite some time. After compilation you will find a file compile.msg in each SRC_* directory.
Later on you can use siteconfig_lapw to change parameters, options or to update a package.
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:
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.
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:
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.
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).
Later on you can add/remove users using ``Configuration
edit
accounts ``.
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 w2web has been started, use your favorite WWW-browser to connect to w2web, specifying the correct portnumber, e.g. netscape http://hostname_where_w2web_runs:7890
Using ``Configuration
interface 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.
w2web saves several variables in startup files which are in the (~/.w2web) directory.
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.
w2web creates on the first run the directory .w2web in your home directory with the following content:
This file is created during the first run of w2web, and can be managed from
within ''Session Management
edit accounts'', However now accounts are
not activated until the next start of the w2web-server.
If you remove this file, the next start of w2web will activate the installation procedure again.
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.
If you run w2web-server in ssl-mode you should get a site certificate for your server - in the meantime you can use the supplied certificate in $WIENROOT/SRC_w2web/bin/w2web.pem (by setting the keyfile=... line in your w2web.conf).
This certificate will not expire until 2015. 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.
WIEN2k uses the following environment variables: