Apply Debian patches (#966)
1. Fix make checkpar 2. Add missing `finalizeAllTimings 3. Add error code support to checktest.sh --------- Co-authored-by: Drew Parsons <dparsons@debian.org>
This commit is contained in:
parent
36ab29ba09
commit
593fe4cba7
12
src/Makefile
12
src/Makefile
@ -8,6 +8,10 @@ default: all
|
|||||||
# Include all variables defined by configure
|
# Include all variables defined by configure
|
||||||
include config/Makefile.config
|
include config/Makefile.config
|
||||||
|
|
||||||
|
# Tolerance level for checkpar tests
|
||||||
|
# The value of the variable can be set when calling `make checkpar`
|
||||||
|
HYPRE_CHECKPAR_TOL ?= 1e-6
|
||||||
|
|
||||||
# These are the directories for internal blas, lapack and general utilities
|
# These are the directories for internal blas, lapack and general utilities
|
||||||
HYPRE_BASIC_DIRS =\
|
HYPRE_BASIC_DIRS =\
|
||||||
blas\
|
blas\
|
||||||
@ -158,6 +162,7 @@ test: all
|
|||||||
check:
|
check:
|
||||||
@ \
|
@ \
|
||||||
echo "Checking the library ..."; \
|
echo "Checking the library ..."; \
|
||||||
|
set -e; \
|
||||||
(cd test; $(MAKE) all); \
|
(cd test; $(MAKE) all); \
|
||||||
(cd test; $(CHECKRUN) ./ij $(PARMS) 2> ij.err); \
|
(cd test; $(CHECKRUN) ./ij $(PARMS) 2> ij.err); \
|
||||||
(cd test; $(CHECKRUN) ./struct $(PARMS) 2> struct.err); \
|
(cd test; $(CHECKRUN) ./struct $(PARMS) 2> struct.err); \
|
||||||
@ -167,17 +172,18 @@ check:
|
|||||||
checkpar:
|
checkpar:
|
||||||
@ \
|
@ \
|
||||||
echo "Checking the library ..."; \
|
echo "Checking the library ..."; \
|
||||||
|
set -e; \
|
||||||
(cd test; $(MAKE) all); \
|
(cd test; $(MAKE) all); \
|
||||||
echo "Testing IJ ..."; \
|
echo "Testing IJ ..."; \
|
||||||
(cd test; ./runtest.sh -tol 1.e-06 -mpi "$(CHECKRUN)" TEST_ij/solvers.sh); \
|
(cd test; ./runtest.sh -atol $(HYPRE_CHECKPAR_TOL) -mpi "$(CHECKRUN)" TEST_ij/solvers.sh); \
|
||||||
(cd test; ./checktest.sh); \
|
(cd test; ./checktest.sh); \
|
||||||
(cd test; ./cleantest.sh); \
|
(cd test; ./cleantest.sh); \
|
||||||
echo "Testing Struct ..."; \
|
echo "Testing Struct ..."; \
|
||||||
(cd test; ./runtest.sh -tol 1.e-06 -mpi "$(CHECKRUN)" TEST_struct/solvers.sh); \
|
(cd test; ./runtest.sh -atol $(HYPRE_CHECKPAR_TOL) -mpi "$(CHECKRUN)" TEST_struct/solvers.sh); \
|
||||||
(cd test; ./checktest.sh); \
|
(cd test; ./checktest.sh); \
|
||||||
(cd test; ./cleantest.sh); \
|
(cd test; ./cleantest.sh); \
|
||||||
echo "Testing SStruct ..."; \
|
echo "Testing SStruct ..."; \
|
||||||
(cd test; ./runtest.sh -tol 1.e-06 -mpi "$(CHECKRUN)" TEST_sstruct/solvers.sh); \
|
(cd test; ./runtest.sh -atol $(HYPRE_CHECKPAR_TOL) -mpi "$(CHECKRUN)" TEST_sstruct/solvers.sh); \
|
||||||
(cd test; ./checktest.sh); \
|
(cd test; ./checktest.sh); \
|
||||||
(cd test; ./cleantest.sh);
|
(cd test; ./cleantest.sh);
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,8 @@ cat <<EOF
|
|||||||
script is being run from within the hypre 'test' directory, and all of the
|
script is being run from within the hypre 'test' directory, and all of the
|
||||||
'TEST_*' directories are checked.
|
'TEST_*' directories are checked.
|
||||||
|
|
||||||
|
Returns 0 if all tests pass, 1 if any test fails.
|
||||||
|
|
||||||
Example usage: $0 TEST_struct TEST_ij
|
Example usage: $0 TEST_struct TEST_ij
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
@ -36,6 +38,7 @@ else
|
|||||||
fi
|
fi
|
||||||
$RESET # Restore nullglob setting
|
$RESET # Restore nullglob setting
|
||||||
|
|
||||||
|
error_code=0
|
||||||
echo ""
|
echo ""
|
||||||
for testdir in $testdirs
|
for testdir in $testdirs
|
||||||
do
|
do
|
||||||
@ -47,7 +50,9 @@ do
|
|||||||
SZ=`ls -l $file | awk '{print $5}'`
|
SZ=`ls -l $file | awk '{print $5}'`
|
||||||
if [ $SZ != 0 ]
|
if [ $SZ != 0 ]
|
||||||
then
|
then
|
||||||
echo "FAILED : $file ($SZ)"
|
echo -e "FAILED : $file ($SZ)\n"
|
||||||
|
cat $file
|
||||||
|
error_code=1
|
||||||
else
|
else
|
||||||
echo " OK : $file"
|
echo " OK : $file"
|
||||||
fi
|
fi
|
||||||
@ -55,3 +60,4 @@ do
|
|||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
exit $error_code
|
||||||
|
|||||||
@ -1289,6 +1289,7 @@ HYPRE_Real time_get_cpu_seconds_( void );
|
|||||||
|
|
||||||
#define hypre_InitializeTiming(name) 0
|
#define hypre_InitializeTiming(name) 0
|
||||||
#define hypre_FinalizeTiming(index)
|
#define hypre_FinalizeTiming(index)
|
||||||
|
#define hypre_FinalizeAllTimings()
|
||||||
#define hypre_IncFLOPCount(inc)
|
#define hypre_IncFLOPCount(inc)
|
||||||
#define hypre_BeginTiming(i)
|
#define hypre_BeginTiming(i)
|
||||||
#define hypre_EndTiming(i)
|
#define hypre_EndTiming(i)
|
||||||
|
|||||||
@ -40,6 +40,7 @@ HYPRE_Real time_get_cpu_seconds_( void );
|
|||||||
|
|
||||||
#define hypre_InitializeTiming(name) 0
|
#define hypre_InitializeTiming(name) 0
|
||||||
#define hypre_FinalizeTiming(index)
|
#define hypre_FinalizeTiming(index)
|
||||||
|
#define hypre_FinalizeAllTimings()
|
||||||
#define hypre_IncFLOPCount(inc)
|
#define hypre_IncFLOPCount(inc)
|
||||||
#define hypre_BeginTiming(i)
|
#define hypre_BeginTiming(i)
|
||||||
#define hypre_EndTiming(i)
|
#define hypre_EndTiming(i)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user