| 查看: 1836 | 回复: 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 |
» 本帖已获得的红花(最新10朵)
» 猜你喜欢
假如你的研究生提出不合理要求
已经有8人回复
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有4人回复
Materials Today Chemistry审稿周期
已经有4人回复
参与限项
已经有3人回复
实验室接单子
已经有4人回复
全日制(定向)博士
已经有4人回复
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复
匿名
用户注销 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 2465.8
- 散金: 669
- 红花: 3
- 帖子: 915
- 在线: 130.7小时
- 虫号: 0
- 注册: 2014-10-04
- 性别: GG
- 专业: 高分子科学
2楼2019-01-14 12:20:58
ruibingqilin
铁虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 682.7
- 帖子: 285
- 在线: 152.6小时
- 虫号: 1943683
- 注册: 2012-08-17
- 性别: GG
- 专业: 高分子材料结构与性能
3楼2019-02-12 11:51:10
binggan1987
铁虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 50.4
- 散金: 1390
- 红花: 5
- 帖子: 73
- 在线: 145.2小时
- 虫号: 1475526
- 注册: 2011-11-04
- 专业: 工程热物理相关交叉领域
4楼2019-02-12 13:12:40
ruibingqilin
铁虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 682.7
- 帖子: 285
- 在线: 152.6小时
- 虫号: 1943683
- 注册: 2012-08-17
- 性别: GG
- 专业: 高分子材料结构与性能
★
小木虫: 金币+0.5, 给个红包,谢谢回帖
小木虫: 金币+0.5, 给个红包,谢谢回帖
|
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












回复此楼
ruibingqilin