Pārlūkot izejas kodu

Make STARPU_TASK_SET_MODE also print the codelet mode on incoherency

Samuel Thibault 4 gadi atpakaļ
vecāks
revīzija
6de72f93bc
1 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  1. 6 4
      include/starpu_task.h

+ 6 - 4
include/starpu_task.h

@@ -1395,10 +1395,12 @@ struct starpu_task
 	do {								\
 		if ((task)->cl->nbuffers == STARPU_VARIABLE_NBUFFERS || (task)->cl->nbuffers > STARPU_NMAXBUFS) \
 			if ((task)->dyn_modes) (task)->dyn_modes[i] = mode; else (task)->modes[i] = mode; \
-		else							\
-			STARPU_ASSERT_MSG(STARPU_CODELET_GET_MODE((task)->cl, i)==mode,	\
-				"Task <%s> can't set its  %dth buffer mode and the codelet it derives from uses %d", \
-				(task)->cl->name, i, mode);	\
+		else {							\
+			enum starpu_data_access_mode cl_mode = STARPU_CODELET_GET_MODE((task)->cl, i); \
+			STARPU_ASSERT_MSG(cl_mode == mode,	\
+				"Task <%s> can't set its  %dth buffer mode to %d and the codelet it derives from uses %d", \
+				(task)->cl->name, i, mode, cl_mode);	\
+		} \
 	} while(0)
 
 /**