WIEN2k是用密度泛函理论计算固体的电子结构的商业收费软件。它基于键结构计算最准确的方案——完全势能(线性)增广平面波((L)APW)+局域轨道(lo)方法。在密度泛函中可以使用局域(自旋)密度近似(LDA)或广义梯度近似(GGA)。WIEN2k使用全电子方案,包含相对论影响。
WIEN2k14.2软件包支持MPI并行、OpenMP并行及串行等,无需root权限即可安装,用户可以安装在自己目录下。本文仅针对采用Intel编译环境(编译器、MKL、MPI)及FFTW3做下说明。
/opt/intel/composer_xe_2015.1.133/bin/intel64/ifort如显示不存在,那么可以类似下面设置Intel编译器环境(具体路径与你所使用的系统有关):
/opt/intel/composer_xe_2015.1.133/mkl如显示不存在,那么可以类似下面设置Intel MKL环境(最好与编译器版本一致):
WIEN2k支持FFTW MPI并行,本人不确定Intel MKL带有的是否支持,此处采用源码编译FFTW3,并打开MPI支持。
********************************************************* * W I E N * * site configuration * ********************************************************* Last configuration: 2017年 04月 01日 星期六 19:22:30 CST Wien Version: WIEN2k_14.2 (Release 15/10/2014) System: linuxifc S specify a system C specify compiler O specify compiler options, BLAS and LAPACK P configure Parallel execution D Dimension Parameters R Compile/Recompile U Update a package L Perl path (if not in /usr/bin/perl) Q Quit Selection:分别根据前面对应的单个字母(不区分大小写)设置相应选项:
********************** * Specify a system * ********************** Current system is: linuxifc I Linux (Intel ifort compiler (12.0 and later) + mkl ) J Linux (Intel ifort 9 or 10 compiler + mkl 9.0 ) K Linux (Intel ifort 11.0 compiler + mkl ) K1 Linux (Intel ifort 11.1 compiler + mkl ) A AIX (not updated) V Linux (gfortran compiler + blaslapw (try to use at least gotoblas) G GENERIC (you have to define everything ) L Linux (PGI compiler) (not updated) P Linux (Pathscale compiler) (not updated) W Linux (G95 compiler + gotolib) (not updated) S SGI (Origin) (not updated) S1 SGI Altix 350/3000 with Intel 7.1 compiler) (not updated) U SUN (not updated) L1 Linux (Lahey LF97 compiler) (not updated) M Mac (mac g4 + absoft compiler) (not updated) Q Quit选择I,采用linuxifc,设置完后将保存在SYSTEM文件中,以后可以修改此文件后再运行siteconfig_lawp进行设置,下面几步中的类似。
Recommended setting for f90 compiler: ifort Current selection: ifort Your compiler:直接回车或输入ifort回车,采用Intel Fortran编译器,设置后将保存在COMPILER文件中。
Recommended setting for C compiler: cc Current selection: icc Your compiler:直接回车或输入icc回车,采用Intel C编译器,设置后将保存在COMPILERC文件中。
会提示已经找到MKL环境:
Your MKLROOT=/opt/intel/composer_xe_2015.1.133/mkl Your MKL_TARGET_ARCH=intel64 The default options shown on the next screen should be ok回车后显示(Current因为我已经设置过,所以如此显示):
ecommended options for system linuxifc are: Compiler options: -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -traceback -assume buffered_io Linker Flags: $(FOPT) -L$(MKLROOT)/lib/$(MKL_TARGET_ARCH) -pthread Preprocessor flags: '-DParallel' R_LIB (LAPACK+BLAS): -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread Current settings: O Compiler options: -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -O2 -axavx -fp-model source -assume buffered_io F FFTW options: -DFFTW3 -I/$(HOME)/local/include L Linker Flags: $(FOPT) -L$(MKLROOT)/lib/$(MKL_TARGET_ARCH) P Preprocessor flags '-DParallel' R R_LIB (LAPACK+BLAS): -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread FL FFTW_LIBS: -lfftw3_mpi -lfftw3 -L/$(HOME)/local/lib S Save and Quit Q Quit abandon changes To change an item select option. Selection:根据提示,分别按O、F、L、R、RL设置相应选项,确保设置后为:
O Compiler options: -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -O2 -axavx -fp-model source -assume buffered_io F FFTW options: -DFFTW3 -I/$(HOME)/local/include L Linker Flags: $(FOPT) -L$(MKLROOT)/lib/$(MKL_TARGET_ARCH) P Preprocessor flags '-DParallel' R R_LIB (LAPACK+BLAS): -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread FL FFTW_LIBS: -lfftw3_mpi -lfftw3 -L/$(HOME)/local/lib设置各项后记得按S保存退出。设置后会保存在OPTIONS文件中。
Shared Memory Architecture? (y/N):设定完后将保存在MPI文件中
Do you know/need a command to bind your jobs to specific nodes ? (like taskset -c). Enter N / your_specific_command:
On most mpi-2 versions, it is better to start an mpijob on the original machine and not via ssh on a remote system. If you are using mpi2 set MPI_REMOTE to 0 Set MPI_REMOTE to 0 / 1:
Remote shell (default is ssh) =
This is useful only for BIG cases (50 atoms and more / unit cell) and your HARDWARE has at least 16 cores (or is a cluster with Infiniband) You need to KNOW details about your installed MPI and FFTW )
Finding the required fftw2/3 mpi-files in /usr and /opt ....设定FFTW2或3,采用FFTW3:输入FFTW3回车
Please specify the ROOT-path of your FFTW installation (like /opt/fftw3):此处选择采用本文前面编译的,输入/home/nic/hmli/local回车,显示:
Your FFTW_LIBS are: -lfftw3_mpi -lfftw3 -L/home/nic/hmli/local/lib Your FFTW_OPT are : -DFFTW3 -I/home/nic/hmli/local/include如正确,则输入Y回车确认。
A Compile all programs (suggested) S Select program Q Quit Selection:请根据需要选择部分编译(S)或全编译(A),此处选择A进行全编译。然后就开始漫长的编译了,编译最后会提示是否有问题。