]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
accept lack of isnan
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 2 Jul 2000 03:29:25 +0000 (03:29 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 2 Jul 2000 03:29:25 +0000 (03:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@3117 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure
deal.II/lac/source/solver_control.cc

index fb1b0b93eb78488f3147413d96bb78f6574b3115..f4a76f5a74c2eb9874418c4607611821287b26a2 100644 (file)
@@ -126,9 +126,9 @@ dnl Usage: DEAL_II_CHECK_ISNAN
 dnl
 AC_DEFUN(DEAL_II_CHECK_ISNAN, dnl
   DEAL_II_CHECK_ISNAN_FLAG(debug, $CXXFLAGSG,
-                          CXXFLAGSG="$CXXFLAGSG $deal_II_isnan_flag")
+                          CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG")
   DEAL_II_CHECK_ISNAN_FLAG(optimized, $CXXFLAGSO,
-                          CXXFLAGSO="$CXXFLAGSO $deal_II_isnan_flag")
+                          CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO")
 )
 
 
@@ -154,6 +154,8 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl
     ],
     [
        AC_MSG_RESULT("yes")
+       deal_II_isnan_flag="-DHAVE_ISNAN"
+       $3
     ],
     [
        dnl We need to define something. Unfortunately, this is system 
@@ -170,7 +172,7 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl
                isnan (d);
            ],
            [
-               deal_II_isnan_flag=$testflag
+               deal_II_isnan_flag="-DHAVE_ISNAN $testflag"
                break;
            ],
            [
@@ -181,12 +183,12 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl
        dnl the library will not be compilable on this platform
        dnl without knowledge of the right flag
        if test "$deal_II_isnan_flag" = "" ; then
-         AC_MSG_RESULT(no. no such flag found. aborting)
-         exit 1
-       fi
+         AC_MSG_RESULT(no.)
+       else
 
-       dnl we found something, lets us it
-       AC_MSG_RESULT(using $testflag)
-       $3
+         dnl we found something, lets us it
+         AC_MSG_RESULT(using $testflag)
+         $3
+       fi
     ])
 )      
index 4c13e769feae0ead9b9247556324ad9bd3eee18d..e193de7123e75a788a0075c85ef7b520c643ab3e 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# From configure.in Revision: 1.28 
+# From configure.in Revision: 1.29 
 
 
 
@@ -1689,6 +1689,8 @@ if { (eval echo configure:1689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5;
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
+       deal_II_isnan_flag="-DHAVE_ISNAN"
+       CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG"
     
 else
   echo "configure: failed program was:" >&5
@@ -1699,7 +1701,7 @@ else
        for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do 
          CXXFLAGS="$CXXFLAGSG $testflag"
           cat > conftest.$ac_ext <<EOF
-#line 1703 "configure"
+#line 1705 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -1711,10 +1713,10 @@ int main() {
            
 ; return 0; }
 EOF
-if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
-               deal_II_isnan_flag=$testflag
+               deal_II_isnan_flag="-DHAVE_ISNAN $testflag"
                break;
            
 else
@@ -1728,22 +1730,22 @@ rm -f conftest*
        done
 
                                if test "$deal_II_isnan_flag" = "" ; then
-         echo "$ac_t""no. no such flag found. aborting" 1>&6
-         exit 1
-       fi
+         echo "$ac_t""no." 1>&6
+       else
 
-               echo "$ac_t""using $testflag" 1>&6
-       CXXFLAGSG="$CXXFLAGSG $deal_II_isnan_flag"
+                 echo "$ac_t""using $testflag" 1>&6
+         CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG"
+       fi
     
 fi
 rm -f conftest*
 
     echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6
-echo "configure:1743: checking whether isnan is declared with optimized flags" >&5
+echo "configure:1745: checking whether isnan is declared with optimized flags" >&5
   
   CXXFLAGS=$CXXFLAGSO
   cat > conftest.$ac_ext <<EOF
-#line 1747 "configure"
+#line 1749 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -1755,10 +1757,12 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:1759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
+       deal_II_isnan_flag="-DHAVE_ISNAN"
+       CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO"
     
 else
   echo "configure: failed program was:" >&5
@@ -1769,7 +1773,7 @@ else
        for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do 
          CXXFLAGS="$CXXFLAGSO $testflag"
           cat > conftest.$ac_ext <<EOF
-#line 1773 "configure"
+#line 1777 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -1781,10 +1785,10 @@ int main() {
            
 ; return 0; }
 EOF
-if { (eval echo configure:1785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
-               deal_II_isnan_flag=$testflag
+               deal_II_isnan_flag="-DHAVE_ISNAN $testflag"
                break;
            
 else
@@ -1798,12 +1802,12 @@ rm -f conftest*
        done
 
                                if test "$deal_II_isnan_flag" = "" ; then
-         echo "$ac_t""no. no such flag found. aborting" 1>&6
-         exit 1
-       fi
+         echo "$ac_t""no." 1>&6
+       else
 
-               echo "$ac_t""using $testflag" 1>&6
-       CXXFLAGSO="$CXXFLAGSO $deal_II_isnan_flag"
+                 echo "$ac_t""using $testflag" 1>&6
+         CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO"
+       fi
     
 fi
 rm -f conftest*
@@ -1827,16 +1831,16 @@ esac
 
 CXXFLAGS="$CXXFLAGSG"
 echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6
-echo "configure:1831: checking for consistency of CXXFLAGSG flags" >&5
+echo "configure:1835: checking for consistency of CXXFLAGSG flags" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1833 "configure"
+#line 1837 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
@@ -1854,16 +1858,16 @@ rm -f conftest*
 
 CXXFLAGS="$CXXFLAGSO"
 echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6
-echo "configure:1858: checking for consistency of CXXFLAGSO flags" >&5
+echo "configure:1862: checking for consistency of CXXFLAGSO flags" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1860 "configure"
+#line 1864 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
index e13abc3c855aaee91097266fb0c8aafa76605b7a..60bc3787d54203ffb19956b835f6b889ef6c9173 100644 (file)
@@ -66,8 +66,11 @@ SolverControl::check (const unsigned int step,
 
   
   if ((step >= maxsteps) ||
-      (check_failure && ((check_value > failure_residual) ||
-                        isnan(check_value))))
+      (check_failure && ((check_value > failure_residual)
+#ifdef HAVE_ISNAN
+                        || isnan(check_value)
+#endif
+      )))
     {
       if (_log_result)
        deallog << "Failure step " << step

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.