#! /bin/bash # This script installs parallel version of wien2k (version is as specified as xxx in inst_wien2k_xxxx) in a CENTOS 6.3 linux host. # Run this as user, not as su. A directory ~/wien2k will be created. # This script assumes (sequence of installation are important) # 1. intel icc must be installed. This is not absolutely required by wien2k. But icc is required in order to install ifft, intel version of fft. Some include files from ifft are required by wien2k parallel version. icc version 11.0.081 can be conveniently install by running the script http://www2.fizik.usm.my/configrepo/howto/intel/inst_icc. Licence is required. See the icc installation script on how to get the licence. # 2. intel ifort is already installed in /opt/intel/Compiler/11.1/072/bin/intel64 # This version of ifort can be conveniently installed by running the script at http://www2.fizik.usm.my/configrepo/howto/intel/inst_ifort. This script also installs intel mkl in /opt/intel/Compiler/11.1/072/mkl/lib/em64t which is also a must. By default, when running this script, ifftw (see 5 below) will also be installed independently (and automatically) after installation of ifort. The instalation of ifftw would only be successful if icc has already been installed. Note that license is requird to install ifort. See the ifort installation script on how to get the liscence. # 3. intel impi is already installed. In particular, mpiifort is to be found in /opt/intel/impi/3.2.1/bin64/mpiifort. impi can be conveniently installed by running the script at http://www2.fizik.usm.my/configrepo/howto/intel/inst_impi. Note that one needs to obtain licence before the installation and place it in the appropriate directory (usually /opt/intel/licenses) # 4. fftw is already installed. Note that fftw by default refers to fftw2, as there are two types of fftw, namely, fftw and fftw3. For the case of wien2k, fftw(2) is neccessary but not fftw3. fftw2 has to be installed using the script as downloadable at http://www2.fizik.usm.my/configrepo/howto/fftw/inst_fftw215. The version of fftw215 as installed by this script contains libfftw_mpi which is required by wien2k. It turns out that the fftw(2) or fftw3 installed from yum repos or from the fftw3 source page does not seem to contain the required libfftw_mpi. # 5. (OPTIONAL) ifftw (intel fftw) is installed. Somehow in order for wien2k parallel to compile, the include files in /opt/intel/Compiler/11.0/081/mkl/include/fftw are required. The intel fftw can be conveniently installed by running the script http://www2.fizik.usm.my/configrepo/howto/intel/inst_ifftw. But by default, when running the script in (2) above for ifort, ifftw would have been installed by default, so there may be no need to install ifftw again. mkdir ~/wien2k cd ~/wien2k scp tlyoon@www2.fizik.usm.my:/home/tlyoon/repo/wien2k/WIEN2k_12.1.tar . ## password required to download the source file. tar -xvf WIEN2k_12.1.tar gunzip *.gz ./expand_lapw wget http://www2.fizik.usm.my/configrepo/howto/wien2k/ver_12.2/COMPILER wget http://www2.fizik.usm.my/configrepo/howto/wien2k/ver_12.2/COMPILERC wget http://www2.fizik.usm.my/configrepo/howto/wien2k/ver_12.2/COMPILERP wget http://www2.fizik.usm.my/configrepo/howto/wien2k/ver_12.2/OPTIONS_ver_12.2 cp OPTIONS_ver_12.2 OPTIONS ./siteconfig_lapw # During ./siteconfig, when prompted for system option, choose K1 (mkl 11.1 and ifort). Say OK and Save (particularly, say yes to shared memory / configure parallel options). When prompted for compilers or libraries, just press return (accept the default choices). Say NO only to (Re-)Dimension parameters (No need to reset NMATMAX, NUME). When prompted to 'Recompile', choose to recompile all. ./userconfig_lapw # If you are compiling wien2k in chakra, when prompted to creat .rhost in userconfig, just say no. Creat remote hosts later. . ~/.bashrc ## w2web will be configured now. You will be promted for admin and password. If left unasnwered, the default userid will be 'admin', and password will be 'password'. Enter yes to all the prompt. w2web ## In case the default port number 7890 has already been used, simply issue # w2web -p portnumber # where portnumber is any number > 7890 (say 7900) # Launch wien2k web by issuing 'w2web'. Or alternatively, issue e.g., 'firefox http://chakra:7900' # A webbrowser will be fired, with the url e.g., http://chakra:7900 # Bookmark the url for future use. ## Finally, if the compilation does not success, probably its because the libraries path are not specificied in /etc/ld.so.conf. Check what's contain there. On the PC where wien2k parallel has been successfully compiled,the /etc/ld.so.conf file contains these entries #/opt/intel/Compiler/11.1/072/lib/intel64 #/opt/intel/Compiler/11.1/072/mkl/lib/em64t #/usr/local/lib/trace_rlog #/home/common/mpich2-install/lib #/opt/intel/Compiler/11.1/072/lib/intel64 #/opt/intel/Compiler/11.1/072/mkl/lib/em64t #/opt/intel/Compiler/11.1/072/lib/intel64 #/opt/intel/Compiler/11.1/072/mkl/lib/em64t #/opt/intel/impi/3.2.1.009/lib64 #/usr/lib64/openmpi/lib #/usr/local/lib #/usr/local/lib64 # These are libraries path that are needed when compiling wien2k. add these entries to your /etc/ld.so.conf file if they make sense to you system. after modifying the file, you should activate it by issuing 'ldconfig'. Edit the ld.so.conf file only as an su.