Selaa lähdekoodia

workers: remove reference to gordon workers

Nathalie Furmento 12 vuotta sitten
vanhempi
commit
ec56b3e978

+ 1 - 0
ChangeLog

@@ -111,6 +111,7 @@ Changes:
     - Data interfaces no longer define functions to copy to and from
       SPU devices
     - Codelet no longer define pointer for Gordon implementations
+    - Gordon workers are no longer enabled
   * Fix data transfer arrows in paje traces
   * The "heft" scheduler no longer exists. Users should now pick "dmda"
     instead.

+ 1 - 3
include/starpu.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -112,8 +112,6 @@ struct starpu_conf
 	int ncuda;
 	/* number of GPU OpenCL device workers (-1 for default) */
 	int nopencl;
-	/* number of Cell's SPUs (-1 for default) */
-	int nspus;
 
 	unsigned use_explicit_workers_bindid;
 	unsigned workers_bindid[STARPU_NMAXWORKERS];

+ 0 - 1
include/starpu_scheduler.h

@@ -56,7 +56,6 @@ struct starpu_machine_topology
 	unsigned ncpus;
 	unsigned ncudagpus;
 	unsigned nopenclgpus;
-	unsigned ngordon_spus;
 
 	/* Where to bind workers ? */
 	unsigned workers_bindid[STARPU_NMAXWORKERS];

+ 5 - 7
include/starpu_worker.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -31,8 +31,7 @@ enum starpu_archtype
 	STARPU_ANY_WORKER,    /* any worker, used in the hypervisor */
 	STARPU_CPU_WORKER,    /* CPU core */
 	STARPU_CUDA_WORKER,   /* NVIDIA CUDA device */
-	STARPU_OPENCL_WORKER, /* OpenCL device */
-	STARPU_GORDON_WORKER  /* Cell SPU */
+	STARPU_OPENCL_WORKER  /* OpenCL device */
 };
 
 /* This function returns the number of workers (ie. processing units executing
@@ -43,12 +42,11 @@ unsigned starpu_worker_is_combined_worker(int id);
 
 unsigned starpu_cpu_worker_get_count(void);
 unsigned starpu_cuda_worker_get_count(void);
-unsigned starpu_spu_worker_get_count(void);
 unsigned starpu_opencl_worker_get_count(void);
 
 /* Return the identifier of the thread in case this is associated to a worker.
  * This will return -1 if this function is called directly from the application
- * or if it is some SPU worker where a single thread controls different SPUs. */
+ * or if it is a worker in which a single thread controls different devices. */
 int starpu_worker_get_id(void);
 
 int starpu_combined_worker_get_id(void);
@@ -59,8 +57,8 @@ int starpu_combined_worker_get_rank(void);
 /* This function returns the type of worker associated to an identifier (as
  * returned by the starpu_worker_get_id function). The returned value indicates
  * the architecture of the worker: STARPU_CPU_WORKER for a CPU core,
- * STARPU_CUDA_WORKER for a CUDA device, and STARPU_GORDON_WORKER for a Cell
- * SPU. The value returned for an invalid identifier is unspecified.  */
+ * STARPU_CUDA_WORKER for a CUDA device. The value returned for an
+ * invalid identifier is unspecified.  */
 enum starpu_archtype starpu_worker_get_type(int id);
 
 /* Returns the number of workers of the type indicated by the argument. A

+ 1 - 2
src/core/jobs.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -51,7 +51,6 @@ typedef void (*_starpu_cl_func_t)(void **, void *);
 #define _STARPU_CPU_MAY_PERFORM(j)	((j)->task->cl->where & STARPU_CPU)
 #define _STARPU_CUDA_MAY_PERFORM(j)      ((j)->task->cl->where & STARPU_CUDA)
 #define _STARPU_SPU_MAY_PERFORM(j)	((j)->task->cl->where & STARPU_SPU)
-#define _STARPU_GORDON_MAY_PERFORM(j)	((j)->task->cl->where & STARPU_GORDON)
 #define _STARPU_OPENCL_MAY_PERFORM(j)	((j)->task->cl->where & STARPU_OPENCL)
 
 /* A job is the internal representation of a task. */

+ 1 - 49
src/core/topology.c

@@ -582,46 +582,6 @@ _starpu_init_machine_config (struct _starpu_machine_config *config)
 	topology->nworkers += topology->nopenclgpus;
 #endif
 
-#ifdef STARPU_USE_GORDON
-	int ngordon = config->conf->ngordon;
-
-	if (ngordon != 0)
-	{
-		if (ngordon == -1)
-		{
-			/* Nothing was specified, so let's choose ! */
-			ngordon = spe_cpu_info_get(SPE_COUNT_USABLE_SPES, -1);
-		}
-		else
-		{
-			STARPU_ASSERT(ngordon <= NMAXGORDONSPUS);
-			if (ngordon > STARPU_MAXGORDONSPUS);
-			{
-				_STARPU_DISP("Warning: %d Gordon CPUs devices requested. Only %d supported\n", ngordon, NMAXGORDONSPUS);
-				ngordon = NMAXGORDONSPUS;
-			}
-		}
-	}
-
-	topology->ngordon_spus = ngordon;
-	STARPU_ASSERT(topology->ngordon_spus + topology->nworkers <= STARPU_NMAXWORKERS);
-
-	unsigned spu;
-	for (spu = 0; spu < config->ngordon_spus; spu++)
-	{
-		int worker_idx = topology->nworkers + spu;
-		config->workers[worker_idx].arch = STARPU_GORDON_WORKER;
-		config->workers[worker_idx].perf_arch = STARPU_GORDON_DEFAULT;
-		config->workers[worker_idx].id = spu;
-		config->workers[worker_idx].worker_is_running = 0;
-		config->workers[worker_idx].worker_mask = STARPU_GORDON;
-		_starpu_init_sched_ctx_for_worker(config->workers[topology->nworkers + spu].workerid);
-		config->worker_mask |= STARPU_GORDON;
-	}
-
-	topology->nworkers += topology->ngordon_spus;
-#endif
-
 /* we put the CPU section after the accelerator : in case there was an
  * accelerator found, we devote one cpu */
 #if defined(STARPU_USE_CPU) || defined(STARPU_SIMGRID)
@@ -631,8 +591,7 @@ _starpu_init_machine_config (struct _starpu_machine_config *config)
 	{
 		if (ncpu == -1)
 		{
-			unsigned already_busy_cpus =
-				(topology->ngordon_spus ? 1 : 0) + topology->ncudagpus + topology->nopenclgpus;
+			unsigned already_busy_cpus = topology->ncudagpus + topology->nopenclgpus;
 			long avail_cpus = topology->nhwcpus - already_busy_cpus;
 			if (avail_cpus < 0)
 				avail_cpus = 0;
@@ -831,13 +790,6 @@ _starpu_init_workers_binding (struct _starpu_machine_config *config)
 				memory_node = ram_memory_node;
 				_starpu_memory_node_worker_add(ram_memory_node);
 				break;
-#ifdef STARPU_USE_GORDON
-			case STARPU_GORDON_WORKER:
-				is_a_set_of_accelerators = 1;
-				memory_node = ram_memory_node;
-				_starpu_memory_node_worker_add(ram_memory_node);
-				break;
-#endif
 #if defined(STARPU_USE_CUDA) || defined(STARPU_SIMGRID)
 			case STARPU_CUDA_WORKER:
 #ifndef STARPU_SIMGRID

+ 1 - 60
src/core/workers.c

@@ -250,11 +250,6 @@ int starpu_combined_worker_can_execute_task(unsigned workerid, struct starpu_tas
  * Runtime initialization methods
  */
 
-#ifdef STARPU_USE_GORDON
-static unsigned gordon_inited = 0;
-static struct _starpu_worker_set gordon_worker_set;
-#endif
-
 static void _starpu_init_worker_queue(struct _starpu_worker *workerarg)
 {
 	_starpu_pthread_cond_t *cond = &workerarg->sched_cond;
@@ -354,7 +349,7 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 
 	unsigned nworkers = config->topology.nworkers;
 
-	/* Launch workers asynchronously (except for SPUs) */
+	/* Launch workers asynchronously */
 	unsigned cpu = 0, cuda = 0;
 	unsigned worker;
 
@@ -500,40 +495,6 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 #endif
 				break;
 #endif
-#if defined(STARPU_USE_GORDON)
-			case STARPU_GORDON_WORKER:
-				/* we will only launch gordon once, but it will handle
-				 * the different SPU workers */
-				if (!gordon_inited)
-				{
-					gordon_worker_set.nworkers = config->ngordon_spus;
-					gordon_worker_set.workers = &config->workers[worker];
-
-					gordon_worker_set.set_is_initialized = 0;
-
-					_STARPU_PTHREAD_CREATE_ON(
-						workerarg->name
-						&gordon_worker_set.worker_thread,
-						NULL,
-						_starpu_gordon_worker,
-						&gordon_worker_set,
-						worker+1);
-
-					_STARPU_PTHREAD_MUTEX_LOCK(&gordon_worker_set.mutex);
-					while (!gordon_worker_set.set_is_initialized)
-						_STARPU_PTHREAD_COND_WAIT(&gordon_worker_set.ready_cond,
-									&gordon_worker_set.mutex);
-					_STARPU_PTHREAD_MUTEX_UNLOCK(&gordon_worker_set.mutex);
-
-					gordon_inited = 1;
-				}
-
-				workerarg->set = &gordon_worker_set;
-				gordon_worker_set.joined = 0;
-				workerarg->worker_is_running = 1;
-
-				break;
-#endif
 			default:
 				STARPU_ABORT();
 		}
@@ -591,12 +552,6 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 				_STARPU_PTHREAD_MUTEX_UNLOCK(&workerarg->mutex);
 				break;
 #endif
-#ifdef STARPU_USE_GORDON
-			case STARPU_GORDON_WORKER:
-				/* the initialization of Gordon worker is
-				 * synchronous for now */
-				break;
-#endif
 			default:
 				STARPU_ABORT();
 		}
@@ -635,7 +590,6 @@ int starpu_conf_init(struct starpu_conf *conf)
 		conf->ncpus = starpu_get_env_number("STARPU_NCPUS");
 	conf->ncuda = starpu_get_env_number("STARPU_NCUDA");
 	conf->nopencl = starpu_get_env_number("STARPU_NOPENCL");
-	conf->nspus = starpu_get_env_number("STARPU_NGORDON");
 	conf->calibrate = starpu_get_env_number("STARPU_CALIBRATE");
 	conf->bus_calibrate = starpu_get_env_number("STARPU_BUS_CALIBRATE");
 
@@ -704,7 +658,6 @@ void _starpu_conf_check_environment(struct starpu_conf *conf)
 	_starpu_conf_set_value_against_environment("STARPU_NCPU", &conf->ncpus);
 	_starpu_conf_set_value_against_environment("STARPU_NCUDA", &conf->ncuda);
 	_starpu_conf_set_value_against_environment("STARPU_NOPENCL", &conf->nopencl);
-	_starpu_conf_set_value_against_environment("STARPU_NGORDON", &conf->nspus);
 	_starpu_conf_set_value_against_environment("STARPU_CALIBRATE", &conf->calibrate);
 	_starpu_conf_set_value_against_environment("STARPU_BUS_CALIBRATE", &conf->bus_calibrate);
 	_starpu_conf_set_value_against_environment("STARPU_SINGLE_COMBINED_WORKER", &conf->single_combined_worker);
@@ -1073,9 +1026,6 @@ int starpu_worker_get_count_by_type(enum starpu_archtype type)
 		case STARPU_OPENCL_WORKER:
 			return config.topology.nopenclgpus;
 
-		case STARPU_GORDON_WORKER:
-			return config.topology.ngordon_spus;
-
 		default:
 			return -EINVAL;
 	}
@@ -1101,11 +1051,6 @@ unsigned starpu_opencl_worker_get_count(void)
 	return config.topology.nopenclgpus;
 }
 
-unsigned starpu_spu_worker_get_count(void)
-{
-	return config.topology.ngordon_spus;
-}
-
 int starpu_asynchronous_copy_disabled(void)
 {
 	return config.conf->disable_asynchronous_copy;
@@ -1409,7 +1354,6 @@ starpu_driver_run(struct starpu_driver *d)
 	case STARPU_OPENCL_WORKER:
 		return _starpu_run_opencl(d);
 #endif
-	case STARPU_GORDON_WORKER: /* Not supported yet */
 	default:
 	{
 		_STARPU_DEBUG("Invalid device type\n");
@@ -1437,7 +1381,6 @@ starpu_driver_init(struct starpu_driver *d)
 	case STARPU_OPENCL_WORKER:
 		return _starpu_opencl_driver_init(d);
 #endif
-	case STARPU_GORDON_WORKER: /* Not supported yet */
 	default:
 		return -EINVAL;
 	}
@@ -1462,7 +1405,6 @@ starpu_driver_run_once(struct starpu_driver *d)
 	case STARPU_OPENCL_WORKER:
 		return _starpu_opencl_driver_run_once(d);
 #endif
-	case STARPU_GORDON_WORKER: /* Not supported yet */
 	default:
 		return -EINVAL;
 	}
@@ -1487,7 +1429,6 @@ starpu_driver_deinit(struct starpu_driver *d)
 	case STARPU_OPENCL_WORKER:
 		return _starpu_opencl_driver_deinit(d);
 #endif
-	case STARPU_GORDON_WORKER: /* Not supported yet */
 	default:
 		return -EINVAL;
 	}

+ 1 - 5
src/core/workers.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  INRIA
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -39,10 +39,6 @@
 #include <drivers/cuda/driver_cuda.h>
 #include <drivers/opencl/driver_opencl.h>
 
-#ifdef STARPU_USE_GORDON
-#include <drivers/gordon/driver_gordon.h>
-#endif
-
 #include <drivers/cpu/driver_cpu.h>
 
 #include <datawizard/datawizard.h>

+ 1 - 4
src/top/starpu_top.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony Roy
- * Copyright (C) 2011, 2012 Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012, 2013 Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -103,9 +103,6 @@ static void starpu_top_get_device_type(int id, char* type)
 	case STARPU_OPENCL_WORKER:
 		strncpy(type, "OPENCL",9);
 		break;
-	case STARPU_GORDON_WORKER:
-		strncpy(type, "GORDON",9);
-		break;
 	case STARPU_ANY_WORKER:
 		strncpy(type, "ANY",9);
 		break;

+ 0 - 1
tests/datawizard/interfaces/test_interfaces.c

@@ -350,7 +350,6 @@ create_task(struct starpu_task **taskp, enum starpu_archtype type, int id)
 			cl.opencl_funcs[0] = current_config->opencl_func;
 			break;
 #endif /* ! STARPU_USE_OPENCL */
-		case STARPU_GORDON_WORKER: /* Not supported */
 		default:
 			return -ENODEV;
 	}

+ 1 - 2
tests/errorcheck/starpu_init_noworker.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -48,7 +48,6 @@ int main(int argc, char **argv)
 	conf.ncpus = 0;
 	conf.ncuda = 0;
 	conf.nopencl = 0;
-	conf.nspus = 0;
 
 	/* starpu_init should return -ENODEV */
 	ret = starpu_init(&conf);