I'm trying to run magmaf_dpotrf from a fortran code, and I want to run OOC as well as multi-gpu. When I do so, I get an error from dpotrf of -6, which, according to the source means that the GPU memory allocation failed. When I examine dpotrf2_ooc.cpp I notice that line 171 is the first cuda driver call of "cuDeviceGet" and if I check the error code it is CUDA_ERROR_NOT_INITIALIZED. This error is thrown if cuInit(0) has not been called. If I insert "cuInit(0)" directly before this call then the code works fine.
Note that for single gpu there is no problem, but in that case the source code calls cudaStreamCreate(), which implicitly includes a call to initialize CUDA.