在ParallelCluster上安装GPU代码

0

【以下的问题经过翻译处理】 我正在尝试使用miniconda安装OpenMM和MD引擎,该引擎利用GPU。我的ParallelCluster配置如下:

  • Head节点:c5.2xlarge。
  • 计算节点:g4dn.metal(T4 GPU)。
  • 从EC2的网络化EFS存储。

我可以在head节点上使用miniconda安装OpenMM,但是当我运行测试以查看OpenMM是否有效时,出现以下错误:

python -m openmm.testInstallation

OpenMM Version: 8.0
Git Revision: a7800059645f4471f4b91c21e742fe5aa4513cda

There are 3 Platforms available:

1 Reference - Successfully computed forces
2 CPU - Successfully computed forces
3 CUDA - Error computing forces with CUDA platform

CUDA platform error: Error initializing CUDA: CUDA_ERROR_NO_DEVICE (100) at /home/conda/feedstock_root/build_artifacts/openmm_1675115856424/work/platforms/cuda/src/CudaContext.cpp:140

Median difference in forces between platforms:

Reference vs. CPU: 6.2955e-06

All differences are within tolerance.

我的head节点缺少GPU,这就解释了为什么会出现CUDA_ERROR_NO_DEVICE的错误。我接下来的想法是交互式地登录到我的一个GPU节点,使用以下命令之一:

salloc --time = 30 --account = centos --nodes = 1
salloc:授予工作分配5

srun --pty --mem=1g -n 1 --gres=gpu:1 -J modbind -p modbind /bin/bash

尽管第一次尝试显示我处于交互模式,但实际上并没有将我登录到GPU节点(lspci -v的输出在之前和之后完全相同)。第二次尝试使用SRUN仅仅是一直等待。

我还参考了使用spack进行的AWS上的GROMACS工作坊https://catalog.workshops.aws/gromacs-on-aws

profile picture
专家
已提问 5 个月前8 查看次数
1 回答
0

【以下的回答经过翻译处理】 嗨@blakem,

我确认第一个问题是由于头节点缺少GPU。要在其中一个计算节点内进行实验,您可以提交作业,检索节点主机名,然后在作业正在运行时使用SSH连接到该节点:

[ec2-user@ip-10-0-0-33 ~]$ sbatch --wrap "sleep 100"
Submitted batch job 1

[ec2-user@ip-10-0-0-33 ~]$ squeue
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
                 1    queue1     wrap ec2-user R       0:03      1 queue1-dy-queue1-t2medium-1

[ec2-user@ip-10-0-0-33 ~]$ ssh queue1-dy-queue1-t2medium-1

进入计算节点后,您可以尝试手动在其中安装软件包。如果按预期工作,则可以使用 OnNodeConfigured 自定义引导操作自动安装软件包:https://docs.aws.amazon.com/parallelcluster/latest/ug/custom-bootstrap-actions-v3.html

恩里科

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则