-
Hi, I find it curious that espresso with CUDA enabled will spawn a GPU process regardless if the simulation actually uses GPUs. basically import espressomd will spawn a process that reserves some amount of VRAM. Is this intended behaviour? is there a particular reason this should happen? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, I don't know for sure, but this is probably a relic of how the CUDA interface had to be initialized at the very beginning (during I could see two obstacles to such a refactoring: 1) CUDA state initialization can only happen on the head node, but the MPI logic cannot be included in .cu files, so several CUDA algorithms would require a hook to call the initialization code only on the head node; and 2) the electrokinetics code doesn't have a constructor and therefore its lifetime isn't well-defined, one would have to make sure whether the That would be a lot of work, though. If this is important to you and you would like to investigate the issue, it's probably better to wait until ESPResSo 4.3 is released, as it will be much easier to read through the CUDA code. In particular, the old GPU electrokinetics and GPU LB code will be replaced by waLBerla code. |
Beta Was this translation helpful? Give feedback.
Hi,
I don't know for sure, but this is probably a relic of how the CUDA interface had to be initialized at the very beginning (during
import espressomd
), so that GPU algorithms like Stokesian, MMM1D, P3M and electrokinetics could access the device properties and device arrays on-demand, i.e. without having to initialize anything on the device other than the particle data. The GPU code a changed somewhat since 4.1 Perhaps the code is now in a state where GPU process initialization can be deferred until the C++ object of a GPU algorithm is initialized.I could see two obstacles to such a refactoring: 1) CUDA state initialization can only happen on the head node, but the MPI logic cannot be …