浏览代码

avoid using deprecated simgrid function

Samuel Thibault 9 年之前
父节点
当前提交
09a252be33
共有 3 个文件被更改,包括 9 次插入1 次删除
  1. 1 1
      configure.ac
  2. 4 0
      src/core/simgrid.c
  3. 4 0
      src/drivers/opencl/driver_opencl.c

+ 1 - 1
configure.ac

@@ -1075,7 +1075,7 @@ if test x$enable_simgrid = xyes ; then
 		]
 		]
 	)
 	)
 	AC_CHECK_HEADERS([simgrid/msg.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_MSG_H], [1], [Define to 1 if you have msg.h in simgrid/.])])
 	AC_CHECK_HEADERS([simgrid/msg.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_MSG_H], [1], [Define to 1 if you have msg.h in simgrid/.])])
-   	AC_CHECK_FUNCS([MSG_process_join MSG_get_as_by_name MSG_environment_get_routing_root xbt_mutex_try_acquire smpi_process_set_user_data])
+   	AC_CHECK_FUNCS([MSG_process_join MSG_get_as_by_name MSG_environment_get_routing_root MSG_host_get_speed xbt_mutex_try_acquire smpi_process_set_user_data])
 	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([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_DECLS([smpi_process_set_user_data], [], [], [[#include <smpi/smpi.h>]])
 	AC_CHECK_DECLS([smpi_process_set_user_data], [], [], [[#include <smpi/smpi.h>]])
 	AC_CHECK_FUNCS([SIMIX_process_get_code], [AC_DEFINE([STARPU_SIMGRID_HAVE_SIMIX_PROCESS_GET_CODE], [1], [Define to 1 if you have the `SIMIX_process_get_code' function.])])
 	AC_CHECK_FUNCS([SIMIX_process_get_code], [AC_DEFINE([STARPU_SIMGRID_HAVE_SIMIX_PROCESS_GET_CODE], [1], [Define to 1 if you have the `SIMIX_process_get_code' function.])])

+ 4 - 0
src/core/simgrid.c

@@ -348,7 +348,11 @@ void _starpu_simgrid_submit_job(int workerid, struct _starpu_job *j, struct star
 	}
 	}
 
 
 	simgrid_task = MSG_task_create(_starpu_job_get_task_name(j),
 	simgrid_task = MSG_task_create(_starpu_job_get_task_name(j),
+#ifdef HAVE_MSG_HOST_GET_SPEED
 			length/1000000.0*MSG_get_host_speed(MSG_host_self()),
 			length/1000000.0*MSG_get_host_speed(MSG_host_self()),
+#else
+			length/1000000.0*MSG_host_get_speed(MSG_host_self()),
+#endif
 			0, NULL);
 			0, NULL);
 
 
 	if (finished == NULL)
 	if (finished == NULL)

+ 4 - 0
src/drivers/opencl/driver_opencl.c

@@ -946,7 +946,11 @@ static int _starpu_opencl_start_job(struct _starpu_job *j, struct _starpu_worker
 		    #endif
 		    #endif
 			struct starpu_profiling_task_info *profiling_info = task->profiling_info;
 			struct starpu_profiling_task_info *profiling_info = task->profiling_info;
 			STARPU_ASSERT_MSG(profiling_info->used_cycles, "Application kernel must call starpu_opencl_collect_stats to collect simulated time");
 			STARPU_ASSERT_MSG(profiling_info->used_cycles, "Application kernel must call starpu_opencl_collect_stats to collect simulated time");
+#ifdef HAVE_MSG_HOST_GET_SPEED
+			length = ((double) profiling_info->used_cycles)/MSG_host_get_speed(MSG_host_self());
+#else
 			length = ((double) profiling_info->used_cycles)/MSG_get_host_speed(MSG_host_self());
 			length = ((double) profiling_info->used_cycles)/MSG_get_host_speed(MSG_host_self());
+#endif
 			/* And give the simulated time to simgrid */
 			/* And give the simulated time to simgrid */
 			simulate = 1;
 			simulate = 1;
 		#endif
 		#endif