FZJ-JSC / JuML

3 stars 1 forks source link

Check for CUDA-Aware MPI #31

Open cbodenst opened 8 years ago

cbodenst commented 8 years ago

JuML should check for CUDA aware MPI implementation and avoid data copy in front of MPI calls.

cbodenst commented 8 years ago

This would be possible to check for environment variables ; MVAPICH2 has MV2_CUDA . But should we check this at runtime on every MPI call?

Or should we check that once at compile time? <- my opinion

mricherzhagen commented 8 years ago

if it does not need to be present during compile time we need a runtime check. (but that check only once -> JuML init function?)

If it, however, needs to be present during compile time we could disable the runtime check, if its not present.

Markus-Goetz commented 8 years ago

In my opinion we need to check this definitely during runtime for the MPI wrappers. I mean how else could we distinguish whether the current af::array is directly tranferable or not. However, the whole environment variable check needs to be done only once of course. For this we have a JuML init now (see JuML.h). In there you can do the check and then store the result in our core/MPI.h/.cpp in a var and make the can_use_device_pointer function check for it