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

博文

lammps 在Ubuntu 16.04LTS服务器并行安装全过程

已有 7904 次阅读 2018-3-9 09:57 |个人分类:工作记录|系统分类:科研笔记

由于我之前已经在服务器里装好了gromacs和NAMD,因此openmpi, fftw等都已经装好了。


假装所有的依赖包都没有安装,那么在root权限下输入下面的命令:

apt-get install gcc

apt-get install g++

apt-get install mpi-default-*

apt-get install libfftw3*

apt-get install libjpeg-*

apt-get install libpng12-*

即可把这些包都安装好。


解压 lammps 安装包:

tar -xvf lammps-stable.tar.gz

cd lammps-11Aug17/src/MAKE/MACHINES

把Makefile.ubuntu复制到 scr/MAKE目录下:

cp Makefile.ubuntu ../

可以看到此时 lammps-11Aug17/src/MAKE目录下有下面三个Makefile文件:

Makefile.mpi  Makefile.serial  Makefile.ubuntu


到lammps-11Aug17/src/目录下执行

make package-status

查看有哪些包是yes态和no态;yes表示安装,no表示不安装。用make yes-包名或make no-包名, 加载/取消你安装的包。选择自己必要的包就行了,特别注意,选择了需要的包,也得跟自己的电脑支持情况对应。

我的选择有:

make no-REAX

make no-GPU

make no-MEAM

make no-USER-SMD

make yes-KSPACE

make yes-MOLECULE

make yes-RIGID

make yes-USER-REAXC


再查看是否yes了

make package-status


我的ubuntu服务器不需要输出图片,因此在目录 lammps-11Aug17/src/MAKE 内的Makefile.ubuntu 里把 jpg 有关的行都注释掉。


在目录lammps-11Aug17/src/下执行

 make ubuntu 

命令,等待安装,经过漫长的安装过程之后,屏幕提示生成 lmp_ubuntu ,即安装好了。

此文件在目录lammps-11Aug17/src 内。


并把lmp_ubuntu复制到目录:/usr/local/bin 内

cp lmp_ubuntu /usr/local/bin


安装完成后设置环境变量

sudo vim /etc/profile


#在文件末尾新起一行,加入如下内容

export PATH=/usr/local/bin:$PATH


#保存关闭文件后执行

source /etc/profile


那么并行版的lammps就安装好了,安装目录在/usr/local/bin

在其他目录下可以直接输入  lmp_ubuntu 的后续命令了。


which  lmp_ubuntu

结果显示:

/usr/local/bin/lmp_ubuntu


运行测试:

 lmp_ubuntu < in.flow  

结果显示:

Performance: 73703.146 tau/day, 284.349 timesteps/s

运行测试:

mpirun -np 80 lmp_ubuntu < in.flow        

结果显示:

Performance: 1973584.917 tau/day, 7816.788 timesteps/s

Loop time of 1.2793 on 80 procs for 10000 steps with 40200 atoms

Performance: 2026111.523 tau/day, 7816.788 timesteps/s

87.1% CPU use with 80 MPI tasks x no OpenMP threads


或者 

mpirun -np 20 lmp_ubuntu < in.flow        Performance: 990707.055 tau/day, 3822.172 timesteps/s 

mpirun -np 40 lmp_ubuntu < in.flow        Performance: 1721160.953 tau/day, 6640.281 timesteps/s

mpirun -np 50 lmp_ubuntu < in.flow        Performance: 1504655.789 tau/day, 5804.999 timesteps/s

mpirun -np 60 lmp_ubuntu < in.flow        Performance: 1721756.079 tau/day, 6642.577 timesteps/s

mpirun -np 80 lmp_ubuntu < in.flow        Performance: 1973584.917 tau/day, 7816.788 timesteps/s

mpirun -np 90 lmp_ubuntu < in.flow        Performance: 1004882.036 tau/day, 3876.860 timesteps/s

mpirun -np 100 lmp_ubuntu < in.flow      Performance: 791365.908 tau/day, 3053.109 timesteps/s

mpirun -np 120 lmp_ubuntu < in.flow      Performance: 732137.924 tau/day, 2824.606 timesteps/s

mpirun -np 160 lmp_ubuntu < in.flow      Performance: 642081.707 tau/day, 2477.167 timesteps/s


我的服务器是40核80线程的,使用80线程时计算最快。






https://wap.sciencenet.cn/blog-3675-1102979.html

上一篇:gromacs-5.1.4在Ubuntu 16.04LTS服务器GPU和CPU安装全过程
下一篇:lammps 在Ubuntu 16.04LTS服务器并行安装—— ATC 扩展包的安装
收藏 IP: 218.104.96.*| 热度|

0

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

数据加载中...

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

GMT+8, 2024-4-19 14:39

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部