24小时热门版块排行榜     新春论文润色,领200元京东卡

查看: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[教师之家] 大家怎么看40以后要二胎? +13 铁桶一家人 2019-02-16 21/1050 2019-02-17 11:32 by 坑爹理查德
[考博] 备选学校拟录取了,还要去考心仪学校吗? +14 zxcvbnm666 2019-02-13 26/1300 2019-02-17 10:21 by 坑爹理查德
[论文投稿] applied thermal engineering 2019 投稿 +3 pengyou213 2019-02-16 12/600 2019-02-17 08:53 by pengyou213
[考研] 306求调剂 +3 errol. 2019-02-16 4/200 2019-02-16 21:28 by 固鸷
[考研] 308,英语59,考数二,本科材料化学 +6 1356559177 2019-02-16 14/700 2019-02-16 20:33 by ajiabit
[考研] 本科北航年龄较小求调剂,总分311 +5 An_exus 2019-02-16 12/600 2019-02-16 18:18 by An_exus
[有机交流] 醇氧化成醛的催化剂选择 40+3 lizhi0327 2019-02-14 18/900 2019-02-16 12:20 by andinho
[硕博家园] 失眠了 (金币+5) +10 不忘初心01 2019-02-16 12/600 2019-02-16 08:40 by shaka06
[公派出国] 有没有知道格拉斯哥csc往年情况的?求交流 +5 Larry668 2019-02-10 8/400 2019-02-15 22:41 by 路德维希可可
[精细化工] 洗化厂家看过来 +4 阿修罗Zz 2019-02-12 6/300 2019-02-15 20:25 by 小刚日化
[考博] 2020武汉考博 +3 W&hhh 2019-02-14 5/250 2019-02-15 20:03 by W&hhh
[考研] 物理学374求调剂 +3 2516419621 2019-02-15 4/200 2019-02-15 19:37 by 2516419621
[有机交流] 名人反应机理总结 10+3 麒麟@fang 2019-02-15 4/200 2019-02-15 16:02 by chivliu
[考研] 19考研求上岸 +36 哎丫丫呀 2019-02-13 41/2050 2019-02-14 18:43 by 文静圆梦
[版块工场] 【早起签到贴】2019年2月14日(q q 48626260 进群申请:小木虫——您个人ID) +81 8475 2019-02-14 81/4050 2019-02-14 10:30 by 冰天雪地
[考博] 读博疑惑 +7 Jhb1015 2019-02-11 16/800 2019-02-14 05:57 by Jhb1015
[教师之家] 请教国自青基申请书8000字以内的要求是针对哪一部分?必须严格按照8000字吗?谢谢大家 +10 遇见学术 2019-02-11 13/650 2019-02-13 15:22 by ld10000
[硕博家园] 华盛顿大学圣路易斯PHD全奖经验分享 +9 kingtom22 2019-02-10 20/1000 2019-02-12 22:19 by kingtom22
[硕博家园] 工科普本博士不进高校,还能从事什么工作? +6 东北小苏 2019-02-11 12/600 2019-02-12 20:18 by xiangxi278
[考研] 考药学,可以选择哪些b区学校调剂 +3 惜希曦熙晨 2019-02-12 7/350 2019-02-12 10:44 by 惜希曦熙晨
信息提示
请填处理意见