Commit 4c7ca547 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Enclose MAGMA offload code under USE_TARGET_OFFLOAD condition

parent 8f0e1a2c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -884,7 +884,10 @@ int cluster_jxi488_cycle(
  delete outam0;
#endif // DEBUG_AM
  if (rs.use_offload) {
    // whenever rs.use_offload == true, USE_TARGET_OFFLOAD is defined.
    // whenever rs.use_offload == true, USE_TARGET_OFFLOAD is defined, but we
    // have to check for the compilation flag in order to avoid the compiler
    // to walk the code, if the offload library functions are not available
#ifdef USE_TARGET_OFFLOAD
#ifdef USE_MAGMA
    const int ind3j_size = (cid->c1->lm + 1) * cid->c1->lm;
    const int nv3j = cid->c1->nv3j;
@@ -949,6 +952,11 @@ int cluster_jxi488_cycle(
    invert_matrix(cid->am, ndit, jer, output_path, jxi488, mxndm, cid->proc_device, rs);
    ztm(cid->am, cid->c1);
#endif // USE_MAGMA
#else // NO_USE_TARGET_OFFLOAD
    message = "ERROR: offload required, but not supported!\n"; // should never occur
    logger->err(message);
    exit(1);
#endif // USE_TARGET_OFFLOAD
  } else {
#ifdef USE_NVTX
    nvtxRangePush("Calculate inverted matrix");