yyhxwhd的个人博客分享 http://blog.sciencenet.cn/u/yyhxwhd

博文

siesta-NetCDF 编译

已有 5115 次阅读 2014-9-21 19:26 |个人分类:SIESTA|系统分类:科研笔记

首先是安装netCDF

#---------------------------------------------------------------------------------------------------------------

出现警告  /share/apps/intel/composerxe-2011.5.220/compiler/lib/intel64/libimf.so: warning: warning: feupdateenv is not implemented and will always fail

NetCDF 预配置(netcdf-4.1.3)


CPPFLAGS=-I/usr/include LDFLAGS=-L/usr/lib
./configure --prefix=/home/haidi/software/netcdf FC=gfortran F77=gfortran --enable-shared --enable-static --enable-f77--enable-fortran --enable-f90 --disable-netcdf-4

make && make install


出现库函数不能调用问题,有以下办法解决

1. root

echo "/home/haidi/software/netcdf/lib" >> /etc/ld.so.conf
ldconfig

2.普通用户

在~/.bashrc 中加入

export NetCDF_root=/share/apps/siesta/netcdf     # you have to change it !!!

export PATH=$PATH:${NetCDF_root}/bin

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${NetCDF_root}/lib

export INCLUDE=$INCLUDE:${NetCDF_root}/include


#-----------------------------------------------------------------------------------------------------------------------

编译SIESTA

在SIESTA 的arch.make 文件中加入

FPPFLAGS= -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DCDF

netcdf=/share/apps/siesta/netcdf   # you have to change it !!!

LDFLAGS=  -static-intel -I${netcdf}/include -limf  

NETCDF_LIBS=-L${netcdf}/lib -lnetcdff

NETCDF_INCLUDE=-L${netcdf}/include

NETCDF_INCFLAGS=

#-----------------------------------------------------------------------------------------------------------------------

siesta/Util/Grid小程序

程序            输入文件     输出文件

grid2cdf    GRIDFUNC  GridFunc.nc
grid2cube                         *.cube
cdf2grid    GridFunc.nc GRIDFUNC
cdf2xsf      GridFunc.nc GRIDFUNC
cdf_diff   TotalSystem.Rho.grid.nc SingleMolecule.Rho.grid.nc Slab.Rho.grid.nc ==>Diff.Rho.grid.nc  #做差分电荷密度




https://wap.sciencenet.cn/blog-276702-829654.html

上一篇:split_DOS 文件加和
下一篇:VASP光学性质计算
收藏 IP: 114.214.187.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-30 04:05

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部