pyscf / gpu4pyscf

A plugin to use Nvidia GPU in PySCF package
GNU General Public License v3.0
106 stars 18 forks source link

Issue with QM Calculations Terminating Prematurely When Assigned to Individual GPUs #154

Open ORCAaAaA-ui opened 2 months ago

ORCAaAaA-ui commented 2 months ago

I am experiencing an issue with running QM calculations on individual GPUs. When assigning QM calculations to separate GPUs, the calculations terminate prematurely without completing. This issue does not occur when running the calculations on a single GPU. I have ensured that each GPU has sufficient memory.

Any recommended steps to further diagnose and resolve this issue?

I appreciate any assistance or guidance on this issue. Thank you.

wxj6000 commented 1 month ago

@ORCAaAaA-ui How do you assign QM calculations to separate GPUs? Can you share the script here for diagnosing?

wxj6000 commented 1 month ago

@ORCAaAaA-ui There are at least two ways to select individual GPU. 1) Use docker. You can specify which GPU is visible when you run docker run. 2) Use CuPy. https://docs.cupy.dev/en/stable/reference/generated/cupy.cuda.Device.html But you can only import gpu4pyscf modules when the device is selected.

When the above PR is merged, one can import GPU4PySCF before the device is selected.

ORCAaAaA-ui commented 1 month ago

@wxj6000 I simply excuted the command, 'export CUDA_VISIBLE_DEVICES=0 or 1', to assign jobs to each GPU.