计算化学公社

 找回密码 Forget password
 注册 Register
Views: 11761|回复 Reply: 5
打印 Print 上一主题 Last thread 下一主题 Next thread

[GAMESS-US] 在GAMESS-US中设定内存分配方式

[复制链接 Copy URL]

5万

帖子

99

威望

5万

eV
积分
112354

管理员

公社社长

这篇文章转自http://molecularmodelingbasics.blogspot.jp/2009/08/gamess-memory-and-parallel_20.html,介绍了如何合理地在GAMESS-US中设定内存使用量,比较浅显易懂。其中包括两个视频演示(youtube)

The screencast above is a repeat from the last post, where I computed the frequencies of a molecule at the RHF/3-21G level of theory (second screencast) and discovered that the amount of memory that GAMESS requests (1,000,000 words) was not enough. While GAMESS tells me how much it needs in the output file, it does so after a lot of computation, which is wasted because I have to start over.

In this post I discuss the basics of GAMESS memory requirements. The simplest case is when you are not running in parallel, i.e. the number of processors in GAMESSQ is set to 1, so I discuss this case first.

1. Memory is specified in $system, and the default is 1 mega-word (i.e. 1,000,000 words):

$system mwords=1 $end

mword can only be integers (1, 2, 3, ..). (In the screencast above I used the older "memory" keyword but mwords is much more convenient.)

2. A word is 8 bytes, so the default memory request (1 mega-word) is a very modest 8 MB of RAM.

3. This is the maximum amount of memory GAMESS is allowed to use. Depending on the type of calculation GAMESS might use less. The option is there to avoid filling up the memory on the computer entirely, which will crash or freeze the computer.

4. Here is the simplest way to deal with memory: My current laptop computer has 2 GB of RAM, and I use it for other things while GAMESS is running, so I am willing to give GAMESS a maximum of roughly 1 GB of RAM. This translates to

1 GB ≈ 1,000 MB ≈ 125 mwords

5. Adding

$system mwords=125 $end
to all input files will allow me to run most GAMESS jobs that I would want to run on a laptop without ever getting a "not enough memory" error (of course if you have less memory you need to adjust mwords accordingly).

That's basically it. What follows is some more details that most casual users of GAMESS won't have to worry about.

6. Most common GAMESS runs will never get close to using 1 GB of RAM, meaning the memory is free to be used by other programs. The most common types of runs that potentially could use that much memory are frequency calculations using RHF and any kind of MP2 calculation. Slightly less common ones are TDDFT and NMR calculations. In GAMESS, DFT frequency calculations are done numerically, and do not require a lot of memory.

7. If you are in doubt whether you have reqeusted enough memory to perform a calculation it is possible to use GAMESS to check using

$contrl exetyp=check $end

This keyword will simulate an actual GAMESS run by skipping the most time consuming steps so it is very fast.

I show two examples (an RHF/3-21G frequency and MP2/6-31G(d) single calculations on 3TSa) in this screencast.

【视频链接:https://www.youtube.com/watch?x-yt-ts=1421914688&v=WxtHekp9IMY&feature=player_embedded&x-yt-cl=84503534



Parallel runs

8. Many desktop computers (and almost all larger computers) have more than one CPU (also known as cores). For example, my current laptop has one processor with 2 cores. Thus, I could make my GAMESS calculations go faster by specifying 2 processors when submitting with GAMESSQ (processor = core in GAMESS-speak). This means that two separate but related GAMESS calculations are running simultaneously, and this affects the memory request:

9. Most types of runs use replicated memory. This means that if mwords=1 but I ask for 2 processors, GAMESS will use a maximum of 2 mega-words. Thus, if I routinely use 2 processors when running on my laptop and want to impose a limit of 1 GB RAM, I should use

$system mwords=63 $end

instead of 125.

10. The most common exception to this is MP2 calculations, where GAMESS uses both replicated (mwords) and distributed memory (memddi). Distributed memory is memory shared by the cores. If I specify memddi=100 and ask for 2 processors then 100 mega-words of RAM is distributed among the 2 processors (the simplest case is that each core gets 50 mega-words, but GAMESS figures that out for you).

So running on 2 processors with

$system mwords=15 memddi=100 $end
requests a total of (15 + 15 + 100 =) 130 mwords. You can use exetyp=check to figure out the optimum values of memory and memddi, as I show in this screencast.

【视频链接:https://www.youtube.com/watch?x-yt-ts=1421914688&v=KUBYyOJGA9M&x-yt-cl=84503534&feature=player_embedded

The screencast shows how you can use 1 processor and

$contrl exetyp=check $end
$system memddi=100 parall=.t. $end


to check the memddi requirements. You need to make memddi large for this to work, but GAMESS will not use this memory during the check-run. Note that parall only "does something" for check runs: true parallel runs are specified by choosing more than 1 processors when you submit GAMESS.

You can get a complete list of runs that require memddi in Chapter 2 of the GAMESS documentation under the entry for $system. Also, Chapter 5 has a more in-depth description of how memory is handled.
北京科音自然科学研究中心http://www.keinsci.com)致力于计算化学的发展和传播,长期开办高质量的各种计算化学类培训:初级量子化学培训班中级量子化学培训班高级量子化学培训班量子化学波函数分析与Multiwfn程序培训班分子动力学与GROMACS培训班CP2K第一性原理计算培训班,内容介绍以及往届资料购买请点击相应链接查看。这些培训是计算化学从零快速入门以及进一步全面系统性提升研究水平的高速路!培训各种常见问题见《北京科音办的培训班FAQ》
欢迎加入“北京科音”微信公众号获取北京科音培训的最新消息、避免错过网上有价值的计算化学文章!
欢迎加入人气非常高、专业性特别强的综合性理论与计算化学交流QQ群“思想家公社QQ群”:1号:18616395,2号:466017436,3号:764390338,搜索群号能搜到哪个说明目前哪个能加,合计9000人。北京科音培训班的学员在群中可申请VIP头衔,提问将得到群主Sobereva的最优先解答。
思想家公社的门口Blog:http://sobereva.com(发布大量原创计算化学相关博文)
Multiwfn主页:http://sobereva.com/multiwfn(十分强大的量子化学波函数分析程序)
ResearchGate:https://www.researchgate.net/profile/Tian_Lu
Money and papers are rubbish, get a real life!

28

帖子

0

威望

285

eV
积分
313

Level 3 能力者

2#
发表于 Post on 2015-1-26 13:31:09 | 只看该作者 Only view this author
it is very detailed and useful for me ! thank you very much!

239

帖子

0

威望

2328

eV
积分
2567

Level 5 (御坂)

3#
发表于 Post on 2015-1-26 15:07:26 | 只看该作者 Only view this author
学习一下,昨晚计算还总是内存报错
十室之邑,必有忠信如丘焉,不如丘之好学也。

21

帖子

0

威望

115

eV
积分
136

Level 2 能力者

4#
发表于 Post on 2015-6-4 05:22:29 | 只看该作者 Only view this author
学习了!

41

帖子

0

威望

241

eV
积分
282

Level 3 能力者

5#
发表于 Post on 2024-5-9 23:09:51 | 只看该作者 Only view this author
老师好,我设置好mwords=3000,用44个核后,用exetyp=check可以通过,但是计算时显示报错,看了大家的讨论后我怀疑是因为设置内存比实际内存大。想问一下实际内存有多少在哪里看呢,我的理解是用free -m后看shared部分。不知道是不是这个。

202405092309133704..png (14.01 KB, 下载次数 Times of downloads: 13)

202405092309133704..png

81

帖子

0

威望

1846

eV
积分
1927

Level 5 (御坂)

6#
发表于 Post on 2024-7-17 23:16:29 | 只看该作者 Only view this author
学习了 ! Gamess-US 內存真的麻煩..不友善..

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2024-11-24 05:27 , Processed in 0.179777 second(s), 24 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list