计算化学公社

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

[GROMACS] 求助:我的电脑配置怎么跑gmx最快

[复制链接 Copy URL]

108

帖子

0

威望

492

eV
积分
600

Level 4 (黑子)

本帖最后由 FrancisLi 于 2022-6-9 10:48 编辑

各位老师好!我一般在电脑上一次跑两个gmx任务,但是感觉速度比预期的要慢,想问下是不是我的操作有问题,应该再加一些限制?(比如-pin什么的,因为我每次跑两个任务,是不是还要加-pinoffset?)
我一般跑gmx的命令:gmx mdrun -ntmpi 2 -ntomp 4 -nb gpu -pme gpu -npme 1 -s eql.tpr -deffnm eql -gputasks 01

我的电脑配置如下:

恳请各位老师指教!






1560

帖子

0

威望

4997

eV
积分
6557

Level 6 (一方通行)

2#
发表于 Post on 2022-6-9 11:22:34 | 只看该作者 Only view this author
本帖最后由 牧生 于 2022-6-9 11:23 编辑

http://bbs.keinsci.com/thread-13861-1-1.html


又菜又爱玩

108

帖子

0

威望

492

eV
积分
600

Level 4 (黑子)

3#
 楼主 Author| 发表于 Post on 2022-6-9 13:42:39 | 只看该作者 Only view this author
牧生 发表于 2022-6-9 11:22
http://bbs.keinsci.com/thread-13861-1-1.html

感谢老师的分享!太赞了

2425

帖子

1

威望

6196

eV
积分
8641

Level 6 (一方通行)

4#
发表于 Post on 2022-6-9 14:43:34 | 只看该作者 Only view this author
如果是怀疑资源分配或者所谓抢资源的问题,
也可以借用SLURM 调度器来操作。

核心是利用Linux 系统的cgroup来实现。

或者你可以不用探究底层的逻辑。
硬件资源经由slurm管制后,
给你10个核心20GB内存,程序就只能在指定的一个子集中活动。
不会出现所谓进程来回切换的问题。

而这一切,都是slurm自动处理,无需人为干预。

你可以自己配置slurm,或者使用我提供的辅助工具。
High-Performance Computing for You
为您专属定制的高性能计算解决方案

更多讯息,请访问:
https://labitc.top
http://tophpc.top:8080
电邮: ask@hpc4you.top

878

帖子

17

威望

5435

eV
积分
6653

Level 6 (一方通行)

小屁孩

5#
发表于 Post on 2022-6-9 16:50:27 | 只看该作者 Only view this author
本帖最后由 Entropy.S.I 于 2022-6-9 16:55 编辑

前提:用2020.7或2021.5,且模型支持-update gpu

任务一:gmx mdrun -v -deffnm md -nt 10 -pin on -pinoffset 0 -pinstride 1 -gpu_id 0 -update gpu

任务二:gmx mdrun -v -deffnm md -nt 10 -pin on -pinoffset 10 -pinstride 1 -gpu_id 1 -update gpu

其他方案就不必试了,这种最快。
如果对单任务速度有极致需求,最好加个NVLink,再用2块GPU跑1个任务。当前CPU太弱,若无NVLink,用2块GPU跑1个任务速度反而低于用1块GPU。

不想再花钱的话,就用如下命令:
gmx mdrun -v -deffnm md -nt 20 -pin on -gpu_id 0 -update gpu



- 向着虚无前进 -

108

帖子

0

威望

492

eV
积分
600

Level 4 (黑子)

6#
 楼主 Author| 发表于 Post on 2022-6-10 04:04:46 | 只看该作者 Only view this author
Entropy.S.I 发表于 2022-6-9 16:50
前提:用2020.7或2021.5,且模型支持-update gpu

任务一:gmx mdrun -v -deffnm md -nt 10 -pin on -pin ...

感谢大佬!这个电脑是有nvlink的,请问怎么跑最快呀

878

帖子

17

威望

5435

eV
积分
6653

Level 6 (一方通行)

小屁孩

7#
发表于 Post on 2022-6-10 11:56:41 | 只看该作者 Only view this author
FrancisLi 发表于 2022-6-10 04:04
感谢大佬!这个电脑是有nvlink的,请问怎么跑最快呀

那好办了,直接gmx mdrun -v -deffnm md -nt 20 -pin on -gpu_id 01 -update gpu
- 向着虚无前进 -

108

帖子

0

威望

492

eV
积分
600

Level 4 (黑子)

8#
 楼主 Author| 发表于 Post on 2022-6-10 12:03:27 | 只看该作者 Only view this author
Entropy.S.I 发表于 2022-6-10 11:56
那好办了,直接gmx mdrun -v -deffnm md -nt 20 -pin on -gpu_id 01 -update gpu

太强了,感谢大佬解答!想问下,我这个电脑是不是跑两个任务最划算呀,如果跑两个以上是不是综合来讲就变慢了?

878

帖子

17

威望

5435

eV
积分
6653

Level 6 (一方通行)

小屁孩

9#
发表于 Post on 2022-6-10 12:18:49 | 只看该作者 Only view this author
FrancisLi 发表于 2022-6-10 12:03
太强了,感谢大佬解答!想问下,我这个电脑是不是跑两个任务最划算呀,如果跑两个以上是不是综合来讲就变 ...

绝对不能跑2个以上任务,否则速度接近0
- 向着虚无前进 -

108

帖子

0

威望

492

eV
积分
600

Level 4 (黑子)

10#
 楼主 Author| 发表于 Post on 2022-6-10 12:45:54 | 只看该作者 Only view this author
Entropy.S.I 发表于 2022-6-10 12:18
绝对不能跑2个以上任务,否则速度接近0

好滴好滴,感谢大佬!

313

帖子

2

威望

3900

eV
积分
4253

Level 6 (一方通行)

11#
发表于 Post on 2022-6-10 13:38:46 | 只看该作者 Only view this author
我提一句,不要一味地追求速度而过度使用2020和2021版本的gromacs,特别是gpu这一块。-update gpu严格意义上来说是不稳定和有bug的,据我所知,2021.6之前的所有使用-update gpu这个选项都会带来某些问题,特别含有水的体系,帖一句开发者讨论的东西:

When using GPU update with SETTLE or LINCS constraints, virial calculations
could have been incorrect on Volta and newer NVIDIA GPUs, which in turn
would lead to incorrect pressure. The GPU update is not enabled by default,
so the error can only appear in simulations where it was manually selected,
and even in this case the error might be rare since we have not observed it
in practice in the testing we have performed.

To check whether your runs could have been affected, please examine your mdrun log file:

- Look for the line "GPU support:        CUDA";
- Look for the line "PP task will update and constrain coordinates on the GPU";
- Check whether any GPU the value of "compute cap." 7.0 or higher in the "GPU Info:" section.

If all three are present, than the bug could have perturbed the virial calculation and,
in turn, led to incorrect pressure coupling. All |Gromacs| version prior to 2021.6 and 2022.0
that allow offloading of the update and constraint calculations to GPUs are affected.

878

帖子

17

威望

5435

eV
积分
6653

Level 6 (一方通行)

小屁孩

12#
发表于 Post on 2022-6-10 14:22:20 | 只看该作者 Only view this author
lyj714 发表于 2022-6-10 13:38
我提一句,不要一味地追求速度而过度使用2020和2021版本的gromacs,特别是gpu这一块。-update gpu严格意义 ...

这段讨论在哪  GitLab上没找到..
- 向着虚无前进 -

144

帖子

0

威望

1830

eV
积分
1974

Level 5 (御坂)

13#
发表于 Post on 2023-3-20 20:56:42 | 只看该作者 Only view this author
lyj714 发表于 2022-6-10 13:38
我提一句,不要一味地追求速度而过度使用2020和2021版本的gromacs,特别是gpu这一块。-update gpu严格意义 ...

实测2020.6-gpu版本确实有问题,用了-update gpu 跑npt导致我freeze组的原子移动了,但是2021.6-gpu却没有。因为我体系有freeze组,所以2021.6没有使用-update gpu,不清楚这个选项在2021.6-gpu上具体有什么影响

878

帖子

17

威望

5435

eV
积分
6653

Level 6 (一方通行)

小屁孩

14#
发表于 Post on 2023-3-20 21:37:01 | 只看该作者 Only view this author
本帖最后由 Entropy.S.I 于 2023-3-20 21:41 编辑
thor 发表于 2023-3-20 20:56
实测2020.6-gpu版本确实有问题,用了-update gpu 跑npt导致我freeze组的原子移动了,但是2021.6-gpu却没 ...

2021.6及以后的版本已经修复了这个问题,认真看Release Notes
如今2023版都默认update GPU了

虽然但是,你所描述的问题大概率不是update GPU引起的,不能胡乱甩锅
- 向着虚无前进 -

144

帖子

0

威望

1830

eV
积分
1974

Level 5 (御坂)

15#
发表于 Post on 2023-3-20 22:33:35 | 只看该作者 Only view this author
Entropy.S.I 发表于 2023-3-20 21:37
2021.6及以后的版本已经修复了这个问题,认真看Release Notes
如今2023版都默认update GPU了

请教一下,我所描述的问题最有可能是什么引起的?

本版积分规则 Credits rule

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

GMT+8, 2026-2-22 09:15 , Processed in 0.187093 second(s), 23 queries , Gzip On.

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