From 49a964aeda2511e2d23326f77a2579e68043a8d1 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 14 Feb 2012 13:56:35 +0000 Subject: [PATCH] removed public statement in derived data type causing trouble on older compilers --- code/prec.f90 | 4 ++-- code/prec_single.f90 | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/prec.f90 b/code/prec.f90 index e174a2d00..515ac0ec7 100644 --- a/code/prec.f90 +++ b/code/prec.f90 @@ -44,7 +44,7 @@ real(pReal), parameter, public :: tol_gravityNodePos = 1.0e-100_pReal real(pReal), parameter, public :: DAMASK_NaN = real(Z'7FF0000000000001', pReal) #endif type :: p_vec - real(pReal), dimension(:), pointer, public :: p + real(pReal), dimension(:), pointer :: p end type p_vec CONTAINS @@ -61,7 +61,7 @@ implicit none 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,e3.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,*) diff --git a/code/prec_single.f90 b/code/prec_single.f90 index 8150f8bc3..9deb3a4e2 100644 --- a/code/prec_single.f90 +++ b/code/prec_single.f90 @@ -25,11 +25,11 @@ implicit none ! *** Precision of real and integer variables *** -integer, parameter, public :: :: pReal = selected_real_kind(6,37) ! 6 significant digits, up to 1e+-37 -integer, parameter, public :: :: pInt = selected_int_kind(9) ! up to +- 1e9 -integer, parameter, public :: :: pLongInt = 4 ! should be 64bit -real(pReal), parameter, public :: :: tol_math_check = 1.0e-5_pReal -real(pReal), parameter, public :: :: tol_gravityNodePos = 1.0e-36_pReal +integer, parameter, public :: pReal = selected_real_kind(6,37) ! 6 significant digits, up to 1e+-37 +integer, parameter, public :: pInt = selected_int_kind(9) ! up to +- 1e9 +integer, parameter, public :: pLongInt = 4 ! should be 64bit +real(pReal), parameter, public :: tol_math_check = 1.0e-5_pReal +real(pReal), parameter, public :: tol_gravityNodePos = 1.0e-36_pReal ! NaN is precision dependent ! from http://www.hpc.unimelb.edu.au/doc/f90lrm/dfum_035.html @@ -44,7 +44,7 @@ real(pReal), parameter, public :: :: tol_gravityNodePos = 1.0e-36_pReal real(pReal), parameter, public :: DAMASK_NaN = real(Z'7F800001', pReal) #endif type :: p_vec - real(pReal), dimension(:), pointer, public :: p + real(pReal), dimension(:), pointer :: p end type p_vec CONTAINS @@ -61,7 +61,7 @@ implicit none 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,e3.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,*)