====== 条件 ======
以下のソフトを事前にインストールしてください。
* tcsh
* XCrySDen
* FFTW3(MPI版)
* Libxc
* C/C++とFortranのコンパイラ。Intel Parallel Studio XE 推奨
tcshなどはaptで手に入ります。
$ sudo apt install tcsh
====== 手順 ======
有料ソフトなので、当然ですが事前に購入する必要があります。
* http://susi.theochem.tuwien.ac.at/order/
商用だと50万円くらいしますが、アカデミック版は5万円くらいで買えます。
===== コンパイル(Ubuntu18.04 + WIEN2k_17.1 + Intel Parallel Studio XE 2018) =====
配布されているプログラムをコンパイルします。
[[http://susi.theochem.tuwien.ac.at/reg_user/index.html|WIEN2k-Registered Users]]
* WIEN2k_17.1.tarを入手し、インストールするフォルダに入れる
* インストールするフォルダに入って、HPの手順通りに実行するとコードが展開される
$ tar -xvf WIEN2k_17.1.tar
$ gunzip *.gz
$ chmod +x expand_lapw
$ ./expand_lapw
* continue (y/n) y
* (Intelコンパイラを使う場合)siteconfig を開いて -openmp を -qopenmp に修正する
* (Libxcがインストールされていて、かつver.4以降を使う場合)/SRC_lapw0/libxc.f を開いて、下のページのものに置き換える
* [[https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16924.html]]
* コンパイルの設定を行う。[Press RETURN to continue][Hit Enter to continue]はEnterを押すだけなので省略
$ ./siteconfig
* もしも Word too long. と表示されて実行できなかったら、siteconfigをvimなどで開いて最初の行を #!/bin/tcsh -f に変更する。
* https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16030.html
- Specify a system
- [Selection:] LI
- Specify Compiler
- [Your compiler:] ifort
- [Your compiler:] (GNUコンパイラを使う場合)cc (Intelコンパイラを使う場合) icc
- [Would you like to use LIBXC (that you have installed)? (y,N):] y
- [Do you want to automatically search for LIBXC installations? (Y,n):] Y
- [Please specify a comma separated list of directories to search! (If no list is entered, /usr/local and /opt will be searched as default):] /opt/
- [Is this the correct directory? (Y,n):] y
- Compiling Options (Compiler/Linker, Libraries)
- [To change an item select option. Selection:] S
- Configure Parallel Execution
- [Shared Memory Architecture? (y/N):] y
- [(like taskset -c). Enter N / your_specific_command:] N
- [Do you have MPI, ScaLAPACK, ELPA, or FFTW installed and intend to run finegrained parallel? ... (y/N)] y
- [Your compiler:] mpiifort
- [Do you want to use a present ScaLAPACK installation? (Y,n):] y
- [Do you want to use the MKL version of ScaLAPACK? (Y,n):] y
- [Do you use Intel MPI? (Y,n):] y
- [Is this correct? (Y,n):] y
- [Do you want to use a present FFTW installation? (Y,n):] y
- [Do you want to automatically search for FFTW installations? (Y,n):] n
- [Please specify whether you want to use FFTW3 (default) or FFTW2 (FFTW3 / FFTW2):] FFTW3
- [Please specify the path of your FFTW installation (like /opt/fftw3/) or accept present choice (enter):] (FFTW3のインストールディレクトリを入力。例えば /usr/local/ など)
- [Please specify the target achitecture of your FFTW library (e.g. lib64) or accept present choice (enter):] Enter
- [Please specify the name of your FFTW library or accept present choice (enter):] Enter
- [Is this correct? (Y,n):] y
- [Do you want to use ELPA? (y,N):] n
- [Please specify your parallel compiler options or accept the recommendations (Enter - default)!:] Enter
- [Please specify your MPIRUN command or accept the recommendations (Enter - default)!:] Enter
- [Selection:] S
- Dimension parameters
- [Selection:] Q
- Compile/Recompile programs
- (Ubuntu18.04かつiccを使う場合) ディレクトリ内のSRC_aimのMakefileを開いて、19行目を %%CC = icc -D__PURE_INTEL_C99_HEADERS__%% に変更する。
- (Ubuntu18.04かつiccを使う場合) ディレクトリ内のSRC_sgropuのMakefileを開いて、20行目を %%FOPT = -D__PURE_INTEL_C99_HEADERS__%% に変更する。
- [Selection:] A
- Perl Path
- [Please enter the full path of the perl program:] /usr/bin/perl
- Temp Path
- [Please enter the full path to your temporary directory:] /tmp
==== 参考 ====
* [[http://hmli.ustc.edu.cn/doc/app/wien2k17u1.htm]]
===== ユーザーごとの設定 =====
$ cd /path/to/WIEN2k/
$ ./userconfig_lapw
- editor shall be: vim
- Set editor to vim (Y/n): y
- DATA directory: /home/username/WIEN2kdata
- Set DATA directory to /home/username/WIEN2kdata (Y/n): y
- scratch directory: Enter
- Set scratch directory to working directory: y
- Specify your program to read pdf files (default is acroread) (on some Linux systems use xpdf): evince
- Set PDFREADER to evince (Y/n): y
- Do you want to continue (Y/n)?: y
- Edit .rhosts file now? (y/N): n