Procházet zdrojové kódy

rename variable *_mpi_* to *_mpi_ms_* again

Corentin Salingue před 8 roky
rodič
revize
a954ef3ea8

+ 2 - 2
include/starpu_worker.h

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2009-2013, 2016  Université de Bordeaux
  * Copyright (C) 2010-2014  CNRS
- * Copyright (C) 2016  INRIA
+ * Copyright (C) 2016, 2017  INRIA
  * Copyright (C) 2016  Uppsala University
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -36,7 +36,7 @@ enum starpu_worker_archtype
 	STARPU_OPENCL_WORKER,
 	STARPU_MIC_WORKER,
 	STARPU_SCC_WORKER,
-	STARPU_MPI_WORKER,
+	STARPU_MPI_MS_WORKER,
 	STARPU_ANY_WORKER
 };
 

+ 3 - 3
src/core/perfmodel/perfmodel.c

@@ -3,7 +3,7 @@
  * Copyright (C) 2009-2016  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016  CNRS
  * Copyright (C) 2011  Télécom-SudParis
- * Copyright (C) 2016  Inria
+ * Copyright (C) 2016, 2017  Inria
  * Copyright (C) 2016  Uppsala University
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -123,7 +123,7 @@ double starpu_worker_get_relative_speedup(struct starpu_perfmodel_arch* perf_arc
 			coef = _STARPU_MIC_ALPHA;
 		else if (perf_arch->devices[dev].type == STARPU_SCC_WORKER)
 			coef = _STARPU_SCC_ALPHA;
-		else if (perf_arch->devices[dev].type == STARPU_MPI_WORKER)
+		else if (perf_arch->devices[dev].type == STARPU_MPI_MS_WORKER)
 			coef = _STARPU_MPI_MS_ALPHA;
 
 		speedup += coef * (perf_arch->devices[dev].ncores);
@@ -265,7 +265,7 @@ double starpu_task_expected_conversion_time(struct starpu_task *task,
 			case STARPU_SCC_WORKER:
 				node_kind = STARPU_SCC_RAM;
 				break;
-			case STARPU_MPI_WORKER:
+			case STARPU_MPI_MS_WORKER:
 				node_kind = STARPU_MPI_MS_RAM;
 				break;
 			default:

+ 4 - 4
src/core/perfmodel/perfmodel_history.c

@@ -3,7 +3,7 @@
  * Copyright (C) 2009-2016  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017  CNRS
  * Copyright (C) 2011  Télécom-SudParis
- * Copyright (C) 2016  Inria
+ * Copyright (C) 2016, 2017  Inria
  *
  * 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
@@ -569,7 +569,7 @@ static enum starpu_worker_archtype _get_enum_type(int type)
         	case 4:
 			return STARPU_SCC_WORKER;
         	case 5:
-			return STARPU_MPI_WORKER;
+			return STARPU_MPI_MS_WORKER;
 		default:
 			STARPU_ABORT();
 	}
@@ -923,7 +923,7 @@ void _starpu_initialize_registered_performance_models(void)
 	ignore_devid[STARPU_CUDA_WORKER] = starpu_get_env_number_default("STARPU_PERF_MODEL_HOMOGENEOUS_CUDA", 0);
 	ignore_devid[STARPU_OPENCL_WORKER] = starpu_get_env_number_default("STARPU_PERF_MODEL_HOMOGENEOUS_OPENCL", 0);
 	ignore_devid[STARPU_MIC_WORKER] = starpu_get_env_number_default("STARPU_PERF_MODEL_HOMOGENEOUS_MIC", 0);
-	ignore_devid[STARPU_MPI_WORKER] = starpu_get_env_number_default("STARPU_PERF_MODEL_HOMOGENEOUS_MPI_MS", 0);
+	ignore_devid[STARPU_MPI_MS_WORKER] = starpu_get_env_number_default("STARPU_PERF_MODEL_HOMOGENEOUS_MPI_MS", 0);
 	ignore_devid[STARPU_SCC_WORKER] = starpu_get_env_number_default("STARPU_PERF_MODEL_HOMOGENEOUS_SCC", 0);
 }
 
@@ -1206,7 +1206,7 @@ char* starpu_perfmodel_get_archtype_name(enum starpu_worker_archtype archtype)
 		case(STARPU_SCC_WORKER):
 			return "scc";
 			break;
-		case(STARPU_MPI_WORKER):
+		case(STARPU_MPI_MS_WORKER):
 			return "mpi_ms";
 			break;
 		default:

+ 6 - 6
src/core/topology.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2009-2017  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 CNRS
- * Copyright (C) 2011, 2016  INRIA
+ * Copyright (C) 2011, 2016, 2017  INRIA
  * Copyright (C) 2016  Uppsala University
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -953,10 +953,10 @@ _starpu_init_mpi_config (struct _starpu_machine_config *config,
         {
                 int worker_idx = topology->nworkers + mpicore_id;
                 config->workers[worker_idx].set = &mpi_worker_set[mpi_idx];
-                config->workers[worker_idx].arch = STARPU_MPI_WORKER;
+                config->workers[worker_idx].arch = STARPU_MPI_MS_WORKER;
                 _STARPU_MALLOC(config->workers[worker_idx].perf_arch.devices, sizeof(struct starpu_perfmodel_device));
                 config->workers[worker_idx].perf_arch.ndevices = 1;
-                config->workers[worker_idx].perf_arch.devices[0].type = STARPU_MPI_WORKER;
+                config->workers[worker_idx].perf_arch.devices[0].type = STARPU_MPI_MS_WORKER;
                 config->workers[worker_idx].perf_arch.devices[0].devid = mpi_idx;
                 config->workers[worker_idx].perf_arch.devices[0].ncores = 1;
                 config->workers[worker_idx].devid = mpi_idx;
@@ -1992,7 +1992,7 @@ _starpu_init_workers_binding (struct _starpu_machine_config *config, int no_mp_c
 #endif /* STARPU_USE_SCC */
 
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
-			case STARPU_MPI_WORKER:
+			case STARPU_MPI_MS_WORKER:
 			{
 				if (mpi_init[devid])
 				{
@@ -2015,7 +2015,7 @@ _starpu_init_workers_binding (struct _starpu_machine_config *config, int no_mp_c
                                 for (findworker = 0; findworker < worker; findworker++)
                                 {
                                         struct _starpu_worker *findworkerarg = &config->workers[findworker];
-                                        if (findworkerarg->arch == STARPU_MPI_WORKER)
+                                        if (findworkerarg->arch == STARPU_MPI_MS_WORKER)
                                         {
                                                 _starpu_worker_drives_memory_node(workerarg->workerid, findworkerarg->memory_node);
                                                 _starpu_worker_drives_memory_node(findworkerarg->workerid, memory_node);
@@ -2159,7 +2159,7 @@ _starpu_build_topology (struct _starpu_machine_config *config, int no_mp_config)
 				else if (config->scc_nodeid != (int) starpu_worker_get_memory_node(i))
 					config->scc_nodeid = -2;
 				break;
-			case STARPU_MPI_WORKER:
+			case STARPU_MPI_MS_WORKER:
 				if (config->mpi_nodeid == -1)
 					config->mpi_nodeid = starpu_worker_get_memory_node(i);
 				else if (config->mpi_nodeid != (int) starpu_worker_get_memory_node(i))

+ 8 - 8
src/core/workers.c

@@ -4,7 +4,7 @@
  * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017  CNRS
  * Copyright (C) 2010, 2011  INRIA
  * Copyright (C) 2011  Télécom-SudParis
- * Copyright (C) 2011-2012, 2016  INRIA
+ * Copyright (C) 2011-2012, 2016, 2017  INRIA
  * Copyright (C) 2016  Uppsala University
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -143,7 +143,7 @@ static uint32_t _starpu_worker_exists_and_can_execute(struct starpu_task *task,
 				if (task->cl->cpu_funcs_name[impl] != NULL || task->cl->mic_funcs[impl] != NULL)
 					test_implementation = 1;
 				break;
-                        case STARPU_MPI_WORKER:
+                        case STARPU_MPI_MS_WORKER:
                                 if (task->cl->cpu_funcs_name[impl] != NULL || task->cl->mpi_ms_funcs[impl] != NULL)
                                         test_implementation = 1;
                                 break;
@@ -212,7 +212,7 @@ uint32_t _starpu_worker_exists(struct starpu_task *task)
 #endif
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
 	if ((task->cl->where & STARPU_MPI_MS) &&
-	    _starpu_worker_exists_and_can_execute(task, STARPU_MPI_WORKER))
+	    _starpu_worker_exists_and_can_execute(task, STARPU_MPI_MS_WORKER))
 		return 1;
 #endif
 #ifdef STARPU_USE_SCC
@@ -290,7 +290,7 @@ static inline int _starpu_can_use_nth_implementation(enum starpu_worker_archtype
 
 		return func != NULL || func_name != NULL;
 	}
-	case STARPU_MPI_WORKER:
+	case STARPU_MPI_MS_WORKER:
 	{
 		starpu_mpi_ms_func_t func = _starpu_task_get_mpi_ms_nth_implementation(cl, nimpl);
 		const char *func_name = _starpu_task_get_cpu_name_nth_implementation(cl, nimpl);
@@ -830,7 +830,7 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *pconfig)
 				break;
 #endif /* STARPU_USE_SCC */
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
-			case STARPU_MPI_WORKER:
+			case STARPU_MPI_MS_WORKER:
 				/* We spawn only one thread
 				 * per MPI device, which will control all MPI
 				 * workers of this device. (by using a worker set). */
@@ -967,7 +967,7 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *pconfig)
 				break;
 #endif
 			case STARPU_MIC_WORKER:
-                        case STARPU_MPI_WORKER:
+                        case STARPU_MPI_MS_WORKER:
 				/* Already waited above */
 				break;
 			case STARPU_SCC_WORKER:
@@ -1778,7 +1778,7 @@ int starpu_worker_get_count_by_type(enum starpu_worker_archtype type)
 		case STARPU_SCC_WORKER:
 			return _starpu_config.topology.nsccdevices;
 
-                case STARPU_MPI_WORKER:
+                case STARPU_MPI_MS_WORKER:
                         return _starpu_config.topology.nmpidevices;
 
                 case STARPU_ANY_WORKER:
@@ -2385,7 +2385,7 @@ char *starpu_worker_get_type_as_string(enum starpu_worker_archtype type)
 	if (type == STARPU_CUDA_WORKER) return "STARPU_CUDA_WORKER";
 	if (type == STARPU_OPENCL_WORKER) return "STARPU_OPENCL_WORKER";
 	if (type == STARPU_MIC_WORKER) return "STARPU_MIC_WORKER";
-        if (type == STARPU_MPI_WORKER) return "STARPU_MPI_WORKER";
+        if (type == STARPU_MPI_MS_WORKER) return "STARPU_MPI_MS_WORKER";
 	if (type == STARPU_SCC_WORKER) return "STARPU_SCC_WORKER";
 	if (type == STARPU_ANY_WORKER) return "STARPU_ANY_WORKER";
 	return "STARPU_unknown_WORKER";

+ 2 - 1
src/debug/traces/starpu_fxt.c

@@ -1,6 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2017  Université de Bordeaux
+ * Copyright (C) 2017  Inria
  *
  * 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
@@ -921,7 +922,7 @@ static void handle_worker_init_start(struct fxt_ev_64 *ev, struct starpu_fxt_opt
 		case _STARPU_FUT_MPI_KEY:
 			set_next_mpi_ms_worker_color(workerid);
 			kindstr = "mpi_ms";
-			arch.devices[0].type = STARPU_MPI_WORKER;
+			arch.devices[0].type = STARPU_MPI_MS_WORKER;
 			arch.devices[0].devid = devid;
 			arch.devices[0].ncores = 1;
 			break;

+ 2 - 2
src/sched_policies/heteroprio.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2015  INRIA
+ * Copyright (C) 2015, 2017  INRIA
  * Copyright (C) 2016  CNRS
  * Copyright (C) 2016  Uppsala University
  *
@@ -332,7 +332,7 @@ static void add_workers_heteroprio_policy(unsigned sched_ctx_id, int *workerids,
 				hp->workers_heteroprio[workerid].arch_type = STARPU_SCC;
 				hp->workers_heteroprio[workerid].arch_index = STARPU_SCC_IDX;
 				break;
-			case STARPU_MPI_WORKER:
+			case STARPU_MPI_MS_WORKER:
 				hp->workers_heteroprio[workerid].arch_type = STARPU_MPI_MS;
 				hp->workers_heteroprio[workerid].arch_index = STARPU_MPI_MS_IDX;
 				break;

+ 3 - 3
src/top/starpu_top.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony Roy
  * Copyright (C) 2011, 2012, 2013, 2016 CNRS
- * Copyright (C) 2016  Inria
+ * Copyright (C) 2016, 2017  Inria
  *
  * 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,8 @@ static void starpu_top_get_device_type(int id, char* type)
 	case STARPU_SCC_WORKER:
 		strncpy(type, "SCC", 9);
 		break;
-	case STARPU_MPI_WORKER:
-		strncpy(type, "MPI", 9);
+	case STARPU_MPI_MS_WORKER:
+		strncpy(type, "MPI_MS", 9);
 		break;
 	}
 	type[9] = 0;

+ 2 - 2
tests/datawizard/copy.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2011, 2016  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013  CNRS
- * Copyright (C) 2016  INRIA
+ * Copyright (C) 2016, 2017  INRIA
  *
  * 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
@@ -65,7 +65,7 @@ int main(int argc, char **argv)
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 	if (starpu_worker_get_count_by_type(STARPU_CUDA_WORKER) == 0 && starpu_worker_get_count_by_type(STARPU_OPENCL_WORKER) == 0 &&
-		starpu_worker_get_count_by_type(STARPU_MIC_WORKER) == 0 && starpu_worker_get_count_by_type(STARPU_MPI_WORKER) == 0)
+		starpu_worker_get_count_by_type(STARPU_MIC_WORKER) == 0 && starpu_worker_get_count_by_type(STARPU_MPI_MS_WORKER) == 0)
 	{
 		FPRINTF(stderr, "This application requires a CUDA , OpenCL or MIC Worker\n");
 		starpu_shutdown();