[Debichem-devel] Bug#1057556: Bug#1057556: elpa: FTBFS: not enough slots available
Santiago Vila
sanvila at debian.org
Fri Dec 15 00:03:40 GMT 2023
tags 1057556 + patch
thanks
Hello.
This is my proposal to fix this bug, but it needs some review.
(Side note: I see "Running tests with matrix size" in the build log,
so not sure if the ${TEST_FLAGS% *} thing is correct).
In summary: We run "mpiexec -n 2 true" first as a test
to ensure that the machine has enough slots. If this does
not even work, we assume that the user just want to rebuild
the package from source on a system which can't run the test
suite at all. The package appears as "reproducible" in the
reproducible builds framework, so the risk of doing this
is quite low.
I've split my changes in three different commits, with
an explanation for each of them.
As you will see, I am really willing to help...
> If you indeed have more than 1 cpu core/vcore available, then I
> agree that this is RC.
... so please honor your word and restore the original severity.
Thanks.
-------------- next part --------------
commit 04d9206284d890a5191e17198cf7ffd14ebfe67b
Author: Santiago Vila <sanvila at debian.org>
Date: Thu Dec 14 23:52:54 2023 +0100
Drop ifeq for nocheck, debhelper already does automatically
diff --git a/debian/rules b/debian/rules
index b16ea99..91f9648 100755
--- a/debian/rules
+++ b/debian/rules
@@ -38,11 +38,9 @@ endif
override_dh_auto_configure:
dh_auto_configure -- --disable-silent-rules ${BUILD_FLAGS}
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
@echo "Running tests with matrix size ${TEST_FLAGS% *}"
(cd build; $(MAKE) -j1 check || cat test-suite.log)
build/elpa2_print_kernels
# error out in case of test suite failures
if grep ^FAIL build/test-suite.log; then exit 1; fi
-endif
-------------- next part --------------
commit 275f3664dcf4eabab884650bfe8045b4ddc07696
Author: Santiago Vila <sanvila at debian.org>
Date: Thu Dec 14 23:54:51 2023 +0100
Show kernels first, run test suite last.
This way we can use the exit status of "make check" directly
without ifs or greps.
diff --git a/debian/rules b/debian/rules
index 91f9648..7d47e44 100755
--- a/debian/rules
+++ b/debian/rules
@@ -39,8 +39,6 @@ override_dh_auto_configure:
dh_auto_configure -- --disable-silent-rules ${BUILD_FLAGS}
override_dh_auto_test:
- @echo "Running tests with matrix size ${TEST_FLAGS% *}"
- (cd build; $(MAKE) -j1 check || cat test-suite.log)
build/elpa2_print_kernels
- # error out in case of test suite failures
- if grep ^FAIL build/test-suite.log; then exit 1; fi
+ @echo "Running tests with matrix size ${TEST_FLAGS% *}"
+ $(MAKE) -C build -j1 check
-------------- next part --------------
commit 21e8e7de509035e95b61c70a2cbfed488e2c9acc
Author: Santiago Vila <sanvila at debian.org>
Date: Thu Dec 14 23:58:58 2023 +0100
Skip the test suite if "mpiexec -n 2 true" fails
Use "mpiexec -n 1" instead if the architecture requires it.
We assume here that anybody trying to build the package on a system
without enough slots just wants to create .debs from the source.
This allows the package to be built on systems with a single CPU,
and also on some systems with two threads which are detected
by openmpi as having a single "core", like some virtual machines
from AWS.
diff --git a/debian/rules b/debian/rules
index 7d47e44..c6e8881 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel powerpc))
export TEST_FLAGS=200 12 2
endif
+export MPIEXEC=mpiexec -n 2
ifneq (,$(filter $(DEB_HOST_ARCH), mipsel powerpc))
export MPIEXEC=mpiexec -n 1
endif
@@ -39,6 +40,10 @@ override_dh_auto_configure:
dh_auto_configure -- --disable-silent-rules ${BUILD_FLAGS}
override_dh_auto_test:
- build/elpa2_print_kernels
- @echo "Running tests with matrix size ${TEST_FLAGS% *}"
- $(MAKE) -C build -j1 check
+ @if $(MPIEXEC) true 2> /dev/null; then \
+ build/elpa2_print_kernels; \
+ echo "Running tests with matrix size ${TEST_FLAGS% *}"; \
+ $(MAKE) -C build -j1 check; \
+ else \
+ echo "Not enough slots to run the test suite: Skipping"; \
+ fi
More information about the Debichem-devel
mailing list