Skip to content

Add multiple GPUs support for the Python interface#823

Open
quocdang1998 wants to merge 1 commit intoOpen-Sn:mainfrom
quocdang1998:python-multi-gpus
Open

Add multiple GPUs support for the Python interface#823
quocdang1998 wants to merge 1 commit intoOpen-Sn:mainfrom
quocdang1998:python-multi-gpus

Conversation

@quocdang1998
Copy link
Copy Markdown
Collaborator

In this PR, the GPU selection feature is added to the Python interface, allowing users to launch tests on multiple GPUs when more than one GPU is accessible to an MPI rank.

@quocdang1998 quocdang1998 force-pushed the python-multi-gpus branch 2 times, most recently from 65b92c9 to d4d927d Compare November 6, 2025 21:51
@wdhawkins
Copy link
Copy Markdown
Collaborator

A quick comment. This functionality could be useful for testing and/or running on single-user workstations, but really shouldn't be used for production runs on large machines. When there are multiple GPUs on a node, we should leave it up to the job scheduler to associate ranks with GPUs (with the hope that the scheduler does this intelligently and takes CPU/GPU affinity into account). We should probably add a note to that effect in the documentation for these methods.

shell: bash
run: |
module load python3/3.12.3 opensn/gcc/14 doxygen/1.13.2 pandoc/3.6.4
export CMAKE_ARGS="-DOPENSN_WITH_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=89 -DOPENSN_WITH_PYTHON_MODULE=ON"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed for doco build now?

Will people on machines without nvidia GPU be able to generate doco without this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants