This commit fixes a minor issue with pddrive when GPU offloading is disabled at runtime (i.e., SUPERLU_ACC_OFFLOAD=0) by skipping the initialisation of cublas. Otherwise, this could lead to an error or hang in cublasDestroy. (I observed this issue when running on CPU-only nodes of NERSC's Perlmutter with a version of SuperLU_dist that is built with GPU support enabled.)
The fix is simply to check the environment variable SUPERLU_ACC_OFFLOAD before initialising cublas.
This commit fixes a minor issue with pddrive when GPU offloading is disabled at runtime (i.e., SUPERLU_ACC_OFFLOAD=0) by skipping the initialisation of cublas. Otherwise, this could lead to an error or hang in cublasDestroy. (I observed this issue when running on CPU-only nodes of NERSC's Perlmutter with a version of SuperLU_dist that is built with GPU support enabled.)
The fix is simply to check the environment variable SUPERLU_ACC_OFFLOAD before initialising cublas.