corrected NaN in prec_single.f90 (was already silent but with typo), polished output and added switch in order to check range on all files except of prec.f90 (in which NaN is defined)
This commit is contained in:
parent
542768d712
commit
0d745adfa0
|
@ -186,13 +186,10 @@ endif
|
|||
###################################################################################################
|
||||
|
||||
|
||||
COMPILE_OPTIONS_gfortran :=-xf95-cpp-input\
|
||||
-fno-range-check
|
||||
COMPILE_OPTIONS_gfortran :=-xf95-cpp-input
|
||||
ifneq "$(FASTBUILD)" "YES"
|
||||
COMPILE_OPTIONS_gfortran :=$(COMPILE_OPTIONS_gfortran)\
|
||||
-xf95-cpp-input\
|
||||
-ffree-line-length-132\
|
||||
-fno-range-check\
|
||||
-fimplicit-none\
|
||||
-pedantic\
|
||||
-Warray-bounds\
|
||||
|
@ -348,8 +345,13 @@ IO.o: IO.f90 \
|
|||
|
||||
DAMASK_spectral_interface.o: DAMASK_spectral_interface.f90 \
|
||||
prec.o
|
||||
|
||||
ifeq "$(COMPILERNAME)" "gfortran" # fno-range-check because NaN is defined in prec
|
||||
prec.o: prec.f90
|
||||
$(PREFIX) $(COMPILERNAME) $(COMPILE) -c -fno-range-check prec.f90 $(SUFFIX)
|
||||
else
|
||||
prec.o: prec.f90
|
||||
$(PREFIX) $(COMPILERNAME) $(COMPILE) -c prec.f90 $(SUFFIX)
|
||||
endif
|
||||
|
||||
%.o : %.f90
|
||||
$(PREFIX) $(COMPILERNAME) $(COMPILE) -c $< $(SUFFIX)
|
||||
|
|
|
@ -71,7 +71,7 @@ subroutine prec_init
|
|||
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
||||
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
|
||||
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
|
||||
write(6,'(a,e10.3)') ' NaN: ',DAMASK_NaN
|
||||
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
||||
write(6,'(a,l3)') ' NaN /= NaN: ',DAMASK_NaN/=DAMASK_NaN
|
||||
if (DAMASK_NaN == DAMASK_NaN) call quit(9000)
|
||||
write(6,*)
|
||||
|
|
|
@ -41,7 +41,7 @@ module prec
|
|||
! from http://www.hpc.unimelb.edu.au/doc/f90lrm/dfum_035.html
|
||||
! copy can be found in documentation/Code/Fortran
|
||||
#ifdef LEGACY_COMPILER
|
||||
real(pReal), parameter, public :: DAMASK_NaN = Z'Z'7F800001', pReal'
|
||||
real(pReal), parameter, public :: DAMASK_NaN = Z'7F800001'
|
||||
#else
|
||||
real(pReal), parameter, public :: DAMASK_NaN = real(Z'7F800001', pReal)
|
||||
#endif
|
||||
|
@ -71,7 +71,7 @@ subroutine prec_init
|
|||
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
||||
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
|
||||
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
|
||||
write(6,'(a,e10.3)') ' NaN: ',DAMASK_NAN
|
||||
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
||||
write(6,'(a,l3)') ' NaN /= NaN: ',DAMASK_NaN/=DAMASK_NaN
|
||||
if (DAMASK_NaN == DAMASK_NaN) call quit(9000)
|
||||
write(6,*)
|
||||
|
|
Loading…
Reference in New Issue