Bläddra i källkod

Fix build with older versions of simgrid

Samuel Thibault 9 år sedan
förälder
incheckning
c5d5da6ee7
2 ändrade filer med 3 tillägg och 1 borttagningar
  1. 1 1
      configure.ac
  2. 2 0
      mpi/src/starpu_mpi.c

+ 1 - 1
configure.ac

@@ -1059,7 +1059,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_FUNCS([MSG_process_join MSG_get_as_by_name MSG_environment_get_routing_root xbt_mutex_try_acquire])
+   	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([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([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_COMPILE_IFELSE([AC_LANG_PROGRAM(

+ 2 - 0
mpi/src/starpu_mpi.c

@@ -1282,8 +1282,10 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 		argv_cpy[i] = strdup((*(argc_argv->argv))[i]);
 	MSG_process_create_with_arguments("main", smpi_simulated_main_, NULL, _starpu_simgrid_get_host_by_name("MAIN"), *(argc_argv->argc), argv_cpy);
 	/* And set TSD for us */
+#ifdef HAVE_SMPI_PROCESS_SET_USER_DATA
 	smpi_process_set_user_data(calloc(MAX_TSD, sizeof(void*)));
 #endif
+#endif
 
 	STARPU_PTHREAD_MUTEX_LOCK(&mutex);