From dfe09f11f5229b4fe5df4b177d3d829963206655 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 22 Dec 2015 10:03:15 +0000 Subject: [PATCH] cleaner handling of NaN --- code/prec.f90 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/prec.f90 b/code/prec.f90 index ae4f9e421..da54ae002 100644 --- a/code/prec.f90 +++ b/code/prec.f90 @@ -12,12 +12,9 @@ !! for details on NaN see https://software.intel.com/en-us/forums/topic/294680 !-------------------------------------------------------------------------------------------------- module prec -#if defined(Abaqus) -use ifport ! needed as a hack for Abaqus because version 6.12-2 is linked partly against Intel Fortran Compiler 10.1. allows to use non IEEE is NaN -#endif -#ifdef __INTEL_COMPILER - use, intrinsic :: & ! unfortunately not avialable in commonly used gfortran versions +#if !(defined(__GFORTRAN__) && __GNUC__ < 5) + use, intrinsic :: & ! unfortunately not avialable in gfortran <= 5 IEEE_arithmetic #endif @@ -185,7 +182,7 @@ logical elemental function prec_isNaN(a) implicit none real(pReal), intent(in) :: a -#if defined(__GFORTRAN__) || defined(Abaqus) +#if (defined(__GFORTRAN__) && __GNUC__ < 5) intrinsic :: isNaN prec_isNaN = isNaN(a) #else