Browse Source

- merge trunk

Olivier Aumage 11 years ago
parent
commit
730c45f35e
4 changed files with 8 additions and 9 deletions
  1. 1 1
      mic-configure
  2. 1 1
      sc_hypervisor/src/Makefile.am
  3. 3 6
      src/core/sched_ctx.c
  4. 3 1
      src/core/workers.h

+ 1 - 1
mic-configure

@@ -79,7 +79,7 @@ do
 	if test x$arch = xmic ; then
 	    if [ "$native_mic" -eq "1" ]
 	    then
-		params="$params --disable-build-doc --with-coi-lib-dir=$coi_dir/device-linux-release/lib --with-scif-lib-dir=$scif_dir/device-linux-release/lib --host=$mic_host"
+		params="$params --disable-build-doc --with-coi-lib-dir=$coi_dir/device-linux-release/lib --with-scif-lib-dir=$scif_dir/device-linux-release/lib --host=$mic_host --enable-maxcpus=250"
 	    else
 		# TODO: fix hwloc detection to look for another pkg-config place, and not just believe in the host version of hwloc.pc...
 		params="$params --enable-mic --disable-build-doc -without-hwloc --with-coi-lib-dir=$coi_dir/device-linux-release/lib --with-scif-lib-dir=$scif_dir/device-linux-release/lib --host=$mic_host"

+ 1 - 1
sc_hypervisor/src/Makefile.am

@@ -14,7 +14,7 @@
 
 AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS)
 LIBS = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/sc_hypervisor/include/ -I$(top_srcdir)/sc_hypervisor/src
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/sc_hypervisor/include/ -I$(top_srcdir)/sc_hypervisor/src
 AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS)
 
 lib_LTLIBRARIES = libsc_hypervisor.la

+ 3 - 6
src/core/sched_ctx.c

@@ -1678,7 +1678,7 @@ void starpu_sched_ctx_get_available_cpuids(unsigned sched_ctx_id, int **cpuids,
 	{
 		workerid = workers->get_next(workers, &it);
 		worker = _starpu_get_worker_struct(workerid);
-		if(worker->master == current_worker_id || workerid == current_worker_id)
+		if(worker->master == current_worker_id || workerid == current_worker_id || current_worker_id == -1)
 			(*cpuids)[w++] = starpu_worker_get_bindid(workerid);
 	}
 	*ncpuids = w;
@@ -1698,11 +1698,8 @@ int starpu_sched_ctx_book_workers_for_task(unsigned sched_ctx_id, int *workerids
 		if(current_worker_id == -1)
 		{
 			final_workerids[nfinal_workerids++] = workerids[w];
-			if(nfinal_workerids == nworkers - 1)
-			{
-				master = workerids[nfinal_workerids];
-				break;
-			}
+			if(nfinal_workerids == nworkers)
+				master = workerids[nfinal_workerids-1];
 		}
 		else
 		{

+ 3 - 1
src/core/workers.h

@@ -117,8 +117,10 @@ LIST_TYPE(_starpu_worker,
 
 	/* flag to know if sched_mutex is locked or not */
 	unsigned sched_mutex_locked;
-	
+
+	/* id of the master worker */
 	int master;
+
 #ifdef __GLIBC__
 	cpu_set_t cpu_set;
 #endif /* __GLIBC__ */