Skip to content
Snippets Groups Projects
Commit 7f4bd0fc authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Enable MAGMA-driven cluster calculation

parent 547678ca
No related branches found
No related tags found
No related merge requests found
...@@ -149,6 +149,9 @@ void cluster(const string& config_file, const string& data_file, const string& o ...@@ -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 ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment