yx_wh's Blog

Happy coding

编译GAMESS(US)

yx_wh posted @ 2013年10月15日 19:35 in 未分类 , 16706 阅读

配置gamess
GAMESS(不是GAMES)的简介:
https://en.wikipedia.org/wiki/GAMESS_(US)
GAMESS的source
code是可以免费取得的,不过在distribution上有限制,所以不叫自由开源。在以下页面填入自己的邮件地址取得下载密码
http://www.msg.chem.iastate.edu/GAMESS/download/register/
这里有一个说明:
http://www.msg.chem.iastate.edu/GAMESS/download/dist.source.shtml
需要安装

  1. sudo aptitude install tcsh gfortran
  2. sudo aptitude install libatlas-base-dev

解压缩

  1. tar -xzvf gamess-current.tar.gz

遵循gamess/machines/readme.unix的指示。不过注意:有个选择gfortran版本的地方,即使是4.7的gfortran也请选择输入4.6。看./config的代码可知:

  1.       switch ($GMS_GFORTRAN_VERNO)
  2.          case 4.1:
  3.          case 4.2:
  4.          case 4.3:
  5.          case 4.4:
  6.          case 4.5:
  7.             echo "   Alas, your version of gfortran does not support REAL*16,"
  8.             echo "   so relativistic integrals cannot use quadruple precision."
  9.             echo "   Other than this, everything will work properly."
  10.             breaksw
  11.          case 4.6:
  12.             echo "   Good, the newest gfortran can compile REAL*16 data type."
  13.             breaksw
  14.          default:
  15.             echo "The gfortran version number is not recognized."
  16.             echo "It should only have one decimal place, such as 4.x"
  17.             exit 4
  18.             breaksw

之后有个选择math library的地方,选择atlas。填入libatlas.so所在地(/usr/lib/atlas-base)。
编译DDI

  1. cd ddi
  2. ./compddi >& compddi.log
  3. mv ddikick.x ..

编译

  1. cd ..
  2. ./compall >& compall.log

链接

  1. ./lked gamess 01 >& lked.log

这个时候要改一下内核shmget的数值:

  1.     sudo vim /etc/sysctl.conf

加入:

  1.     kernel.shmmax = 3064372224
  2.     kernel.shmall = 748137

For example, on a machine with 4GB of memory, you might add these to /etc/sysctl.conf:

  1.     # cat /etc/sysctl.conf | grep shm  
  2.     kernel.shmmax = 3064372224
  3.     kernel.shmall = 748137

Then set the new settings like so:

  1.     # sudo sysctl -p

Since they are in /etc/sysctl.conf, they will automatically be set each time the system is booted.

rungms开头部分改为

  1. mkdir /tmp/$USER
  2. set TARGET=sockets
  3. set SCR=/tmp/$USER
  4. set USERSCR=~$USER/scr
  5. set GMSPATH=~$USER/git/gamess

另外
NCPUS
改成你计算机有的核心数目。

  1. if (null$NCPUS == null) set NCPUS=2

并在

  1.    if ($NCPUS > 1) then
  2.       switch (`hostname`)

一段后加入你的hostname作为case选择支之一。

  1.          case athlonX2:
  2.             if ($NCPUS > 2) set NCPUS=2
  3.             set NNODES=1
  4.             set HOSTLIST=(`hostname`:cpus=$NCPUS)
  5.             breaksw
复制代码

然后测试。

  1. ./runall 01 >& runall.log &

之后

  1. gvim exam*

查看运行成果。
可以使用avogadro生成GAMESS的输入文件。

  1. sudo aptitude install avogadro

执行使用:

  1. ~/git/gamess/rungms  SF6.inp  01 2 > SF6.log
  1. yx@athlonX2 ~/git/gamess % cd ~/gamess
  2. yx@athlonX2 ~/gamess % ~/git/gamess/rungms  SF6.inp  01 2 > SF6.log         
  3. mkdir: cannot create directory `/tmp/yx': File exists
  4. cp SF6.inp /tmp/yx/SF6.F05
  5. unset echo
  6. /home/yx/git/gamess/ddikick.x /home/yx/git/gamess/gamess.01.x SF6 -ddi 1 2 athlonX2:cpus=2 -scr /tmp/yx

 

Avatar_small
Brodie William 说:
2018年6月21日 16:33

Majority of the posts have been taken out for the use of the norms for the people. The right use of the structure and essayshark is devoid of the true elements for the humans. The nature is done for the affluent terms in life.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter