From 036be0d12ef2c4fa234835c7ed51c41927f4fe2c Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Thu, 17 Oct 2024 11:38:58 +0200
Subject: [PATCH] codelet/lacpy: Protect lacpy in starpu codelet

---
 runtime/starpu/codelets/codelet_zlacpy.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/runtime/starpu/codelets/codelet_zlacpy.c b/runtime/starpu/codelets/codelet_zlacpy.c
index aa8d73ed3..93c951a24 100644
--- a/runtime/starpu/codelets/codelet_zlacpy.c
+++ b/runtime/starpu/codelets/codelet_zlacpy.c
@@ -21,7 +21,7 @@
  * @author Florent Pruvost
  * @author Samuel Thibault
  * @author Alycia Lisito
- * @date 2024-03-16
+ * @date 2024-10-17
  * @precisions normal z -> c d s
  *
  */
@@ -148,7 +148,8 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options,
 
 #if !defined(CHAMELEON_USE_MPI) || defined(HAVE_STARPU_MPI_DATA_CPY_PRIORITY)
     /* Insert the task */
-    if ( (uplo == ChamUpperLower) &&
+    if ( (!options->withlacpy) &&
+         (uplo == ChamUpperLower) &&
          (tileA->m == m) && (tileA->n == n) &&
          (tileB->m == m) && (tileB->n == n) &&
          (displA == 0) && (displB == 0) )
@@ -225,7 +226,8 @@ void INSERT_TASK_zlacpy( const RUNTIME_option_t *options,
 
 #if !defined(CHAMELEON_USE_MPI) || defined(HAVE_STARPU_MPI_DATA_CPY_PRIORITY)
     /* Insert the task */
-    if ( (uplo == ChamUpperLower) &&
+    if ( (!options->withlacpy) &&
+         (uplo == ChamUpperLower) &&
          (tileA->m == m) && (tileA->n == n) &&
          (tileB->m == m) && (tileB->n == n) )
     {
-- 
GitLab