MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
compilerversion.F90
Go to the documentation of this file.
2 ! -- modules
3 use iso_fortran_env, only: compiler_options, compiler_version
4 use constantsmodule, only: lenbigline, &
6 use kindmodule, only: i4b
7 implicit none
8 private
9 ! -- compiler version
10 character(len=10) :: c_compiler !< compiler string
11 character(len=10) :: c_version !< compiler version string
12 character(len=20) :: c_date !< compilation date
13 integer(I4B) :: icompiler = cunknown !< compiler enum
15contains
16
17 !> @brief Get compiler information
18 !!
19 !! Subroutine returns a string with compilation date and compiler.
20 !!
21 !<
22 subroutine get_compiler(txt)
23 ! -- dummy variables
24 character(len=LENBIGLINE), intent(inout) :: txt !< compiler information
25 !
26 ! -- set variables
27#ifdef __GFORTRAN__
29 c_date = __date__//' '//__time__
30#endif
31#ifdef __INTEL_COMPILER
33 c_date = __date__//' '//__time__
34#endif
35#ifdef _CRAYFTN
37 c_date = __date__//' '//__time__
38#endif
39 !
40 ! -- set compiler strings
41 if (icompiler == cunknown) then
42 c_compiler = 'UNKNOWN'
43 c_version = '??.??'
44 c_date = '??? ?? ???? ??:??:??'
45 end if
46 !
47 ! -- write string with compiler information
48 write (txt, '(a,3(1x,a))') &
49 'MODFLOW 6 compiled', trim(adjustl(c_date)), &
50 'with', trim(adjustl(compiler_version()))
51 end subroutine get_compiler
52
53 !> @brief Get compilation date
54 !!
55 !! Subroutine returns a string with compilation date
56 !!
57 !<
58 subroutine get_compile_date(txt)
59 ! -- dummy variables
60 character(len=20), intent(inout) :: txt !< compilation date
61 ! -- set variables
62#ifdef __GFORTRAN__
63 c_date = __date__//' '//__time__
64#endif
65#ifdef __INTEL_COMPILER
66 c_date = __date__//' '//__time__
67#endif
68#ifdef _CRAYFTN
69 c_date = __date__//' '//__time__
70#endif
71 !
72 ! -- write compilation date string
73 write (txt, '(a)') trim(adjustl(c_date))
74 end subroutine get_compile_date
75
76 !> @brief Get compilation options
77 !!
78 !! Subroutine returns a string with compilation options
79 !!
80 !<
81 subroutine get_compile_options(txt)
82 ! -- dummy variables
83 character(len=LENBIGLINE), intent(inout) :: txt !< compilation options
84 ! -- set variables
85 !
86 ! -- set txt string
87 write (txt, '(a)') &
88 'MODFLOW 6 compiler options:'//' '//trim(adjustl(compiler_options()))
89 end subroutine get_compile_options
90
91end module compilerversion
character(len=20) c_date
compilation date
character(len=10) c_compiler
compiler string
subroutine, public get_compiler(txt)
Get compiler information.
integer(i4b) icompiler
compiler enum
subroutine, public get_compile_options(txt)
Get compilation options.
character(len=10) c_version
compiler version string
subroutine, public get_compile_date(txt)
Get compilation date.
This module contains simulation constants.
Definition Constants.f90:9
integer(i4b), parameter lenbigline
maximum length of a big line
Definition Constants.f90:15
@ cunknown
unknown compiler
@ cgfortran
gfortran compiler
@ ccrayftn
cray fortran compiler
@ cintel
intel ifort compiler
This module defines variable data types.
Definition kind.f90:8