|
本帖最后由 wxyhgk 于 2022-10-18 22:42 编辑
说明:
本人已经在三台机器上做过测试,都是48个项目全部通过,都不报错,是值得信赖的。
测试机器为:
- 测试系统均为:Ubuntu 20.04
- 测试的cpu分别是:AMD Ryzen 9 5950X ,Intel Xeon E5-2696 v4,Intel Xeon E5-2675 v3
论坛发几幅图就超过字符范围了,可以到我博客看图片版 (点我打开)
1.准备工作
1.1 软件下载
- 下载 MobaXterm 终端软件(点我下载)
方便后面的操作,sftp 和 ssh 在一个界面非常友好,支持 x11 转发,全能终端工具,方便后面的操作 - 下载 GAMESS 软件包(点我下载)
1.2 修改 Ubuntu 源
更换源保证以后的下载速度,修改 sources.list 文件- sudo vim /etc/apt/sources.list
复制代码 把里面的全部删掉,修改成下面的:
- deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
复制代码 修改完后,进行更新
1.3 安装一些包
首先安装 tmux 这样就能保证后台一直运行,就算断连也可以后台运作
- sudo apt-get install tmux -y
复制代码
使用命令建立一个 gamess 后台窗口,更多的 tumux 命令看这个(点我打开)
一次性安装常见的 build 需要的各种组件:
- sudo apt-get install build-essential csh gfortran wget -y
复制代码
2. Intel mkl 安装
使用命令
- cd $HOME;mkdir mkl;cd mkl;wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18487/l_BaseKit_p_2022.1.2.146_offline.sh
复制代码 包比较大,慢慢等待下载,我们已经使用 tmux 了,所以不用担心服务器断连。
下载完成后,使用命令
- sudo bash l_BaseKit_p_2022.1.2.146_offline.sh
复制代码 运行包,稍等一下,MobaXterm 会弹出可视化安装界面,按照提示安装即可。
3. GAMESS 安装
3.1 准备工作
将下载好的 GAMESS 软件包上传到服务器,MobaXterm 直接拖过去就行了。
进入家目录,然后解压
- cd $HOME;tar -xvf gamess-current.tar.gz
复制代码
3.2 查看 gfortran 版本号
记住这个数字 9.4 后面要用
3.3 GAMESS 设置
会给你一些选项:按照下面的输入
- Machine type: linux64
- Directories: 回车两次
- Version: 00
- FORTRAN compiler: gfortran
- GFORTRAN version: 9.4
- Standard math library: mkl
后面会要你填路径,填我这个路径 /opt/intel/oneapi/mkl/2022.0.2
填完路径之后,输入 proceed - Comunication library: sockets
- 其他的全部填:no
3.4 编译
编译之前,使用命令:- vi $HOME/gamess/ddi/compddi
复制代码 找到第 99 行,可以看到 set MAXCPUS=128 ,默认不修改,如果你的 cpu 核数大于 128 那么就修改成你的 cpu 核数
修改后之后然后编译然后
最后
我这里是 64 ,64 代表你的 cpu 的核数,这个过程比较久,慢慢等就行了,我们已经用了 tmux ,不用担心断连
当看到 The Linking of GAMESS to binary gamess.00.X Was successful 说明成功了
3.5 增加最大共享内存
然后在最下面一行填入
- # gamess shmem
- kernel.shmmax=N
复制代码
注意这里的 N=你的内存*1024*1024*1024 需要自己手动计算
3.6 rumge 配置
先建立一个 restart 文件夹
- cd $HOME/gamess;mkdir restart
复制代码
先使用命令
可以看到你的 hostname
得到你的机器名字,马上我们就要用,记住。
然后使用命令
- cd $HOME/gamess;vi rungms
复制代码 将在第一行后面回车,然后填入 rm -rf $HOME/gamess/restart
将154行的 if (null$NCPUS == null) set NCPUS=1中的 1 修改成你的核数
在 449 行的 switch (`hostname`) 后面回车,加入以下代码
case master:
set NNODES=1
set HOSTLIST=(`hostname`:cpus=$NCPUS)
breaksw
这里的 master 改成你的 hostname
3.7 运行测试
在运行测试之前,运气不好你会遇到这个错误
The GAMESS executable gamess.0.0.xor else the DDIKICK executable ddikick.xcould not be found in directory /home/wxyhgk/gamess,or else they did not properly link to executable permission.
为了确保万无一失,我们这样:
- sudo chmod 777 $HOME/gamess/*
复制代码 开始运行测试
- cd $HOME/gamess;./runall 00
复制代码 这里的测试项是做什么的可以到这里查看(点我打开)
等待他测试完,运行好之后,我们使用命令
- cd $HOME/gamess;./tests/standard/checktst
复制代码 看看48个任务是否全部通过测试,如果你按照我的来,肯定可以全部通过,如果没有通过,你最好先删掉 gamess 文件夹,然后从头按照我的教程来。
这里很多时候不通过会出现所谓的 901 错误,像这样- DDI Process 0: error code 911
- ddikick.x: application process 0 quit unexpectedly.
- ddikick.x: Fatal error detected.
- The error is most likely to be in the application, so check for
- input errors, disk space, memory needs, application bugs, etc.
- ddikick.x will now clean up all processes, and exit...
复制代码 这个错误的原因有这么种情况
- 前面的没配置好
- 没有设置内存
- 核数配置错误了
- 提前设置了多核运行
3.8 配置多核运行
使用命令:
- cd $HOME/gamess;vi runall
复制代码
修改
- #!/bin/csh -f
- #
- # C-shell script to execute GAMESS test jobs, one job after the next.
- # Invoke this by typing './runall', while in the top level of GAMESS.
- #
- # Each output is put in its own separate log file in the gamess root.
- # A script to check the results is ~/gamess/tests/standard/checktst.
- # Edit this file to set the base path to GAMESS, then execute it to be
- # sure all tests TERMINATED NORMALLY, and got correct numbers too.
- #
- if (null$1 == null) then
- echo "Please specify the desired binary version number to be checked", >> /dev/stderr
- echo " runall 00" >> /dev/stderr
- echo "as an example, will test gamess.00.x" >> /dev/stderr
- exit 4
- else
- set VERNO=$1
- endif
- #
- # calculations will be done serially on the local node,
- # except at Iowa State University they run serially in a batch queue.
- #
- if (`hostname` == master) then
- if (null$2 == null) then
- set QUEUE=$USER
- echo -n "ISU batch queue name? [$QUEUE] "
- set QUEUE=[ DISCUZ_CODE_722 ]lt;
- if (null$QUEUE == null) set QUEUE=$USER
- else
- set QUEUE=$2
- endif
- setenv GMS_TEST_DIR `pwd`
- echo "Testing gamess.$VERNO.x from $GMS_TEST_DIR in queue $QUEUE"
- endif
- #
- # Loop over all Ntest jobs supplied with GAMESS
- # The jobs are run in batch queues at Iowa State.
- # Otherwise the test is executed interactively by 'rungms'.
- #
- set i=1
- set Ntest=48
- while ($i <= $Ntest)
- set NUM=$i
- if ($i <= 9) set NUM=0$i
- if (`hostname` == si.msg.chem.iastate.edu) then
- xgms -v $VERNO -q $QUEUE -l exam$NUM.log exam$NUM
- sleep 2
- else
- ./rungms exam$NUM $VERNO 1 >& exam$NUM.log
- endif
- @ i++
- end
复制代码
修改 if (`hostname` == master) then 里面 ‘hostname‘ == 后面的东西,改成你的 hostname ,这里的 master 是我的 hostname
修改 ./rungms exam$NUM $VERNO 1 >& exam$NUM.log 这里的 1 ,改成你的核数。
3.9 其他
配置环境变量
在最后一行加入以下代码
- # gamess
- export GMS=$HOME/gamess/rungms
- alias gms='$HOME/gamess/rungms'
复制代码 加入完成之后,保存,然后退出终端,重新进去就能使用 gms 命令了
运行 GAMESS :
- gms name.inp 00 >& name.gms &
复制代码 这里 name 是你的输入文件名字
4. 参考文章
4.1 tumx
4.2 GMAESS 安装教程
4.3 GAMESS 测试项官方说明
|
评分 Rate
-
查看全部评分 View all ratings
|