Kaynağa Gözat

Fix detection of simgrid 3.14.159

Samuel Thibault 7 yıl önce
ebeveyn
işleme
b6daadfab2
3 değiştirilmiş dosya ile 8 ekleme ve 8 silme
  1. 2 2
      src/common/thread.c
  2. 2 2
      src/core/simgrid_cpp.cpp
  3. 4 4
      src/datawizard/malloc.c

+ 2 - 2
src/common/thread.c

@@ -80,7 +80,7 @@ int starpu_pthread_create_on(char *name, starpu_pthread_t *thread, const starpu_
 	void *tsd;
 	_STARPU_CALLOC(tsd, MAX_TSD+1, sizeof(void*));
 	*thread = MSG_process_create_with_arguments(name, _starpu_simgrid_thread_start, tsd, host, 2, _args);
-#if SIMGRID_VERSION >= 31500
+#if SIMGRID_VERSION >= 31500 && SIMGRID_VERSION != 31559
 	MSG_process_ref(*thread);
 #endif
 	return 0;
@@ -95,7 +95,7 @@ int starpu_pthread_join(starpu_pthread_t thread STARPU_ATTRIBUTE_UNUSED, void **
 {
 #if SIMGRID_VERSION >= 31400
 	MSG_process_join(thread, 1000000);
-#if SIMGRID_VERSION >= 31500
+#if SIMGRID_VERSION >= 31500 && SIMGRID_VERSION != 31559
 	MSG_process_unref(thread);
 #endif
 #else

+ 2 - 2
src/core/simgrid_cpp.cpp

@@ -98,12 +98,12 @@ void _starpu_simgrid_xbt_thread_create(const char *name, void_f_pvoid_t code, vo
 	                         SIMIX_host_self(),
 #  endif
 #endif
-#if SIMGRID_VERSION < 31500
+#if SIMGRID_VERSION < 31500 || SIMGRID_VERSION == 31559
 				 -1.0,
 #endif
 				 0, NULL,
 	                         /*props */ NULL
-#if SIMGRID_VERSION < 31500
+#if SIMGRID_VERSION < 31500 || SIMGRID_VERSION == 31559
 				 , 0
 #endif
 				 );

+ 4 - 4
src/datawizard/malloc.c

@@ -60,7 +60,7 @@ static int malloc_on_node_default_flags[STARPU_MAXNODES];
 
 /* This file is used for implementing "folded" allocation */
 #ifdef STARPU_SIMGRID
-#if SIMGRID_VERSION < 31500
+#if SIMGRID_VERSION < 31500 || SIMGRID_VERSION == 31559
 /* TODO: drop when simgrid 3.15 is reasonably largely used by people who need the feature */
 static int bogusfile = -1;
 static unsigned long _starpu_malloc_simulation_fold;
@@ -245,7 +245,7 @@ int _starpu_malloc_flags_on_node(unsigned dst_node, void **A, size_t dim, int fl
 #ifdef STARPU_SIMGRID
 	if (flags & STARPU_MALLOC_SIMULATION_FOLDED)
 	{
-#if SIMGRID_VERSION >= 31500
+#if SIMGRID_VERSION >= 31500 && SIMGRID_VERSION != 31559
 		*A = SMPI_SHARED_MALLOC(dim);
 #else
 		/* TODO: drop when simgrid 3.15 is reasonably largely used by people who need the feature */
@@ -494,7 +494,7 @@ int _starpu_free_flags_on_node(unsigned dst_node, void *A, size_t dim, int flags
 #ifdef STARPU_SIMGRID
 	if (flags & STARPU_MALLOC_SIMULATION_FOLDED)
 	{
-#if SIMGRID_VERSION >= 31500
+#if SIMGRID_VERSION >= 31500 && SIMGRID_VERSION != 31559
 		SMPI_SHARED_FREE(A);
 #else
 		/* TODO: drop when simgrid 3.15 is reasonably largely used by people who need the feature */
@@ -879,7 +879,7 @@ _starpu_malloc_init(unsigned dst_node)
 	disable_pinning = starpu_get_env_number("STARPU_DISABLE_PINNING");
 	malloc_on_node_default_flags[dst_node] = STARPU_MALLOC_PINNED | STARPU_MALLOC_COUNT;
 #ifdef STARPU_SIMGRID
-#if SIMGRID_VERSION < 31500
+#if SIMGRID_VERSION < 31500 || SIMGRID_VERSION == 31559
 	/* Reasonably "costless" */
 	_starpu_malloc_simulation_fold = starpu_get_env_number_default("STARPU_MALLOC_SIMULATION_FOLD", 1) << 20;
 #endif