Pārlūkot izejas kodu

Replace deprecated sg_actor_self_execute with sg_actor_execute

Samuel Thibault 5 gadi atpakaļ
vecāks
revīzija
fc055e751b
2 mainītis faili ar 7 papildinājumiem un 3 dzēšanām
  1. 1 1
      configure.ac
  2. 6 2
      src/core/simgrid.c

+ 1 - 1
configure.ac

@@ -199,7 +199,7 @@ if test x$enable_simgrid = xyes ; then
 	AC_CHECK_FUNCS([xbt_mutex_try_acquire smpi_process_set_user_data SMPI_thread_create sg_zone_get_by_name sg_link_name sg_host_route sg_host_self sg_host_speed simcall_process_create sg_config_continue_after_help])
 	AC_CHECK_FUNCS([simgrid_init], [AC_DEFINE([STARPU_SIMGRID_HAVE_SIMGRID_INIT], [1], [Define to 1 if you have the `simgrid_init' function.])])
 	AC_CHECK_FUNCS([xbt_barrier_init], [AC_DEFINE([STARPU_SIMGRID_HAVE_XBT_BARRIER_INIT], [1], [Define to 1 if you have the `xbt_barrier_init' function.])])
-	AC_CHECK_FUNCS([sg_actor_sleep_for sg_actor_self sg_actor_ref sg_host_get_properties sg_host_send_to sg_host_sendto sg_cfg_set_int sg_actor_self_execute simgrid_get_clock])
+	AC_CHECK_FUNCS([sg_actor_sleep_for sg_actor_self sg_actor_ref sg_host_get_properties sg_host_send_to sg_host_sendto sg_cfg_set_int sg_actor_self_execute sg_actor_execute simgrid_get_clock])
 	AC_CHECK_DECLS([smpi_process_set_user_data], [], [], [[#include <smpi/smpi.h>]])
 
 	# Oldies for compatibility with older simgrid

+ 6 - 2
src/core/simgrid.c

@@ -611,7 +611,9 @@ static void *task_execute(void *arg)
 			w->last_task = NULL;
 
 		_STARPU_DEBUG("task %p started\n", task);
-#ifdef HAVE_SG_ACTOR_SELF_EXECUTE
+#ifdef HAVE_SG_ACTOR_EXECUTE
+		sg_actor_execute(task->flops);
+#elif defined(HAVE_SG_ACTOR_SELF_EXECUTE)
 		sg_actor_self_execute(task->flops);
 #else
 		MSG_task_execute(task->task);
@@ -697,7 +699,9 @@ void _starpu_simgrid_submit_job(int workerid, struct _starpu_job *j, struct star
 		/* Synchronous execution */
 		/* First wait for previous tasks */
 		_starpu_simgrid_wait_tasks(workerid);
-#ifdef HAVE_SG_ACTOR_SELF_EXECUTE
+#ifdef HAVE_SG_ACTOR_EXECUTE
+		sg_actor_execute(flops);
+#elif defined(HAVE_SG_ACTOR_SELF_EXECUTE)
 		sg_actor_self_execute(flops);
 #else
 		MSG_task_execute(simgrid_task);