Commit 7f4bd0fc authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Enable MAGMA-driven cluster calculation

parent 547678ca
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -149,6 +149,9 @@ void cluster(const string& config_file, const string& data_file, const string& o
    if (tppoan.is_open()) {
    if (tppoan.is_open()) {
#ifdef USE_LAPACK
#ifdef USE_LAPACK
      logger->log("INFO: using LAPACK calls.\n", LOG_INFO);
      logger->log("INFO: using LAPACK calls.\n", LOG_INFO);
#elif defined USE_MAGMA
      logger->log("INFO: using MAGMA calls.\n", LOG_INFO);
      magma_init();
#else
#else
      logger->log("INFO: using fall-back lucin() calls.\n", LOG_INFO);
      logger->log("INFO: using fall-back lucin() calls.\n", LOG_INFO);
#endif
#endif
@@ -280,9 +283,12 @@ void cluster(const string& config_file, const string& data_file, const string& o
#endif
#endif
      tppoanp->close();
      tppoanp->close();
      delete tppoanp;
      delete tppoanp;
#ifdef USE_MAGMA
      magma_finalize();
#endif
    } else { // In case TPPOAN could not be opened. Should never happen.
    } else { // In case TPPOAN could not be opened. Should never happen.
      logger->err("\nERROR: failed to open TPPOAN file.\n");
      logger->err("\nERROR: failed to open TPPOAN file.\n");
    }
    } // closes if (tppoan.is_open) ... else ...
    fclose(output);
    fclose(output);
    // Clean memory
    // Clean memory
    delete cid;
    delete cid;