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

Problems with CUDA device #102

Open
XzzX opened this issue Jun 17, 2021 · 3 comments
Open

Problems with CUDA device #102

XzzX opened this issue Jun 17, 2021 · 3 comments
Assignees

Comments

@XzzX
Copy link

XzzX commented Jun 17, 2021

I tried to run the provided LJ example on a GPU:

./cbnMD -il in.lj --device-type CUDA

The job crashed with the following error message:

Kokkos::Cuda::initialize WARNING: Cuda is allocating into UVMSpace by default
                                  without setting CUDA_LAUNCH_BLOCKING=1.
                                  The code must call Cuda().fence() after each kernel
                                  or will likely crash when accessing data on the host.
terminate called after throwing an instance of 'std::runtime_error'
  what():  cudaDeviceSynchronize() error( cudaErrorIllegalAddress): an illegal memory access was encountered /.../kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp:144
Traceback functionality not available

What did I do wrong?

@streeve
Copy link
Member

streeve commented Jun 22, 2021

Sorry I missed responding to this.

Can you post a full stack trace and how you configured Kokkos/Cabana? This is likely a bug, but I've never encountered it.

@streeve streeve self-assigned this Jun 22, 2021
@XzzX
Copy link
Author

XzzX commented Jun 24, 2021

I did a standard installation without custom configuration.
Kokkos: I enabled the stuff related to Cuda and architecture AMPERE80.
Cabana: cmake -S CabanaMD -B build -DCabanaMD_LAYOUT=X -DCabanaMD_VECTORLENGTH=Y with different layouts and vector length.
The stacktrace is not very helpful since this is a release build. I only have hex adresses. I will try a debug build.

@XzzX
Copy link
Author

XzzX commented Jun 24, 2021

Here is the stack trace:

/.../kokkos/core/src/impl/Kokkos_Error.cpp:69
/.../gcc/10.2.0/include/c++/10.2.0/bits/basic_string.h:187
/.../gcc/10.2.0/include/c++/10.2.0/bits/stl_tree.h:287
/.../CabanaMD-build/_deps/cabana-src/core/src/Cabana_LinkedCellList.hpp:303
/.../CabanaMD-build/_deps/cabana-src/core/src/Cabana_LinkedCellList.hpp:81 (discriminator 2)
/.../CabanaMD-build/_deps/cabana-src/core/src/Cabana_VerletList.hpp:271 (discriminator 2)
/.../CabanaMD-build/_deps/cabana-src/core/src/Cabana_VerletList.hpp:751
/.../CabanaMD-build/_deps/cabana-src/core/src/Cabana_VerletList.hpp:727 (discriminator 2)
/.../CabanaMD-build/_deps/cabana-src/core/src/Cabana_VerletList.hpp:710
/.../CabanaMD/src/neighbor_types/neighbor_verlet.h:55
/.../CabanaMD/src/cabanamd_impl.h:314
/.../CabanaMD/bin/main.cpp:67

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

No branches or pull requests

2 participants