From 1f7476fe70d57b916e3d13e42b98187a1c4240bc Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Tue, 2 May 2017 18:20:34 +0200
Subject: [PATCH] Remove magma from crontrol directory

---
 control/common.h    | 12 ++----------
 control/config.h.in |  3 ---
 control/control.c   |  6 ------
 control/workspace.c |  4 ----
 4 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/control/common.h b/control/common.h
index ab1a98867..194359d3b 100644
--- a/control/common.h
+++ b/control/common.h
@@ -69,17 +69,9 @@
 #include <mpi.h>
 #endif
 
-
-/** ****************************************************************************
- * Linear Algebra headers
- **/
-#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
-#include <magma.h>
-#endif
-
 /** ****************************************************************************
- *  Line to avoid conflict with magma, because, we don't know why
- *  but lapacke provide a wrong interface of lapack in fortran
+ *  Line to avoid conflict with other linear algebra libraries, because, we
+ *  don't know why but lapacke provide a wrong interface of lapack in fortran
  **/
 #ifndef LAPACK_NAME
 #define LAPACK_NAME(a, b) lapackef77_##a
diff --git a/control/config.h.in b/control/config.h.in
index 6691c4c16..48c3ce5aa 100644
--- a/control/config.h.in
+++ b/control/config.h.in
@@ -42,7 +42,4 @@
 #cmakedefine HAVE_STARPU_MPI_COMM_RANK
 #cmakedefine HAVE_STARPU_MPI_CACHED_RECEIVE
 
-/* MAGMA functions */
-#cmakedefine HAVE_MAGMA_GETRF_INCPIV_GPU
-
 #endif  /* CONFIG_H_HAS_BEEN_INCLUDED */
diff --git a/control/control.c b/control/control.c
index 9fa06b781..7bb54781d 100644
--- a/control/control.c
+++ b/control/control.c
@@ -110,9 +110,6 @@ int MORSE_InitPar(int ncpus, int ncudas, int nthreads_per_worker)
       }
     }
 #  endif
-#endif
-#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
-    magma_init();
 #endif
     RUNTIME_init_scheduler( morse, ncpus, ncudas, nthreads_per_worker );
     return MORSE_SUCCESS;
@@ -142,9 +139,6 @@ int MORSE_Finalize(void)
     RUNTIME_barrier(morse);
 #  endif
     RUNTIME_finalize_scheduler( morse );
-#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
-    magma_finalize();
-#endif
 
 #if defined(CHAMELEON_USE_MPI)
     if (!morse->mpi_outer_init)
diff --git a/control/workspace.c b/control/workspace.c
index 097a26711..efcb49f8c 100644
--- a/control/workspace.c
+++ b/control/workspace.c
@@ -133,10 +133,6 @@ int morse_alloc_ipiv(int M, int N, MORSE_enum func, int type, MORSE_desc_t **des
     NB = MORSE_NB;
     IB = MORSE_IB;
 
-#if defined(CHAMELEON_USE_MAGMA)
-/*     IB *= 2; */
-#endif
-
     NT = (N%NB==0) ? (N/NB) : ((N/NB)+1);
     MT = (M%NB==0) ? (M/NB) : ((M/NB)+1);
 
-- 
GitLab