Explorar o código

Add STARPU_SIMGRID_TRANSFER_COST environment variable to easily disable data transfer costs.

Samuel Thibault %!s(int64=6) %!d(string=hai) anos
pai
achega
fe0c66aca2
Modificáronse 3 ficheiros con 13 adicións e 4 borrados
  1. 2 0
      ChangeLog
  2. 2 3
      doc/doxygen/chapters/470_simgrid.doxy
  3. 9 1
      src/core/simgrid.c

+ 2 - 0
ChangeLog

@@ -160,6 +160,8 @@ Small changes:
 
 StarPU 1.2.9 (git revision xxx)
 ==============================================
+  * Add STARPU_SIMGRID_TRANSFER_COST environment variable to easily disable
+    data transfer costs.
 
 StarPU 1.2.8 (git revision f66374c9ad39aefb7cf5dfc31f9ab3d756bcdc3c)
 ==============================================

+ 2 - 3
doc/doxygen/chapters/470_simgrid.doxy

@@ -2,8 +2,7 @@
  *
  * Copyright (C) 2011,2012,2014,2016,2017                 Inria
  * Copyright (C) 2010-2019                                CNRS
- * Copyright (C) 2009-2011,2014-2018                      Université de Bordeaux
- * Copyright (C) 2009-2011,2014-2018                      Université de Bordeaux,
+ * Copyright (C) 2009-2011,2014-2019                      Université de Bordeaux
  *
  * 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
@@ -155,7 +154,7 @@ be extended as well), change the available GPU memory size, PCI memory bandwidth
 
 The simulation can be tweaked, to be able to tune it between a very accurate
 simulation and a very simple simulation (which is thus close to scheduling
-theory results), see the \ref STARPU_SIMGRID_CUDA_MALLOC_COST,
+theory results), see the \ref STARPU_SIMGRID_TRANSFER_COST, \ref STARPU_SIMGRID_CUDA_MALLOC_COST,
 \ref STARPU_SIMGRID_CUDA_QUEUE_COST, \ref STARPU_SIMGRID_TASK_SUBMIT_COST,
 \ref STARPU_SIMGRID_FETCHING_INPUT_COST and \ref STARPU_SIMGRID_SCHED_COST environment variables.
 

+ 9 - 1
src/core/simgrid.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2016,2017                                Inria
  * Copyright (C) 2012,2013,2015-2018                      CNRS
- * Copyright (C) 2012-2018                                Université de Bordeaux
+ * Copyright (C) 2012-2019                                Université de Bordeaux
  * Copyright (C) 2013                                     Thibaut Lambert
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -52,6 +52,8 @@ extern int _starpu_mpi_simgrid_init(int argc, char *argv[]);
  * initialized through MSG_process_attach */
 static int simgrid_started;
 
+static int simgrid_transfer_cost;
+
 static int runners_running;
 starpu_pthread_queue_t _starpu_simgrid_transfer_queue[STARPU_MAXNODES];
 static struct transfer_runner
@@ -267,6 +269,8 @@ void _starpu_start_simgrid(int *argc, char **argv)
 	_starpu_simgrid_get_platform_path(4, path, sizeof(path));
 #endif
 	MSG_create_environment(path);
+
+	simgrid_transfer_cost = starpu_get_env_number_default("STARPU_SIMGRID_TRANSFER_COST", 1);
 }
 
 static int main_ret;
@@ -914,6 +918,10 @@ int _starpu_simgrid_transfer(size_t size, unsigned src_node, unsigned dst_node,
 	if (!size)
 		return 0;
 
+	/* Explicitly disabled by user? */
+	if (!simgrid_transfer_cost)
+		return 0;
+
 	msg_task_t task;
 	msg_host_t *hosts;
 	double *computation;