24小时热门版块排行榜    

查看: 1170  |  回复: 2

寒雨人生

铁杆木虫 (知名作家)

[交流] NBO5 gamess 2011 R1上的编译 已有2人参与

ubuntu linux 10.04 64-bit/ ifort+mkl

前些天参考http://muchong.com/bbs/viewthread.php?tid=1808338(《成功编译NBO 5.G on GAMESS (January 12, 2009 R3.)》),发现gamess 2011的源码做了一些修改,文中的代码行数有了偏差,原来这个版本的编译办法已经落后了。并且,gamess2011的 rhflc和uhfop routines 里边的common都增加了一些内容,比如JANS等,所以虽然其它设置都正确,能够保证编译的正常完成,但最后执行./lked的时候,总是在lked.log得到报错信息,提示:gmsnbo.o first defined here!还有就是,lked.log也会提示getdm_和angles_重复定义!
这是因为,网上的NBO5.0的源码中定义了getdm函数和angles函数,这与gamess中iolib.src和libtad.src定义的函数有重复。
我查阅了NBO5.9在gamess2010上的编译方法(见附文),其中有一条:
If necessary, search the gmsnbo.src code and replace all occurences of GETDM by NBGETDM (this will already have been done in more recent NBO 5.9 distributions).
所以就把NBO5的源码中的所有getdm改为nbgetdm
然后同理把NBO5源码中的angles换为nbangles

当然其他设置参考开头的链接

同时,把按开头给出的参考方法生成的gmsnbo.src的第43453行(GAMESS common blocks:)以后各行的common后面,与gamess2011的rhflc(或uhfop)routine中的common后面没有的选项都对应的给添加上。这样可以保证在link的时候不会出现gmsnbo第一次定义的情况。

关于其他代码(prppop、rhfuhf、iolib)以及comp、compall、lked脚本的更改情况,基本与参考一致。就是原文描述的代码行数有点变化。这些修改可以参考一下后面附上的NBO5.9在gamess2010上的编译。NBO5的bug修改还是在8427和15421行。

不过在生成gmsnbo.src时,选64-bit可以,32-bit我没试过。

PS:我还没对编译好的gmsnbo进行测试,因为我是新手一枚,还不太熟悉nbo计算,只是业余编译这个好玩,嘿嘿。因为整个编译过程没有出现报错的情况,而且能够顺利link上,所就先拿来给大家分享一下了。哪位熟悉gmsnbo的老手可以帮忙测试一下。非常感谢!

附文:
Installing NBO 5.9 in GAMESS (version 1-OCT-2010 R1):

1.  Compile and link GAMESS.  Ensure that GAMESS functions
    appropriately before attempting the NBO 5.9 installation.

2.  Use the 'enable' program distributed with NBO 5.9 to prepare
    the NBO source code for GAMESS (gmsnbo.f).  Select 32-bit or
    64-bit NBO code depending on whether GAMESS is compiled with
    32-bit (-i4) or 64-bit (-i8) integers.

    Move the NBO source code (gmsnbo.f) to the source directory
    of the GAMESS distribution.  Rename the file gmsnbo.src.

3.  If necessary, search the gmsnbo.src code and replace all
    occurences of GETDM by NBGETDM (this will already have
    been done in more recent NBO 5.9 distributions).

4.  In the GAMESS source directory, make the following modifications
    to the source files prppop.src, rhfuhf.src, and iolib.src:

    a)  prppop.src:  Uncomment the call to RUNNBO.  Also, modify
        this call to read the following:

           IF(NPROC.EQ.1) CALL RUNNBO

        Note that NBO is not prepared to function correctly in
        the parallel version of GAMESS.  Sequential runs only!

    b)  rhfuhf.src:  Insert the COMMON block /ENEDA/ in the RHFCL
        and UHFOP routines.

           COMMON /ENEDA / E0

    c)  rhfuhf.src:  Insert the following instruction immediately
        after the ETOT = EHF+EN line of the UHFOP routine.

           IF(ITER.EQ.1) E0 = ETOT

    d)  iolib.src:  In the routine DAREAD, change the following
        instruction

           IF(LEN.LE.0           ) GO TO 810

        to read

           IF(LEN.LT.0           ) GO TO 810

        Also, change the instruction

           CALL DARD(V(IS),LENW,IDAF,NSP,IDTYP)

        to read

           IF(LENW .GT. 0) CALL DARD(V(IS),LENW,IDAF,NSP,IDTYP)

    e)  iolib.src:  In the routine DAWRIT, change the following
        instruction

           IF (N .GT. 0 .AND. LEN .NE. IFILEN(NREC)) GO TO 800

        to read

           IF (N .GT. 0 .AND. LEN .GT. IFILEN(NREC)) GO TO 800

5.  Add the following line to the activate and compile steps of the
    compall script in the root GAMESS directory.

           ./comp gmsnbo

6.  Include gmsnbo.o in the STANDARD_GAMESS_OBJ1 environment
    variable of the lked script.

7.  Compile and link GAMESS.

    Note: NBO will fail if 32-/64-bit integers were inappropriately
    selected in step 2.


NBO Limitations:

1.  NBO will fail if GAMESS is run in parallel.  Request NBO only for
    single-processor (sequential) calculations.

[ Last edited by 寒雨人生 on 2011-12-24 at 20:57 ]
回复此楼

» 收录本帖的淘帖专辑推荐

计算

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

小木虫(金币+0.5):给个红包,谢谢回帖
顶一下,感谢分享
2楼2012-01-11 23:39:39
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yjr

铁杆木虫 (正式写手)


小木虫: 金币+0.5, 给个红包,谢谢回帖
你好能否传一份给我?
yangjinrong_long@126.com
3楼2012-05-01 20:33:34
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 寒雨人生 的主题更新
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见