Replies: 3 comments 4 replies
-
What kind of GPU are you trying this on? An NVIDIA one using the CUDA backend? |
Beta Was this translation helpful? Give feedback.
3 replies
-
IME "invalid device symbol" usually means the code has been compiled for the wrong GPU architecture. What model GPU are you using? Do you know what architecture flags are being passed to the compiler, e.g. |
Beta Was this translation helpful? Give feedback.
1 reply
-
The issue has been resolved. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have successfully developed a CFD solver using AMRex, it works well on cpu, and I am now trying to make it work on GPU as well. The code can be compiled successfully by using CUDA, but it encounters some issues at the running stage. I am trying to get help from here to fix it, some major potential problems are as follows:
In this solver, "particle" is used for fluid-structure interaction. From my understanding, if we want the code work on GPU, we do not need to manage the memory on GPU, as AMRex will handle it automactically when the calculation is wokring on GPU. If this is not the case, please point it out.
After the particle is initialized, then "Redistribute()" is called to distribute the particles to the right place, errors happened in calling Redistribute() using GPU. Note, it works well on CPU, does it mean we need to do something else when run it on GPU, as I can see Redistribute() will call RedistributeGPU() when GPU is used.
When I was trying to transverse the particles using the following code, errors also happened. From the GPU example "ElectromagneticPIC" provided, it also traverses the particle like this, it seems that we do not need to manage the particle memory, and AMRex will handle the data transfer between CPU and GPU automatically when required.
8: main3d.gnu.DEBUG.MPI.CUDA.ex() [0x4265d6]
amrex::ParIter<0, 0, 28, 0, amrex::ArenaAllocator>::~ParIter()
/Exec/../../amrex/Src/Particle/AMReX_ParIter.H:99:7
This is the defninition of MyParIter:
{
public:
using amrex::ParIter<0, 0, PIdx::nattribs>::ParIter;
using RealVector = ParIter::ContainerType::RealVector;
};
If you have any thoughts in terms of the adaptation of the CPU code to GPU, please let me know. Thanks very much!
Beta Was this translation helpful? Give feedback.
All reactions