Browse Source

Merge branch 'master' into fpga

Samuel Thibault 5 years ago
parent
commit
82c9d7fc60
3 changed files with 21 additions and 2 deletions
  1. 8 0
      configure.ac
  2. 2 1
      mpi/tests/sendrecv_gemm_bench.c
  3. 11 1
      tools/starpu_replay.c

+ 8 - 0
configure.ac

@@ -465,6 +465,14 @@ AC_ARG_ENABLE(mpi, [AS_HELP_STRING([--disable-mpi],
             [enable_mpi=$enableval],
             [enable_mpi=$default_enable_mpi])
 
+if test x$enable_mpi = xmaybe ; then
+    if test -x "$mpicc_path"; then
+	enable_mpi=yes
+    else
+	enable_mpi=no
+    fi
+fi
+
 # in case MPI was explicitely required, but mpicc is not available, this is an error
 if test x$enable_mpi = xyes -a ! -x "$mpicc_path"; then
    AC_MSG_ERROR([Compiler MPI '$mpicc_path' not valid])

+ 2 - 1
mpi/tests/sendrecv_gemm_bench.c

@@ -375,9 +375,10 @@ int main(int argc, char **argv)
 	}
 
 	starpu_pause();
+
+	unsigned x, y;
 #ifndef STARPU_SIMGRID
 	// Initialize matrices:
-	unsigned x, y;
 	for (x = 0; x < nslices; x++)
 	{
 		struct starpu_task *task = starpu_task_create();

+ 11 - 1
tools/starpu_replay.c

@@ -1085,13 +1085,23 @@ int main(int argc, char **argv)
 		}
 		else if (TEST("Sizes"))
 		{
+			*ln = 0;
 			char *  buffer = s + 7;
 			const char * delim = " ";
-			char * token = strtok(buffer, delim);
+			unsigned nb_parameters_line = count_number_tokens(buffer, delim); 
 			unsigned k = 0;
 
+			if(nb_parameters == 0)
+			{
+				nb_parameters = nb_parameters_line; 
+				arrays_managing(set_alloc_mode(nb_parameters));
+			}
+			else
+				STARPU_ASSERT(nb_parameters == nb_parameters_line);
+
 			_STARPU_MALLOC(sizes_set, nb_parameters * sizeof(size_t));
 
+			char * token = strtok(buffer, delim);
 			while (token != NULL && k < nb_parameters)
 			{
 				sizes_set[k] = strtol(token, NULL, 10);