Browse Source

Merge branch 'master' of git+ssh://scm.gforge.inria.fr/gitroot/starpu/starpu

Samuel Thibault 5 years ago
parent
commit
8d8c604238
3 changed files with 6 additions and 3 deletions
  1. 2 1
      mpi/src/mpi/starpu_mpi_mpi.c
  2. 2 1
      mpi/src/nmad/starpu_mpi_nmad.c
  3. 2 1
      src/core/topology.c

+ 2 - 1
mpi/src/mpi/starpu_mpi_mpi.c

@@ -19,6 +19,7 @@
 
 #include <stdlib.h>
 #include <limits.h>
+#include <unistd.h>
 #include <starpu_mpi.h>
 #include <starpu_mpi_datatype.h>
 #include <starpu_mpi_private.h>
@@ -1163,7 +1164,7 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 	if (starpu_bind_thread_on(_starpu_mpi_thread_cpuid, STARPU_THREAD_ACTIVE, "MPI") < 0)
 	{
 		char hostname[65];
-		_starpu_gethostname(hostname, sizeof(hostname));
+		gethostname(hostname, sizeof(hostname));
 		_STARPU_DISP("[%s] No core was available for the MPI thread. You should use STARPU_RESERVE_NCPU to leave one core available for MPI, or specify one core less in STARPU_NCPU\n", hostname);
 	}
 	_starpu_mpi_do_initialize(argc_argv);

+ 2 - 1
mpi/src/nmad/starpu_mpi_nmad.c

@@ -19,6 +19,7 @@
 
 #include <stdlib.h>
 #include <limits.h>
+#include <unistd.h>
 #include <starpu_mpi.h>
 #include <starpu_mpi_datatype.h>
 #include <starpu_mpi_private.h>
@@ -415,7 +416,7 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 	if (starpu_bind_thread_on(_starpu_mpi_thread_cpuid, 0, "MPI") < 0)
 	{
 		char hostname[65];
-		_starpu_gethostname(hostname, sizeof(hostname));
+		gethostname(hostname, sizeof(hostname));
 		_STARPU_DISP("[%s] No core was available for the MPI thread. You should use STARPU_RESERVE_NCPU to leave one core available for MPI, or specify one core less in STARPU_NCPU\n", hostname);
 	}
 	_starpu_mpi_do_initialize(argc_argv);

+ 2 - 1
src/core/topology.c

@@ -20,6 +20,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <common/config.h>
 #include <core/workers.h>
 #include <core/debug.h>
@@ -1925,7 +1926,7 @@ int _starpu_bind_thread_on_cpu(int cpuid STARPU_ATTRIBUTE_UNUSED, int workerid S
 			 (name && cpu_name[cpuid] && !strcmp(name, cpu_name[cpuid])) ) )
 		{
 			char hostname[65];
-			_starpu_gethostname(hostname, sizeof(hostname));
+			gethostname(hostname, sizeof(hostname));
 
 			if (previous == STARPU_ACTIVETHREAD)
 				_STARPU_DISP("[%s] Warning: active thread %s was already bound to PU %d\n", hostname, cpu_name[cpuid], cpuid);