[Debian-astro-commits] [gyoto] 36/221: MPI: install gyoto-mpi-worker in ${soversdir}
Thibaut Jean-Claude Paumard
thibaut at moszumanska.debian.org
Fri May 22 20:52:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
thibaut pushed a commit to branch master
in repository gyoto.
commit b27967a8590b6bf15f0dd53f7d753aaaf83571a3
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date: Sat Oct 11 18:20:20 2014 +0200
MPI: install gyoto-mpi-worker in ${soversdir}
---
bin/Makefile.am | 3 +-
bin/Makefile.in | 90 +++++++++++++++++++++++++++++++++++++++++++++------------
lib/Scenery.C | 11 +++++++
3 files changed, 85 insertions(+), 19 deletions(-)
diff --git a/bin/Makefile.am b/bin/Makefile.am
index aa53dbd..5f6a4f4 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -6,7 +6,8 @@ CLEANFILES=example-*.fits
bin_PROGRAMS = gyoto
if HAVE_MPI
- bin_PROGRAMS += gyoto-mpi-worker
+ soverdir=$(pkglibdir)/@sovers@
+ sover_PROGRAMS = gyoto-mpi-worker
endif
dist_man_MANS = gyoto.1
gyoto_SOURCES = gyoto.C
diff --git a/bin/Makefile.in b/bin/Makefile.in
index 23e3011..d3a429a 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -79,8 +79,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-bin_PROGRAMS = gyoto$(EXEEXT) $(am__EXEEXT_1)
- at HAVE_MPI_TRUE@am__append_1 = gyoto-mpi-worker
+bin_PROGRAMS = gyoto$(EXEEXT)
+ at HAVE_MPI_TRUE@sover_PROGRAMS = gyoto-mpi-worker$(EXEEXT)
subdir = bin
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp $(dist_man_MANS)
@@ -101,9 +101,9 @@ CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/include/GyotoConfig.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
- at HAVE_MPI_TRUE@am__EXEEXT_1 = gyoto-mpi-worker$(EXEEXT)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(soverdir)" \
+ "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS) $(sover_PROGRAMS)
am_gyoto_OBJECTS = gyoto-gyoto.$(OBJEXT)
gyoto_OBJECTS = $(am_gyoto_OBJECTS)
gyoto_DEPENDENCIES = @top_builddir@/lib/libgyoto.la
@@ -386,6 +386,7 @@ AM_CPPFLAGS = -I at top_builddir@/include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(B
AM_LDFLAGS = $(XERCESLDFLAGS) $(PTHREAD_LIBS)
AM_CXXFLAGS = $(PTHREAD_CFLAGS)
CLEANFILES = example-*.fits
+ at HAVE_MPI_TRUE@soverdir = $(pkglibdir)/@sovers@
dist_man_MANS = gyoto.1
gyoto_SOURCES = gyoto.C
gyoto_LDADD = @top_builddir@/lib/libgyoto.la
@@ -479,6 +480,55 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-soverPROGRAMS: $(sover_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(sover_PROGRAMS)'; test -n "$(soverdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(soverdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(soverdir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(soverdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(soverdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-soverPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sover_PROGRAMS)'; test -n "$(soverdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(soverdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(soverdir)" && rm -f $$files
+
+clean-soverPROGRAMS:
+ @list='$(sover_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
gyoto$(EXEEXT): $(gyoto_OBJECTS) $(gyoto_DEPENDENCIES) $(EXTRA_gyoto_DEPENDENCIES)
@rm -f gyoto$(EXEEXT)
@@ -681,7 +731,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(soverdir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -717,7 +767,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+ clean-soverPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -737,7 +788,7 @@ info: info-am
info-am:
-install-data-am: install-man
+install-data-am: install-man install-soverPROGRAMS
install-dvi: install-dvi-am
@@ -783,26 +834,29 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-man
+uninstall-am: uninstall-binPROGRAMS uninstall-man \
+ uninstall-soverPROGRAMS
uninstall-man: uninstall-man1
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
- clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
- ctags ctags-am distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-man1 \
- install-pdf install-pdf-am install-ps install-ps-am \
+ clean-binPROGRAMS clean-generic clean-libtool \
+ clean-soverPROGRAMS cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-man1 install-pdf \
+ install-pdf-am install-ps install-ps-am install-soverPROGRAMS \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-man uninstall-man1
+ uninstall-binPROGRAMS uninstall-man uninstall-man1 \
+ uninstall-soverPROGRAMS
export PATH := .:$(PATH)
diff --git a/lib/Scenery.C b/lib/Scenery.C
index 0a2840a..994ff52 100644
--- a/lib/Scenery.C
+++ b/lib/Scenery.C
@@ -849,6 +849,17 @@ SmartPointer<Scenery> Gyoto::Scenery::Subcontractor(FactoryMessenger* fmp) {
bool Gyoto::Scenery::is_worker=false;
void Gyoto::Scenery::mpiSpawn(int nbchildren) {
+
+
+ // Add our SO-versionned directory at the end of the PATH variable.
+ string PATH=getenv("PATH");
+ PATH += ":";
+ PATH += GYOTO_PREFIX ;
+ PATH += "/lib/gyoto/" ;
+ PATH += GYOTO_SOVERS;
+
+ setenv("PATH", PATH.c_str(), 1);
+
if (mpi_workers_) {
if (mpi_workers_->size()==nbchildren) return;
mpiTerminate(true);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git
More information about the Debian-astro-commits
mailing list