diff options
author | eschnett <eschnett@043a8217-7a68-40fe-abfd-36aa7d4fa6a8> | 2015-05-01 18:38:50 +0000 |
---|---|---|
committer | eschnett <eschnett@043a8217-7a68-40fe-abfd-36aa7d4fa6a8> | 2015-05-01 18:38:50 +0000 |
commit | 6d29a40ab39c2cd15160c448d2b3a47943022fed (patch) | |
tree | d9ad6bbe49be2b9073989bcc3413d8e01b92f14f | |
parent | 37c816110763b321a177a895cadbc6558fe4219e (diff) |
Pass hwloc options to MPI build script
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/MPI/trunk@63 043a8217-7a68-40fe-abfd-36aa7d4fa6a8
-rw-r--r-- | configuration.ccl | 2 | ||||
-rw-r--r-- | src/build.pl | 10 | ||||
-rw-r--r-- | src/detect.pl | 5 | ||||
-rw-r--r-- | src/make.code.deps | 2 |
4 files changed, 12 insertions, 7 deletions
diff --git a/configuration.ccl b/configuration.ccl index eb9715a..0bd302b 100644 --- a/configuration.ccl +++ b/configuration.ccl @@ -4,7 +4,7 @@ PROVIDES MPI { SCRIPT src/detect.pl LANG perl - OPTIONS MPI MPI_DIR MPI_INC_DIRS MPI_LIB_DIRS MPI_LIBS MPI_INSTALL_DIR + OPTIONS MPI MPI_DIR MPI_INC_DIRS MPI_LIB_DIRS MPI_LIBS MPI_INSTALL_DIR HWLOC_DIR } # Pass configuration options to build script diff --git a/src/build.pl b/src/build.pl index 03622fe..6e25a62 100644 --- a/src/build.pl +++ b/src/build.pl @@ -61,14 +61,14 @@ system("$ENV{TAR} xzf ${SRCDIR}/../dist/${NAME}.tar.gz") == 0 or die; print "MPI: Configuring...\n"; chdir(${NAME}); -# Cannot have a memory manager with a static library on some systems -# (e.g. Linux); see -# <http://www.open-mpi.org/faq/?category=mpi-apps#static-mpi-apps> my $hwloc_opts = ''; if ($ENV{HWLOC_DIR} ne '') { - $hwloc_opts = "--with-hwloc=$ENV{HWLOC_DIR}"; + $hwloc_opts = "--with-hwloc='$ENV{HWLOC_DIR}'"; } -system("./configure --prefix=$mpi_dir $hwloc_opts --without-memory-manager --without-libnuma --enable-shared=no --enable-static=yes") == 0 or die; +# Cannot have a memory manager with a static library on some systems +# (e.g. Linux); see +# <http://www.open-mpi.org/faq/?category=mpi-apps#static-mpi-apps> +system("./configure --prefix='$mpi_dir' $hwloc_opts --without-memory-manager --without-libnuma --enable-shared=no --enable-static=yes") == 0 or die; print "MPI: Building...\n"; system("$ENV{MAKE}") == 0 or die; diff --git a/src/detect.pl b/src/detect.pl index 73fa33c..26615b7 100644 --- a/src/detect.pl +++ b/src/detect.pl @@ -216,6 +216,11 @@ if ($mpi_info_set) { $ENV{MPI_INC_DIRS} = strip_inc_dirs($ENV{MPI_INC_DIRS}); $ENV{MPI_LIB_DIRS} = strip_lib_dirs($ENV{MPI_LIB_DIRS}); +# Pass configuration options to build script +print "BEGIN MAKE_DEFINITION\n"; +print "HWLOC_DIR = $ENV{HWLOC_DIR}\n"; +print "END MAKE_DEFINITION\n"; + # Pass options to Cactus print "BEGIN DEFINE\n"; diff --git a/src/make.code.deps b/src/make.code.deps index 5deb6ba..da612ea 100644 --- a/src/make.code.deps +++ b/src/make.code.deps @@ -1,6 +1,6 @@ # Main make.code.deps file for thorn MPI -export MPI_INSTALL_DIR +export MPI_INSTALL_DIR HWLOC_DIR $(CCTK_TARGET) $(OBJS) $(SRCS:%=%.d): $(SCRATCH_BUILD)/done/$(THORN) $(SCRATCH_BUILD)/done/$(THORN): $(SRCDIR)/build.pl |