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
This commit is contained in:
Martin Diehl 2019-03-06 15:52:52 +01:00
parent 05eb80d38c
commit 51f8b1961f
1 changed files with 2 additions and 4 deletions

View File

@ -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