Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid configuration argument when running with 1 GPU #452

Open
edbennett opened this issue Feb 13, 2024 · 0 comments
Open

invalid configuration argument when running with 1 GPU #452

edbennett opened this issue Feb 13, 2024 · 0 comments
Labels

Comments

@edbennett
Copy link
Contributor

Describe the issue:

When compiling Grid and running with a single GPU, running e.g. Benchmark_ITT gives the error:

accelerator_barrier(): Cuda error invalid configuration argument

Digging into this, this is due to line 137 of Grid/threads/Accelerator.h

dim3 cu_blocks ((num1+nt-1)/nt,num2,1);                   \

For reasons I haven't dug deep enough to understand, when running with 1 GPU, then (num1+nt-1)/nt (or in the specific case that fails—called from WilsonKernelsImplementation.h(sz+nt-1)/nt) gets set to zero, which isn't a valid block count.

As a workaround, changing line 137 to

dim3 cu_blocks ((num1+nt-1)/nt == 0 ? 1 : (num1+nt-1)/nt,num2,1);                   \

allows the code to run correctly.

Code example:

N/A

Target platform:

Tested on Grace Hopper Arm+H100, Leicester Arm+A100, and AMD Rome + A100 in Swansea.

Configure options:

../configure --enable-comms=none --enable-simd=GPU --enable-accelerator=cuda CXX=nvcc --disable-zmobius --disable-gparity 'CXXFLAGS=-g -gencode arch=compute_90,code=sm_90 -std=c++17 -DEIGEN_DONT_VECTORIZE'
@edbennett edbennett added the bug label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant