lammps 在 AIX6.1 系统上的安装 中国科学技术大学超级运算中心张运动 zhangzyd@ustc.edu.cn 2012 年 9 月 Lammps 软件官网 : http://lammps.sandia.gov/ 网上对于 lammps 软件在 windows Linux 系统上的安装已有很多详细的介绍, 在此不再赘述, 请参考进行安装与使用 而 lammps 官网以及软件包内都没有详细的关于此软件在基于 power6 处理器的 AIX 系统上的编译安装方法和介绍 因此, 在此记录一下我的安装过程 一 软件测试安装环境 : 操作系统 :IBM AIX6.1 计算网络 :Infiniband 编译器 :IBM XL C/C++ Enterprise Edition IBM XL Fortran Enterprise Edition MPI 并行计算环境 :IBM Parallel Environment(PE) 数值函数库 :MASS BLAS ESSL PESSL 等作业管理系统 :TWS LoadLeveler Lammps 软件版本 :lammps-9dec11 二 软件安装 : 1. 从 lammps 软件官网下载源码包文件 lammps.tar, 上传到服务器上
个人帐号目录下, 并解压得到 lammps-9dec11 目录软件 2. 进入 lammps-9dec11/src/make 目录, 这里有各种系统环境下的 Makefile.* 文件可供参考, 也有 Makefile.power5 的文件, 但没有 Makefile.power6 在此可以拷贝.power5 的文件保存成.power6 以做参 考和修改 $ cp Makefile.power5 Makefile.power6 $ vi Makefile.power6 修改后的文件如下 : # power6 = IBM Power6 machine, mpcc, FFTW SHELL = /bin/sh.suffixes:.cpp.u # compiler/linker settings # specify flags and libraries needed for your compiler CC = mpcc_r -q64 CCFLAGS = -O3 -qnoipa -qstrict DEPFLAGS = -M -c LINK = $(CC) LINKFLAGS = $(CCFLAGS) LIB = -lm ARCHIVE = ar -X64 ARFLAGS = -rc SIZE = size -X64 # LAMMPS-specific settings # specify settings for LAMMPS features you will use # if you change any -D setting, do full re-compile after "make clean" # LAMMPS ifdef settings, OPTIONAL # see possible settings in doc/section_start.html#2_2 (step 4) LMP_INC = -DLAMMPS_GZIP -D_ISOC99_SOURCE -D_STDC_FORMAT_MACROS # MPI library, REQUIRED # see discussion in doc/section_start.html#2_2 (step 5) # can point to dummy MPI library in src/stubs as in Makefile.serial # INC = path for mpi.h, MPI compiler settings # PATH = path for MPI library
# LIB = name of MPI library MPI_INC = -I/usr/lpp/ppe.poe/include MPI_PATH = -L/usr/lpp/ppe.poe/lib MPI_LIB = # FFT library, OPTIONAL # see discussion in doc/section_start.html#2_2 (step 6) # 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 = FFT_PATH = FFT_LIB = # build rules and dependencies # no need to edit this section include Makefile.package.settings include Makefile.package EXTRA_INC = $(LMP_INC) $(MPI_INC) $(FFT_INC) EXTRA_PATH = $(MPI_PATH) $(FFT_PATH) EXTRA_LIB = $(MPI_LIB) $(FFT_LIB) # Link target $(EXE): $(OBJ) $(LINK) $(LINKFLAGS) $(OBJ) -o $(EXE) $(SIZE) $(EXE) # Library target lib: $(OBJ) $(CC) $(CCFLAGS) $(EXTRA_INC) -c $< %.o:%.cpp $(CC) $(CCFLAGS) $(EXTRA_INC) -c $< %.d:%.cpp $(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< -MF $@ # Individual dependencies DEPENDS = $(OBJ:.o=.d) sinclude $(DEPENDS) FFTW 函数库的设置请保留为空, 这样软件编译安装时会使用 lammps-9dec11 安装文件里自带的 fftw 函数库, 具体请看官网介绍 3. 修改完成后, 进入 lammps-9dec11/src 目录, 在此执行如下命令开
始安装 : $ gmake power6 执行结束后, 会在当前目录下生成目录 Obj_power6 以及可执行文件 lmp_power6, 安装过程中, 若遇到出错, 请根据错误提示信息分析改 正 $ ls -l lmp_power6 -rwxr-xr-x 1 pirate nic 5742290 Sep 17 14:30 lmp_power6 在个人账号的根目录下创建 bin 目录, 并将 lmp_power6 拷贝到 bin 目录下, 然后设置相应的环境变量, 以后就可以直接调用 lmp_power6 命令了 4. 程序测试 : Lammps 安装文件目录下, 有各种计算模型的参考算例, 随便找一个进行测试 在此以 /lammps-9dec11/examples/nemd/ 目录下的文件为例进行测试 创建通过作业管理系统 LoadLeveler 相关命令提交作业时需要的脚本文件 : $ vi lammps-test.cmd 脚本如下 : # @ job_type = parallel # @ environment = COPY_ALL # @ output = step1.log # @ error = step1.error # @ node = 2 # @ tasks_per_node = 8 # @ wall_clock_limit = 600000 # @ notification = never # @ class = large # @ queue
ulimit -d unlimited /usr/bin/poe lmp_power6 <in.nemd 提交作业 : $ llsubmit lammps-test.cmd 待作业运行完成后, 会在当前目录下生成文件 log.lammps, 查看输出 结果是否正常即可 三 参考信息 : Lammps 软件官网 : http://lammps.sandia.gov/