From d8ba8af23bf9d2dee72a9b2216f1c4a8df6d95ab Mon Sep 17 00:00:00 2001 From: rhaas Date: Sat, 25 Jan 2014 06:08:24 +0000 Subject: make room for file names when printing tolerances git-svn-id: http://svn.cactuscode.org/flesh/trunk@5070 17b73243-c579-4c4c-a9d2-2d5706c11dac --- doc/UsersGuide/ApplicationThorns.tex | 2 +- lib/make/cctk_Config.h.in | 1 + lib/sbin/RunTestUtils.pl | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/UsersGuide/ApplicationThorns.tex b/doc/UsersGuide/ApplicationThorns.tex index cc943339..61a9970d 100644 --- a/doc/UsersGuide/ApplicationThorns.tex +++ b/doc/UsersGuide/ApplicationThorns.tex @@ -3521,7 +3521,7 @@ matching as long as there are no whitespaces in the regular expression. For example: \begin{alltt} -ABSTOL 1e-8 ^Psi4.[xy] +ABSTOL 1e-8 ^Psi4\backslash.[xy] RELTOL 1e-12 gxx \end{alltt} diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in index 13cd301f..648104d2 100644 --- a/lib/make/cctk_Config.h.in +++ b/lib/make/cctk_Config.h.in @@ -177,6 +177,7 @@ * version >= 20121010 to be on the safe side. */ #if (defined __INTEL_COMPILER && \ __INTEL_COMPILER_BUILD_DATE >= 20121010 && \ + __INTEL_COMPILER_BUILD_DATE < 20131008 && \ !defined CCTK_INTEL_COMPILER_DONT_DISABLE_RESTRICT) # define CCTK_DISABLE_RESTRICT 1 #endif diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl index d97dd8b9..26930ff3 100644 --- a/lib/sbin/RunTestUtils.pl +++ b/lib/sbin/RunTestUtils.pl @@ -854,7 +854,7 @@ sub PrintDataBase sub PrintToleranceTable { my($test,$thorn,$testdata,$runconfig) = @_; - my($fileabstol,$filereltol); + my($fileabstol,$filereltol,$maxfilenamelen); # Get default tolerances for the test if (defined($runconfig{"$thorn $test ABSTOL"}->{".*"})) @@ -882,15 +882,22 @@ sub PrintToleranceTable { $testreltol=$runconfig{"RELTOL"}; } - + + # longest file name for table alignment + $maxfilenamelen = length("(.*)"); + foreach $file (split(" ",$testdata->{"$thorn $test DATAFILES"})) + { + $maxfilenamelen = length($file) if ($maxfilenamelen < length($file)); + } + # Print test's default tolerances and any deviations print "------------------------------------------------------------------------\n\n"; print " Test $thorn: $test \n"; print " \"$testdata->{\"$thorn $test DESC\"}\"\n"; - print " File\t\tAbs Tol\t\tRel Tol\n"; + print " File"," "x($maxfilenamelen-4),"\tAbs Tol\t\tRel Tol\n"; print " --------------------------------------------------------------------\n"; - print " (.*)\t\t$testabstol\t\t$testreltol\n"; + print " (.*)"," "x($maxfilenamelen-4),"\t$testabstol\t\t$testreltol\n"; foreach $file (split(" ",$testdata->{"$thorn $test DATAFILES"})) { ($fileabstol, $filereltol)=&GetFileTolerances($test,$thorn,\%runconfig,$file); @@ -898,7 +905,7 @@ sub PrintToleranceTable if ( $filereltol == $testreltol ) { $filereltol="--"; } if ( $fileabstol ne "--" || $filereltol ne "--" ) { - print " $file\t\t$fileabstol\t\t$filereltol\n"; + print " $file"," "x($maxfilenamelen-length($file)),"\t$fileabstol\t\t$filereltol\n"; } } print "\n"; -- cgit v1.2.3