// GMu note: MAGMA does not necessarily rely on CUDA, it may just as well run on openCL or HIP, we should consider alternative ways to detect the number of devices if MAGMA is not using CUDA but something else
cudaGetDeviceCount(&device_count);
logger->log("DEBUG: Proc-"+to_string(mpidata->rank)+" found "+to_string(device_count)+" CUDA devices.\n",LOG_DEBG);
logger->log("INFO: Process "+to_string(mpidata->rank)+" initializes MAGMA.\n");
// do the first iteration on jxi488 separately, since it seems to be different from the others
intjxi488=1;
// In the first iteration, if refinement is enabled, determine the number of refinement iterations required to arrive at the target accuracy (if achievable in a reasonable number of iterations)
cid->refinemode=2;
// maxrefiters and accuracygoal should be configurable and preferably set somewhere else
@@ -47,6 +47,6 @@ void magma_zinvert(dcomplex **mat, np_int n, int &jer, int device_id=0);
* \param accuracygoal: `double` Accuracy to achieve in iterative refinement, defined as the module of the maximum difference between the identity matrix and the matrix product of the (approximate) inverse times the original matrix. On return, it contains the actually achieved accuracy
* \param device_id: `int` ID of the device for matrix inversion offloading.