From 51f8b1961f566475baec747aab5220c239d94caa Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 6 Mar 2019 15:52:52 +0100 Subject: [PATCH] simplify integer precision handling essentially, it should be ok to always use the default integer (which is 32 bit unless using MSC.Marc) and use 64 bit integer only for special cases where an overflow could happen --- src/prec.f90 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/prec.f90 b/src/prec.f90 index 8a625b97e..ab47f8e34 100644 --- a/src/prec.f90 +++ b/src/prec.f90 @@ -15,12 +15,10 @@ module prec ! https://software.intel.com/en-us/blogs/2017/03/27/doctor-fortran-in-it-takes-all-kinds integer, parameter, public :: pReal = IEEE_selected_real_kind(15,307) !< number with 15 significant digits, up to 1e+-300 (typically 64 bit) -#if (INT==4) - integer, parameter, public :: pInt = selected_int_kind(9) !< number with at least up to +-1e9 (typically 32 bit) -#elif (INT==8) +#if(INT==8) integer, parameter, public :: pInt = selected_int_kind(18) !< number with at least up to +-1e18 (typically 64 bit) #else - NO SUITABLE PRECISION FOR INTEGER SELECTED, STOPPING COMPILATION + integer, parameter, public :: pInt = selected_int_kind(9) !< number with at least up to +-1e9 (typically 32 bit) #endif integer, parameter, public :: pLongInt = selected_int_kind(18) !< number with at least up to +-1e18 (typically 64 bit) integer, parameter, public :: pStringLen = 256 !< default string length