GPAW
GPAW是一款开源的DFT软件.
https://wiki.fysik.dtu.dk/gpaw/index.html
不熟悉,只讲如何安装
安装
依赖
- Python 2.7-3.5
- NumPy 1.6.1或更高版本(基本N维阵列封装)
- ASE 3.15.0或更高版本(原子模拟环境)
- 一个C编译器
- LibXC 2.0.1或更高版本
- BLAS和LAPACK库
可选,推荐
- SciPy 0.7或更高版本
- MPI库(用于并行计算)
- FFTW(用于提高性能)
- BLACS和ScaLAPACK
安装
ubuntu apt安装
ubuntu 16.04 LTS测试通过
sudo add-apt-repository ppa:campos-dev/campos
sudo apt-get update
sudo apt-get install gpaw
编译安装最新版本
使用intel编译器和mkl数学库,编译遇到了一些问题还没有解决,短期内没有时间解决,忙完这段时间继续编译
下面的过程暂无参考意义
下面的过程暂无参考意义
下面的过程暂无参考意义
安装依赖
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
python -m pip install --upgrade --user ase
mkl,icc,intel编译器安装方法Intel Parallel Studio XE 编译VASP
安装Scipy,ASE略
libxc
./configure CFLAGS="-fPIC" --prefix=/home/cndaqiang/soft/lib/libxc-2.0.1
-enable-shared CC=icc FC=ifort
编译
git clone -b 1.3.0 https://gitlab.com/gpaw/gpaw.git
添加PATH
export PATH=/home/cndaqiang/soft/gpaw/tools:$PATH
export PYTHONPATH=/home/cndaqiang/soft/gpaw:$PYTHONPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/cndaqiang/soft/lib/libxc-2.0.1/lib
下载修改icc.py中,mpicc为mpiicc,给可执行权限
#!/usr/bin/python
"""icc.py is a wrapper for the Intel compiler,
converting/removing incompatible gcc args. """
import sys
from subprocess import call
args2change = {"-fno-strict-aliasing":"",
"-fmessage-length=0":"",
"-Wall":"",
"-std=c99":"-qlanglvl=extc99",
"-fPIC":"",
"-g":"",
"-D_FORTIFY_SOURCE=2":"",
"-DNDEBUG":"",
"-UNDEBUG":"",
"-pthread":"",
"-shared":"-qmkshrobj",
"-Xlinker":"",
"-export-dynamic":"",
"-Wstrict-prototypes":"",
"-dynamic":"",
"-O3":"",
"-O3":"",
"-O2":"",
"-O1":""}
fragile_files = ["test.c"]
cmd = ""
fragile = False
for arg in sys.argv[1:]:
cmd += " "
t = arg.strip()
if t in fragile_files:
fragile = True
if t in args2change:
cmd += args2change[t]
else:
cmd += arg
flags = "-w -O3 -std=c99"
cmd = "mpiicc %s %s"%(flags, cmd)
call(cmd, shell=True)
customize.py
compiler = './icc.py'
mpicompiler = './icc.py'
mpilinker = 'MPICH_CC=gcc mpiicc'
scalapack = True
library_dirs += ['/home/cndaqiang/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64']
libraries = ['mkl_intel_lp64' ,'mkl_sequential' ,'mkl_core',
'mkl_lapack95_lp64',
'mkl_scalapack_lp64', 'mkl_blacs_intelmpi_lp64',
'pthread','m','mkl_cdft_core'
]
libraries += ['xc']
# change this to your installation directory
LIBXCDIR='/home/cndaqiang/soft/lib/libxc-2.0.1/'
library_dirs += [LIBXCDIR + 'lib']
include_dirs += [LIBXCDIR + 'include']
define_macros += [('GPAW_NO_UNDERSCORE_CBLACS', '1')]
define_macros += [('GPAW_NO_UNDERSCORE_CSCALAPACK', '1')]
define_macros += [("GPAW_ASYNC",1)]
define_macros += [("GPAW_MPI2",1)]
编译
python setup.py install --prefix=/home/cndaqiang/soft/gpaw/gpaw-1.3.1b1