[Debian-astro-commits] [gyoto] 92/221: Separate MPI tests in 'make check-mpi' to avoid hanging the computer when not plugged to the network

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:36 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 bc4190910c8c2f8e6222a06c9672580d2e1da5ce
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date:   Wed Nov 19 14:43:31 2014 +0100

    Separate MPI tests in 'make check-mpi' to avoid hanging the computer when not plugged to the network
---
 Makefile.am        |  8 +++++
 Makefile.in        |  4 +++
 bin/Makefile.am    | 89 ++++++++++++++++++++++++++++++------------------------
 bin/Makefile.in    | 78 ++++++++++++++++++++++++-----------------------
 configure          | 15 +++++++++
 configure.ac       |  2 ++
 yorick/Makefile.in |  6 ++++
 yorick/check-mpi.i | 10 ++++++
 yorick/check.i     |  9 ++++--
 9 files changed, 141 insertions(+), 80 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e028b3b..16d1fc2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,4 +6,12 @@ $(SUBDIRS):
 ChangeLog:
 	git log --no-merges > ChangeLog
 
+check-mpi check-mpi-clean:
+if BUILD_GYOTO
+	cd bin ; $(MAKE) $@
+endif
+if HAVE_YORICK
+	cd yorick ; $(MAKE) $@
+endif
+
 .PHONY: $(SUBDIRS) install ChangeLog
diff --git a/Makefile.in b/Makefile.in
index 35faf27..c8b2699 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -893,6 +893,10 @@ $(SUBDIRS):
 ChangeLog:
 	git log --no-merges > ChangeLog
 
+check-mpi check-mpi-clean:
+ at BUILD_GYOTO_TRUE@	cd bin ; $(MAKE) $@
+ at HAVE_YORICK_TRUE@	cd yorick ; $(MAKE) $@
+
 .PHONY: $(SUBDIRS) install ChangeLog
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 5cc3b68..f012d91 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
 AM_CPPFLAGS = -I at top_builddir@/include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS)
 AM_LDFLAGS  = $(XERCESLDFLAGS) $(PTHREAD_LIBS)
 AM_CXXFLAGS = $(PTHREAD_CFLAGS)
-CLEANFILES=example-*.fits
+CLEANFILES =
 
 bin_PROGRAMS  =
 dist_man_MANS =
@@ -33,45 +33,54 @@ gyoto-mpi-worker. at sovers@.1: gyoto-mpi-worker.1
 
 export PATH := .:$(PATH)
 
-if BUILD_GYOTO
-CHECK_CMD = unset GYOTO_PLUGINS && ./gyoto --resolution=32 --nthreads=8
-check: gyoto
-	$(CHECK_CMD) ../doc/examples/example-thin-disk.xml \
-	   \!example-thin-disk.fits
-	$(CHECK_CMD) ../doc/examples/example-thin-disk-KS.xml \
-	   \!example-thin-disk-KS.fits
-	$(CHECK_CMD) ../doc/examples/example-thin-disk-minkowski-cartesian.xml \
-	   \!example-thin-disk-minkowski-cartesian.fits
-	$(CHECK_CMD) ../doc/examples/example-thin-disk-minkowski-spherical.xml \
-	   \!example-thin-disk-minkowski-spherical.fits
-	$(CHECK_CMD) ../doc/examples/example-complex-astrobj.xml \
-	   \!example-complex-astrobj.fits
-	$(CHECK_CMD) ../doc/examples/example-fixed-star.xml \
-	   \!example-fixed-star.fits
-if HAVE_UDUNITS
-	$(CHECK_CMD) ../doc/examples/example-fixed-star-KS.xml \
-	   \!example-fixed-star-KS.fits
-endif
-	$(CHECK_CMD) ../doc/examples/example-fixed-star-minkowski-cartesian.xml \
-	   \!example-fixed-star-minkowski-cartesian.fits
-	$(CHECK_CMD) ../doc/examples/example-fixed-star-minkowski-spherical.xml \
-	   \!example-fixed-star-minkowski-spherical.fits
-	$(CHECK_CMD) ../doc/examples/example-startrace.xml \
-	   \!example-startrace.fits
-	$(CHECK_CMD) ../doc/examples/example-moving-star.xml \
-	   \!example-moving-star.fits
-	$(CHECK_CMD) ../doc/examples/example-page-thorne-disk-BL.xml \
-	   \!example-page-thorne-disk-BL.fits
-	$(CHECK_CMD) ../doc/examples/example-page-thorne-disk-KS.xml \
-	   \!example-page-thorne-disk-KS.fits
-	$(CHECK_CMD) ../doc/examples/example-page-thorne-disk-BL-with-basis.xml \
-	   \!example-page-thorne-disk-BL-with-basis.fits
-	$(CHECK_CMD) ../doc/examples/example-torus.xml \
-	   \!example-torus.fits
-	$(CHECK_CMD) ../doc/examples/example-torus-KS.xml \
-	   \!example-torus-KS.fits
+EXAMPLE_DIR = ../doc/examples/
+CHECK_RESULTS = \
+        example-thin-disk.fits \
+        example-thin-disk-KS.fits \
+        example-thin-disk-minkowski-cartesian.fits \
+        example-thin-disk-minkowski-spherical.fits \
+        example-complex-astrobj.fits \
+        example-fixed-star.fits \
+        example-fixed-star-minkowski-cartesian.fits \
+        example-fixed-star-minkowski-spherical.fits \
+        example-startrace.fits \
+        example-moving-star.fits \
+        example-page-thorne-disk-BL.fits \
+        example-page-thorne-disk-KS.fits \
+        example-page-thorne-disk-BL-with-basis.fits \
+        example-torus.fits \
+        example-torus-KS.fits
 if HAVE_UDUNITS
-	$(CHECK_CMD) ../doc/examples/example-polish-doughnut.xml \
-	   \!example-polish-doughnut.fits
+CHECK_RESULTS += \
+        example-fixed-star-KS.fits \
+        example-polish-doughnut.fits
 endif
+CHECK_MPI_RESULTS = $(CHECK_RESULTS:.fits=-mpi.fits)
+CLEANFILES += $(CHECK_RESULTS) $(CHECK_MPI_RESULTS)
+
+CHECK_CMD = unset GYOTO_PLUGINS && ./gyoto --resolution=32 --nthreads=8 --nprocesses=0
+
+check-nompi-clean:
+	rm -f $(CHECK_RESULTS)
+
+check-mpi-clean:
+	rm -f $(CHECK_MPI_RESULTS)
+
+if BUILD_GYOTO
+$(CHECK_RESULTS): gyoto $(EXAMPLE_DIR)$(@:.fits=.xml)
+	$(CHECK_CMD) $(EXAMPLE_DIR)$(@:.fits=.xml) \!$@
+
+$(CHECK_MPI_RESULTS): gyoto $(EXAMPLE_DIR)$(@:-mpi.fits=.xml)
+	$(CHECK_CMD) --nprocesses=4 $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) \!$@
+
+check-nompi-compute: $(CHECK_RESULTS)
+check-nompi: check-nompi-clean check-nompi-compute
+
+check-mpi-compute: $(CHECK_MPI_RESULTS)
+check-mpi: check-mpi-clean check-mpi-compute
+
+check: check-nompi
+
 endif
+
+.PHONY: check-nompi-compute check-nompi-clean check-nompi check-mpi-clean check-mpi-compute check-mpi check
diff --git a/bin/Makefile.in b/bin/Makefile.in
index 1e16c33..aff9500 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -85,6 +85,10 @@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
 @HAVE_MPI_TRUE at am__append_3 = gyoto-mpi-worker. at sovers@
 @HAVE_MPI_TRUE at am__append_4 = gyoto-mpi-worker. at sovers@.1
 @HAVE_MPI_TRUE at am__append_5 = gyoto-mpi-worker. at sovers@.1
+ at HAVE_UDUNITS_TRUE@am__append_6 = \
+ at HAVE_UDUNITS_TRUE@        example-fixed-star-KS.fits \
+ at HAVE_UDUNITS_TRUE@        example-polish-doughnut.fits
+
 subdir = bin
 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
 	$(top_srcdir)/depcomp $(dist_man_MANS)
@@ -393,7 +397,7 @@ ACLOCAL_AMFLAGS = -I m4
 AM_CPPFLAGS = -I at top_builddir@/include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS)
 AM_LDFLAGS = $(XERCESLDFLAGS) $(PTHREAD_LIBS)
 AM_CXXFLAGS = $(PTHREAD_CFLAGS)
-CLEANFILES = example-*.fits $(am__append_5)
+CLEANFILES = $(am__append_5) $(CHECK_RESULTS) $(CHECK_MPI_RESULTS)
 dist_man_MANS = $(am__append_2) $(am__append_4)
 gyoto_SOURCES = gyoto.C
 gyoto_LDADD = @top_builddir@/lib/libgyoto at FEATURES@.la
@@ -403,7 +407,20 @@ gyoto_mpi_worker_ at sovers@_SOURCES = gyoto-mpi-worker.C
 gyoto_mpi_worker_ at sovers@_LDADD = @top_builddir@/lib/libgyoto at FEATURES@.la -lboost_mpi -lboost_serialization
 gyoto_mpi_worker_ at sovers@_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIOCPPFLAGS)
 gyoto_mpi_worker_ at sovers@_LDFLAGS = $(AM_LDFLAGS) $(CFITSIOLDFLAGS) -export-dynamic
- at BUILD_GYOTO_TRUE@CHECK_CMD = unset GYOTO_PLUGINS && ./gyoto --resolution=32 --nthreads=8
+EXAMPLE_DIR = ../doc/examples/
+CHECK_RESULTS = example-thin-disk.fits example-thin-disk-KS.fits \
+	example-thin-disk-minkowski-cartesian.fits \
+	example-thin-disk-minkowski-spherical.fits \
+	example-complex-astrobj.fits example-fixed-star.fits \
+	example-fixed-star-minkowski-cartesian.fits \
+	example-fixed-star-minkowski-spherical.fits \
+	example-startrace.fits example-moving-star.fits \
+	example-page-thorne-disk-BL.fits \
+	example-page-thorne-disk-KS.fits \
+	example-page-thorne-disk-BL-with-basis.fits example-torus.fits \
+	example-torus-KS.fits $(am__append_6)
+CHECK_MPI_RESULTS = $(CHECK_RESULTS:.fits=-mpi.fits)
+CHECK_CMD = unset GYOTO_PLUGINS && ./gyoto --resolution=32 --nthreads=8 --nprocesses=0
 all: all-am
 
 .SUFFIXES:
@@ -817,41 +834,28 @@ gyoto-mpi-worker. at sovers@.1: gyoto-mpi-worker.1
 	cp $^ $@
 
 export PATH := .:$(PATH)
- at BUILD_GYOTO_TRUE@check: gyoto
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-thin-disk.xml \
- at BUILD_GYOTO_TRUE@	   \!example-thin-disk.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-thin-disk-KS.xml \
- at BUILD_GYOTO_TRUE@	   \!example-thin-disk-KS.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-thin-disk-minkowski-cartesian.xml \
- at BUILD_GYOTO_TRUE@	   \!example-thin-disk-minkowski-cartesian.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-thin-disk-minkowski-spherical.xml \
- at BUILD_GYOTO_TRUE@	   \!example-thin-disk-minkowski-spherical.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-complex-astrobj.xml \
- at BUILD_GYOTO_TRUE@	   \!example-complex-astrobj.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-fixed-star.xml \
- at BUILD_GYOTO_TRUE@	   \!example-fixed-star.fits
- at BUILD_GYOTO_TRUE@@HAVE_UDUNITS_TRUE@	$(CHECK_CMD) ../doc/examples/example-fixed-star-KS.xml \
- at BUILD_GYOTO_TRUE@@HAVE_UDUNITS_TRUE@	   \!example-fixed-star-KS.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-fixed-star-minkowski-cartesian.xml \
- at BUILD_GYOTO_TRUE@	   \!example-fixed-star-minkowski-cartesian.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-fixed-star-minkowski-spherical.xml \
- at BUILD_GYOTO_TRUE@	   \!example-fixed-star-minkowski-spherical.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-startrace.xml \
- at BUILD_GYOTO_TRUE@	   \!example-startrace.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-moving-star.xml \
- at BUILD_GYOTO_TRUE@	   \!example-moving-star.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-page-thorne-disk-BL.xml \
- at BUILD_GYOTO_TRUE@	   \!example-page-thorne-disk-BL.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-page-thorne-disk-KS.xml \
- at BUILD_GYOTO_TRUE@	   \!example-page-thorne-disk-KS.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-page-thorne-disk-BL-with-basis.xml \
- at BUILD_GYOTO_TRUE@	   \!example-page-thorne-disk-BL-with-basis.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-torus.xml \
- at BUILD_GYOTO_TRUE@	   \!example-torus.fits
- at BUILD_GYOTO_TRUE@	$(CHECK_CMD) ../doc/examples/example-torus-KS.xml \
- at BUILD_GYOTO_TRUE@	   \!example-torus-KS.fits
- at BUILD_GYOTO_TRUE@@HAVE_UDUNITS_TRUE@	$(CHECK_CMD) ../doc/examples/example-polish-doughnut.xml \
- at BUILD_GYOTO_TRUE@@HAVE_UDUNITS_TRUE@	   \!example-polish-doughnut.fits
+
+check-nompi-clean:
+	rm -f $(CHECK_RESULTS)
+
+check-mpi-clean:
+	rm -f $(CHECK_MPI_RESULTS)
+
+ at BUILD_GYOTO_TRUE@$(CHECK_RESULTS): gyoto $(EXAMPLE_DIR)$(@:.fits=.xml)
+ at BUILD_GYOTO_TRUE@	$(CHECK_CMD) $(EXAMPLE_DIR)$(@:.fits=.xml) \!$@
+
+ at BUILD_GYOTO_TRUE@$(CHECK_MPI_RESULTS): gyoto $(EXAMPLE_DIR)$(@:-mpi.fits=.xml)
+ at BUILD_GYOTO_TRUE@	$(CHECK_CMD) --nprocesses=4 $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) \!$@
+
+ at BUILD_GYOTO_TRUE@check-nompi-compute: $(CHECK_RESULTS)
+ at BUILD_GYOTO_TRUE@check-nompi: check-nompi-clean check-nompi-compute
+
+ at BUILD_GYOTO_TRUE@check-mpi-compute: $(CHECK_MPI_RESULTS)
+ at BUILD_GYOTO_TRUE@check-mpi: check-mpi-clean check-mpi-compute
+
+ at BUILD_GYOTO_TRUE@check: check-nompi
+
+.PHONY: check-nompi-compute check-nompi-clean check-nompi check-mpi-clean check-mpi-compute check-mpi check
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/configure b/configure
index b876f8b..6fccd69 100755
--- a/configure
+++ b/configure
@@ -675,6 +675,8 @@ PTHREAD_CC
 ax_pthread_config
 Y_INST_SITE
 Y_INST_HOME
+HAVE_YORICK_FALSE
+HAVE_YORICK_TRUE
 YORICK
 POW_LIB
 LIBOBJS
@@ -17215,6 +17217,15 @@ done
 fi
 
 
+ if test "x$YORICK" != "x"; then
+  HAVE_YORICK_TRUE=
+  HAVE_YORICK_FALSE='#'
+else
+  HAVE_YORICK_TRUE='#'
+  HAVE_YORICK_FALSE=
+fi
+
+
 # Only if YORICK available, check for install directories
 if test "x$YORICK" != "x"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking install path for Yorick platform-dependent files" >&5
@@ -18696,6 +18707,10 @@ if test -z "${HAVE_MPI_TRUE}" && test -z "${HAVE_MPI_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_MPI\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_YORICK_TRUE}" && test -z "${HAVE_YORICK_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_YORICK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_UDUNITS_TRUE}" && test -z "${HAVE_UDUNITS_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_UDUNITS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 84880cd..07e9e6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,6 +195,8 @@ AC_ARG_WITH([yorick],
   [AC_CHECK_PROGS([YORICK],$yorick_exe)]
 )
 
+AM_CONDITIONAL(HAVE_YORICK, [test "x$YORICK" != "x"])
+
 # Only if YORICK available, check for install directories
 AS_IF([test "x$YORICK" != "x"],
   [AC_MSG_CHECKING([install path for Yorick platform-dependent files])
diff --git a/yorick/Makefile.in b/yorick/Makefile.in
index 73afcb6..3c6e7ea 100644
--- a/yorick/Makefile.in
+++ b/yorick/Makefile.in
@@ -127,6 +127,12 @@ check-dll: $(PKG_DLL) check.i
 	GYOTO_CHECK_NODISPLAY=true \
 	./yorick -i check.i
 
+check-mpi: $(PKG_DLL) check-mpi.i
+	cp yorick1 yorick
+	unset GYOTO_PLUGINS && \
+	GYOTO_CHECK_NODISPLAY=true \
+	./yorick -i check-mpi.i
+
 install::
 	cd stdplug; make install
 	$(YNSTALL) ygyoto.h ygyoto_idx.h ygyoto_supplier.C $(DEST_Y_SITE)/include
diff --git a/yorick/check-mpi.i b/yorick/check-mpi.i
index ed1ca88..1271f3f 100644
--- a/yorick/check-mpi.i
+++ b/yorick/check-mpi.i
@@ -17,6 +17,14 @@
     along with Gyoto.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+// NODISPLAY implies batch mode
+if (get_env("GYOTO_CHECK_NODISPLAY")) {
+  batch, 1;
+  __xytitles=xytitles; __fma=fma; __winkill=winkill; __pli=pli; __plg=plg;
+  __pause=pause; __window=window;
+  xytitles = fma = winkill = pli = plg = pause = window = noop;
+ }
+
 #include "check-helpers.i"
 restore, gyoto;
 
@@ -119,3 +127,5 @@ data=data2=have_mpi=mdiff=diff=inited=finited=[];
 done;
 
 end_section, "MPI functionalities";
+
+if (anyof(get_argv() == "check-mpi.i")) quit;
diff --git a/yorick/check.i b/yorick/check.i
index 213d7a8..7422ccf 100644
--- a/yorick/check.i
+++ b/yorick/check.i
@@ -160,12 +160,15 @@ end_section, "basic functionality";
 #include "check-directionaldisk.i"
 //#include "check-disk3d.i"
 #include "check-polish-doughnut.i"
-#include "check-mpi.i"
+// Don't run check-mpi.i automatically,
+// It may hang the computer if not plugged to the network
+//#include "check-mpi.i"
 
-write, format="\n\n%s\n%s\n%s\n",
+write, format="\n\n%s\n%s\n%s\n%s\n\n",
   "  ********************************************",
   "  *             ALL TESTS PASSED             *",
-  "  ********************************************";
+  "  ********************************************",
+  "  (You may want to run 'make check-mpi' still)";
 
 if (anyof(get_argv() == "check.i")) quit;
 //if (batch()) quit;

-- 
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