Is it reasonable to use cublasGetCurrentCtx in an MPI environment, even though it is undocumented, or will it disappear from CUBLAS some day?
CUBLAS 4.0 requires to pass a handle to cublas context (cublasHandle_t), and of several alternatives
(e.g. storing a handle in a global variable; passing a handle by value as an additional argument to many functions)
calling cublasGetCurrentCtx appears to be the simplest and the most elegant.