瀏覽代碼

Tell simgrid not to stop on --help

Samuel Thibault 7 年之前
父節點
當前提交
5a69695aae
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 1 1
      configure.ac
  2. 6 0
      src/core/simgrid.c

+ 1 - 1
configure.ac

@@ -170,7 +170,7 @@ if test x$enable_simgrid = xyes ; then
 
 	# Latest functions
 	AC_CHECK_FUNCS([MSG_process_attach MSG_zone_get_hosts MSG_process_self_name])
-	AC_CHECK_FUNCS([xbt_mutex_try_acquire smpi_process_set_user_data sg_zone_get_by_name sg_link_name sg_host_route sg_host_self sg_host_speed simcall_process_create])
+	AC_CHECK_FUNCS([xbt_mutex_try_acquire smpi_process_set_user_data 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([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>]])
 

+ 6 - 0
src/core/simgrid.c

@@ -288,6 +288,9 @@ extern void *smpi_process_get_user_data();
 #pragma weak main
 int main(int argc, char **argv)
 {
+#ifdef HAVE_SG_CONFIG_CONTINUE_AFTER_HELP
+	sg_config_continue_after_help();
+#endif
 	if (_starpu_simgrid_running_smpi())
 	{
 		if (!smpi_process_get_user_data)
@@ -345,6 +348,9 @@ static void maestro(void *data STARPU_ATTRIBUTE_UNUSED)
 /* This is called early from starpu_init, so thread functions etc. can work */
 void _starpu_simgrid_init_early(int *argc STARPU_ATTRIBUTE_UNUSED, char ***argv STARPU_ATTRIBUTE_UNUSED)
 {
+#ifdef HAVE_SG_CONFIG_CONTINUE_AFTER_HELP
+	sg_config_continue_after_help();
+#endif
 #if defined(HAVE_MSG_PROCESS_ATTACH) || defined(MSG_process_attach)
 	if (simgrid_started < 2 && !_starpu_simgrid_running_smpi())
 	{