24小时热门版块排行榜     意得辑| 科学深度润色直减618元!

查看: 200  |  回复: 4

binggan1987

铁虫 (小有名气)

[交流] 集群安装lammps心得体会,与大家共同学习已有2人参与

由于集群系统崩溃,重装2018版的lammps,一开始装的fftw是3.3.7版本,编译出现以下报错:
错误提示:
fft3d.o:在函数‘fft_3d’中:
/home/tree/Software/lammps/src/Obj_mpi/../fft3d.cpp:151:对‘fftwf_execute_dft’未定义的引用
/home/tree/Software/lammps/src/Obj_mpi/../fft3d.cpp:214:对‘fftwf_execute_dft’未定义的引用
/home/tree/Software/lammps/src/Obj_mpi/../fft3d.cpp:277:对‘fftwf_execute_dft’未定义的引用
/home/tree/Software/lammps/src/Obj_mpi/../fft3d.cpp:151:对‘fftwf_execute_dft’未定义的引用
/home/tree/Software/lammps/src/Obj_mpi/../fft3d.cpp:214:对‘fftwf_execute_dft’未定义的引用
fft3d.o:/home/tree/Software/lammps/src/Obj_mpi/../fft3d.cpp:277: 跟着更多未定义的参考到 fftwf_execute_dft..............

解决办法:
发现是fftw问题,我重装了老版本3.2.2的fftw,发现一次编译通过。
fftw下载地址:  ftp://ftp.fftw.org/pub/fftw/

有相同问题的,可以借鉴一下


下面是make mpi文件

# mpi = MPI with its default compiler

SHELL = /bin/sh

# ---------------------------------------------------------------------
# compiler/linker settings
# specify flags and libraries needed for your compiler

CC =                /public/software/mpi/openmpi/intel/2.1.2/bin/mpicxx   #修改的地方
CCFLAGS =        -g -O3
SHFLAGS =        -fPIC
DEPFLAGS =        -M

LINK =                /public/software/mpi/openmpi/intel/2.1.2/bin/mpicxx  #修改的地方
LINKFLAGS =        -g -O
LIB =
SIZE =                size

ARCHIVE =        ar
ARFLAGS =        -rc
SHLIBFLAGS =        -shared

# ---------------------------------------------------------------------
# LAMMPS-specific settings, all OPTIONAL
# specify settings for LAMMPS features you will use
# if you change any -D setting, do full re-compile after "make clean"

# LAMMPS ifdef settings
# see possible settings in Section 2.2 (step 4) of manual

LMP_INC =        -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64

# MPI library
# see discussion in Section 2.2 (step 5) of manual
# MPI wrapper compiler/linker can provide this info
# can point to dummy MPI library in src/STUBS as in Makefile.serial
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
# INC = path for mpi.h, MPI compiler settings
# PATH = path for MPI library
# LIB = name of MPI library

MPI_INC =   -I/public/software/mpi/openmpi/intel/2.1.2/include    -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1  #修改的地方
MPI_PATH =  -L/public/software/mpi/openmpi/intel/2.1.2/lib  #修改的地方
MPI_LIB =          -lmpi   #修改的地方

# FFT library
# see discussion in Section 2.2 (step 6) of manual
# can be left blank to use provided KISS FFT library
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
# PATH = path for FFT library
# LIB = name of FFT library

FFT_INC =    -DFFT_FFTW -I/public/software/fftw2/fftw/include        #修改的地方
FFT_PATH =   -L/public/software/fftw2/fftw/lib   #修改的地方
FFT_LIB =            -lfftw3  #修改的地方

# JPEG and/or PNG library
# see discussion in Section 2.2 (step 7) of manual
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
# INC = path(s) for jpeglib.h and/or png.h
# PATH = path(s) for JPEG library and/or PNG library
# LIB = name(s) of JPEG library and/or PNG library

JPG_INC =      
JPG_PATH =        
JPG_LIB =       

# ---------------------------------------------------------------------
# build rules and dependencies
# do not edit this section

include        Makefile.package.settings
include        Makefile.package

EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)

# Path to src files

vpath %.cpp ..
vpath %.h ..

# Link target

$(EXE):        $(OBJ) $(EXTRA_LINK_DEPENDS)
        $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
        $(SIZE) $(EXE)

# Library targets

lib:        $(OBJ) $(EXTRA_LINK_DEPENDS)
        $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)

shlib:        $(OBJ) $(EXTRA_LINK_DEPENDS)
        $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
        $(OBJ) $(EXTRA_LIB) $(LIB)

# Compilation rules

%.o:%.cpp
        $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<

# Individual dependencies

depend : fastdep.exe $(SRC)
        @./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1

fastdep.exe: ../DEPEND/fastdep.c
        cc -O -o $@ $<

sinclude .depend
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

caifei110

金虫 (正式写手)


小木虫: 金币+0.5, 给个红包,谢谢回帖
emuch: 屏蔽内容, 违规存档, 违规发布联系方式 2019-01-14 15:01:08
本帖内容被屏蔽

2楼2019-01-14 12:20:58
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ruibingqilin

铁虫 (小有名气)


小木虫: 金币+0.5, 给个红包,谢谢回帖
送红花一朵
谢谢分享,我刚接触lammps,按照例子在熟悉操作。从NIST官网上复制了势函数到text文件里,命名为Al99.eam.alloy,放在计算的文件夹里了,但运行后还是出现Cannot open EAM potential file Al99.eam.alloy 这个错误。请问应该怎么解决? 谢谢!
3楼2019-02-12 11:51:10
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

binggan1987

铁虫 (小有名气)

引用回帖:
3楼: Originally posted by ruibingqilin at 2019-02-12 11:51:10
谢谢分享,我刚接触lammps,按照例子在熟悉操作。从NIST官网上复制了势函数到text文件里,命名为Al99.eam.alloy,放在计算的文件夹里了,但运行后还是出现Cannot open EAM potential file Al99.eam.alloy 这个错误。 ...

感觉是不是in文件eam势函数给的路径不对,或者命令有问题,可以把in文件贴出来看看
4楼2019-02-12 13:12:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ruibingqilin

铁虫 (小有名气)


小木虫: 金币+0.5, 给个红包,谢谢回帖
引用回帖:
4楼: Originally posted by binggan1987 at 2019-02-12 13:12:40
感觉是不是in文件eam势函数给的路径不对,或者命令有问题,可以把in文件贴出来看看...

in文件如下,麻烦看看,谢谢!

# Find minimum energy fcc configuration
# Mark Tschopp, 2010
# This requires the variable latconst to be input via the command line
# e.g., lmp_win_no-mpi -var latconst 4 < calc_fcc_ver1.in

# ---------- Initialize Simulation ---------------------
clear
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array

# ---------- Create Atoms ---------------------
lattice         fcc ${latconst}
region        box block 0 1 0 1 0 1 units lattice
create_box        1 box

lattice        fcc ${latconst} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1  
create_atoms 1 box
replicate 1 1 1

# ---------- Define Interatomic Potential ---------------------
pair_style eam/alloy
pair_coeff * * Al99.eam.alloy Al
neighbor 2.0 bin
neigh_modify delay 10 check yes

# ---------- Define Settings ---------------------
compute eng all pe/atom
compute eatoms all reduce sum c_eng

# ---------- Run Minimization ---------------------
reset_timestep 0
fix 1 all box/relax iso 0.0 vmax 0.001
thermo 10
thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms
min_style cg
minimize 1e-25 1e-25 5000 10000

variable natoms equal "count(all)"
variable teng equal "c_eatoms"
variable length equal "lx"
variable ecoh equal "v_teng/v_natoms"

print "Total energy (eV) = ${teng};"
print "Number of atoms = ${natoms};"
print "Lattice constant (Angstoms) = ${length};"
print "Cohesive energy (eV) = ${ecoh};"

print "All done!"
5楼2019-02-12 14:52:08
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 binggan1987 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[论文投稿] 朋友们,求助英文论文翻译 +9 YJJ123456 2019-06-16 21/1050 2019-06-17 15:55 by YJJ123456
[博后之家] 江苏科技大学2019年人才招聘 +3 wymr 2019-06-12 6/300 2019-06-17 14:27 by srsat
[找工作] 北京中科院没户口,北京工业大学有户口,如何抉择? +23 achaocmt 2019-06-15 27/1350 2019-06-17 13:52 by 江流儿
[硕博家园] 在本科毕业10周年聚会上的讲话 +13 归兰居 2019-06-16 18/900 2019-06-17 10:40 by 归兰居
[文学芳草园] 【咨询贴】这里有没有出版社的编辑大大,求合作出版。 +8 七月微茫 2019-06-11 13/650 2019-06-17 10:27 by 七月微茫
[博后之家] 咨询海外博士后的可能性——41岁博士 +10 hyc1775F 2019-06-16 22/1100 2019-06-17 00:03 by qulihua123
[有机交流] Suzuki偶联,大部分都是脱卤的产物 +10 旷野无人 2019-06-15 12/600 2019-06-16 20:28 by xgf0106
[论文投稿] macromolecules审稿意见 20+3 jimmyxu 2019-06-15 11/550 2019-06-16 10:52 by swinggg
[职场人生] 一个人的舞台…… +11 wangjiyue 2019-06-15 11/550 2019-06-16 10:30 by 似水年华521
[硕博家园] 工科博士一般每个月可以拿到多少钱? +24 Troy_GM 2019-06-14 32/1600 2019-06-15 16:35 by 我是牛神
[基金申请] 科研之友给发邮件了 +31 wittyboy 2019-06-13 35/1750 2019-06-15 15:31 by machiljl
[教师之家] 如此这般,可不可以? +27 小纵队长 2019-06-15 44/2200 2019-06-15 14:57 by 1031009425
[硕博家园] 诚求会C#的宝宝交友 +4 小仙女挺住 2019-06-14 11/550 2019-06-14 23:45 by 小仙女挺住
[考博] 大龄辞职读博 +12 gaosanzhi 2019-06-14 13/650 2019-06-14 14:57 by st7715
[分析] 气相~质谱分析 +4 嘿嘿呵呵哦哦 2019-06-13 10/500 2019-06-14 14:23 by 苏小呆~
[教师之家] offer选择 +8 jayla 2019-06-13 16/800 2019-06-14 14:13 by jayla
[硕博家园] 小硕要不要跟自己导师吐露心声??? +13 snailpig 2019-06-13 29/1450 2019-06-13 15:46 by snailpig
[公派出国] 联合培养博士-去向英国 +8 lala要努力 2019-06-12 14/700 2019-06-13 15:46 by lala要努力
[石油化工] 请教,实验室订购的乙醇 +12 临床碎月 2019-06-11 15/750 2019-06-13 00:20 by capf伊继煜
[考博] 考博可以报考多个学校吗 +4 ksc111 2019-06-11 7/350 2019-06-12 15:13 by huixiong0627
信息提示
请填处理意见