Преглед изворни кода

New configure options --with-simgrid-dir --with-simgrid-include-dir and --with-simgrid-lib-dir to specify the location of the SimGrid library

Nathalie Furmento пре 11 година
родитељ
комит
c1a9b88ba7
4 измењених фајлова са 87 додато и 5 уклоњено
  1. 3 0
      ChangeLog
  2. 41 2
      configure.ac
  3. 18 2
      doc/doxygen/chapters/21simgrid.doxy
  4. 25 1
      doc/doxygen/chapters/41configure_options.doxy

+ 3 - 0
ChangeLog

@@ -240,6 +240,9 @@ Small features:
     enable automatic free(cl_arg); free(callback_arg);
     free(prologue_callback_arg) on task destroy.
   * New function starpu_task_build
+  * New configure options --with-simgrid-dir
+    --with-simgrid-include-dir and --with-simgrid-lib-dir to specify
+    the location of the SimGrid library
 
 Changes:
   * Rename all filter functions to follow the pattern

+ 41 - 2
configure.ac

@@ -931,16 +931,53 @@ if test x$enable_opencl_simulator = xyes; then
 	AC_DEFINE(STARPU_OPENCL_SIMULATOR, 1, [Define this to enable using an OpenCL simulator])
 fi
 
+AC_ARG_WITH(simgrid-dir,
+	[AS_HELP_STRING([--with-simgrid-dir=<path>],
+	[specify SimGrid installation directory])],
+	[
+		simgrid_dir="$withval"
+		# in case this was not explicit yet
+		enable_simgrid=yes
+	], simgrid_dir=no)
+
+AC_ARG_WITH(simgrid-include-dir,
+	[AS_HELP_STRING([--with-simgrid-include-dir=<path>],
+	[specify where SimGrid headers are installed])],
+	[
+		simgrid_include_dir="$withval"
+		# in case this was not explicit yet
+		enable_simgrid=yes
+	], [simgrid_include_dir=no])
+
+AC_ARG_WITH(simgrid-lib-dir,
+	[AS_HELP_STRING([--with-simgrid-lib-dir=<path>],
+	[specify where SimGrid libraries are installed])],
+	[
+		simgrid_lib_dir="$withval"
+		# in case this was not explicit yet
+		enable_simgrid=yes
+	], [simgrid_lib_dir=no])
+
 AC_ARG_ENABLE(simgrid, [AS_HELP_STRING([--enable-simgrid],
 			[Enable simulating execution in simgrid])],
 			enable_simgrid=$enableval, enable_simgrid=no)
 if test x$enable_simgrid = xyes ; then
-	if test -n "$SIMGRID_CFLAGS" ; then
-		CFLAGS="$SIMGRID_CFLAGS $CFLAGS"
+   	if test -n "$SIMGRID_CFLAGS" ; then
+	   	CFLAGS="$SIMGRID_CFLAGS $CFLAGS"
 	fi
 	if test -n "$SIMGRID_LIBS" ; then
 		LDFLAGS="$SIMGRID_LIBS $LDFLAGS"
 	fi
+	if test "$simgrid_dir" != "no" ; then
+	   	CFLAGS="-I$simgrid_dir/include $CFLAGS"
+	   	LDFLAGS="-L$simgrid_dir/lib $LDFLAGS"
+	fi
+	if test "$simgrid_include_dir" != "no" ; then
+	   	CFLAGS="-I$simgrid_include_dir $CFLAGS"
+	fi
+	if test "$simgrid_lib_dir" != "no" ; then
+	   	LDFLAGS="-L$simgrid_lib_dir $LDFLAGS"
+	fi
 	AC_HAVE_LIBRARY([simgrid], [],
 		[
 			AC_MSG_ERROR(Simgrid support needs simgrid installed)
@@ -961,6 +998,8 @@ fi
 AM_CONDITIONAL(STARPU_SIMGRID, test x$enable_simgrid = xyes)
 AC_SUBST(SIMGRID_CFLAGS)
 AC_SUBST(SIMGRID_LIBS)
+AC_MSG_CHECKING(whether SimGrid is enabled)
+AC_MSG_RESULT($enable_simgrid)
 
 AC_MSG_CHECKING(whether blocking drivers should be enabled)
 AC_ARG_ENABLE(blocking-drivers, [AS_HELP_STRING([--enable-blocking-drivers], [enable blocking drivers])],

+ 18 - 2
doc/doxygen/chapters/21simgrid.doxy

@@ -59,10 +59,26 @@ run several times before the model is calibrated.
 \section Simulation Simulation
 
 Then, recompile StarPU, passing \ref enable-simgrid "--enable-simgrid"
-to <c>./configure</c>, and re-run the application:
+to <c>./configure</c>.
 
 \verbatim
-$ ./configure --enable-simgrid && make
+$ ./configure --enable-simgrid
+\endverbatim
+
+To specify the location of SimGrid, you can either set the environment
+variables SIMGRID_CFLAGS and SIMGRID_LIBS, or use the configure
+options \ref with-simgrid-dir "--with-simgrid-dir",
+\ref with-simgrid-include-dir "--with-simgrid-include-dir" and
+\ref with-simgrid-lib-dir "--with-simgrid-lib-dir", for example
+
+\verbatim
+$ ./configure --with-simgrid-dir=/opt/local/simgrid
+\endverbatim
+
+You can then re-run the application.
+
+\verbatim
+$ make
 $ STARPU_SCHED=dmda ./examples/matvecmult/matvecmult
 TEST FAILED !!!
 \endverbatim

+ 25 - 1
doc/doxygen/chapters/41configure_options.doxy

@@ -1,7 +1,7 @@
 /*
  * This file is part of the StarPU Handbook.
  * Copyright (C) 2009--2011  Universit@'e de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  * See the file version.doxy for copying conditions.
  */
@@ -526,6 +526,30 @@ export SIMGRID_LIBS="-L/usr/local/simgrid/lib -lsimgrid"
 
 </dd>
 
+<dt>--with-simgrid-dir</dt>
+<dd>
+\anchor with-simgrid-dir
+\addindex __configure__--with-simgrid-dir
+Similar to the option \ref enable-simgrid "--enable-simgrid" but also
+allows to specify the location to the SimGrid library.
+</dd>
+
+<dt>--with-simgrid-include-dir</dt>
+<dd>
+\anchor with-simgrid-include-dir
+\addindex __configure__--with-simgrid-include-dir
+Similar to the option \ref enable-simgrid "--enable-simgrid" but also
+allows to specify the location to the SimGrid include directory.
+</dd>
+
+<dt>--with-simgrid-lib-dir</dt>
+<dd>
+\anchor with-simgrid-lib-dir
+\addindex __configure__--with-simgrid-lib-dir
+Similar to the option \ref enable-simgrid "--enable-simgrid" but also
+allows to specify the location to the SimGrid lib directory.
+</dd>
+
 <dt>--enable-calibration-heuristic</dt>
 <dd>
 \anchor enable-calibration-heuristic