Browse Source

Fix build against older poti versions

Samuel Thibault 8 years ago
parent
commit
7c9982e990

+ 4 - 0
configure.ac

@@ -1930,6 +1930,10 @@ if test x$use_fxt = xyes; then
 	##########################################
 	PKG_CHECK_MODULES([POTI], [poti], [
 		AC_DEFINE(STARPU_HAVE_POTI, [1], [Define to 1 if you have libpoti])
+		save_LIBS="$LIBS"
+		LIBS="$LIBS $POTI_LIBS"
+		AC_CHECK_FUNCS([poti_init_custom])
+		LIBS="$save_LIBS"
 	], [:])
 	FXT_CFLAGS="$FXT_CFLAGS $POTI_CFLAGS"
 	FXT_LIBS="$FXT_LIBS $POTI_LIBS"

+ 4 - 0
src/core/dependencies/data_arbiter_concurrency.c

@@ -542,6 +542,10 @@ void _starpu_notify_arbitered_dependencies(starpu_data_handle_t handle)
 	/* Since the request has been posted the handle may have been proceed and released */
 	if (_starpu_data_requester_list_empty(&handle->arbitered_req_list))
 	{
+#ifndef LOCK_OR_DELEGATE
+		STARPU_PTHREAD_MUTEX_UNLOCK(&arbiter->mutex);
+#endif
+
 		/* No waiter, just remove our reference */
 		_starpu_spin_lock(&handle->header_lock);
 		STARPU_ASSERT(handle->refcnt > 0);

+ 10 - 5
src/debug/traces/starpu_fxt.c

@@ -3645,12 +3645,17 @@ void _starpu_fxt_paje_file_init(struct starpu_fxt_options *options)
 		}
 
 #ifdef STARPU_HAVE_POTI
+#ifdef HAVE_POTI_INIT_CUSTOM
+		fclose(out_paje_file);
 		poti_init_custom (options->out_paje_path,
-				  false, //if false, allow extended events
-				  true,  //if true, an old header (pj_dump -n)
-				  false, //if false, the trace has no comments
-				  true,  //if true, events have aliases
-				  true); //if true, relative timestamps
+				  0, //if false, allow extended events
+				  1, //if true, an old header (pj_dump -n)
+				  0, //if false, the trace has no comments
+				  1, //if true, events have aliases
+				  1);//if true, relative timestamps
+#else
+		poti_init (out_paje_file);
+#endif
 #endif
 		_starpu_fxt_write_paje_header(out_paje_file);
 	}

+ 4 - 0
src/debug/traces/starpu_paje.c

@@ -26,8 +26,12 @@ void _starpu_fxt_write_paje_header(FILE *file STARPU_ATTRIBUTE_UNUSED)
 {
 	unsigned i;
 #ifdef STARPU_HAVE_POTI
+#ifdef HAVE_POTI_INIT_CUSTOM
 	poti_header();     /* see poti_init_custom to customize the header */
 #else
+	poti_header(1,1);
+#endif
+#else
 	fprintf(file, "%%EventDef	PajeDefineContainerType	1\n");
 	fprintf(file, "%%	Alias	string\n");
 	fprintf(file, "%%	Type	string\n");