29 #include "./base/base_uses.f90"
37 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'global_types'
39 INTEGER,
PARAMETER :: SILENT = 0, &
47 PUBLIC :: global_environment_type
66 TYPE global_environment_type
67 INTEGER :: ref_count = 0
68 TYPE(rng_stream_type),
ALLOCATABLE :: gaussian_rng_stream
69 CHARACTER(LEN=default_string_length) :: diag_library =
"ScaLAPACK"
70 CHARACTER(LEN=default_string_length) :: default_fft_library =
"FFTSG"
71 CHARACTER(LEN=default_path_length) :: fftw_wisdom_file_name =
"/etc/fftw/wisdom"
72 CHARACTER(LEN=default_string_length) :: default_dgemm_library =
"BLAS"
74 INTEGER :: fft_pool_scratch_limit = 0
75 INTEGER :: fftw_plan_type = 0
77 INTEGER :: prog_name_id = 0
78 INTEGER :: run_type_id = 0
81 INTEGER :: elpa_neigvec_min = 0
82 LOGICAL :: elpa_qr = .false.
83 LOGICAL :: elpa_print = .false.
84 LOGICAL :: elpa_qr_unsafe = .false.
85 INTEGER :: dlaf_neigvec_min = 0
86 LOGICAL :: blacs_repeatable = .false.
87 REAL(KIND=
dp) :: cp2k_start_time = 0.0_dp
88 REAL(KIND=
dp) :: cp2k_target_time = huge(0.0_dp)
91 REAL(KIND=
dp) :: eps_check_diag = -1.0_dp
93 END TYPE global_environment_type
103 TYPE(global_environment_type),
POINTER :: globenv
105 cpassert(.NOT.
ASSOCIATED(globenv))
107 ALLOCATE (globenv%gaussian_rng_stream)
108 globenv%ref_count = 1
119 TYPE(global_environment_type),
POINTER :: globenv
121 cpassert(
ASSOCIATED(globenv))
122 cpassert(globenv%ref_count > 0)
123 globenv%ref_count = globenv%ref_count + 1
133 TYPE(global_environment_type),
POINTER :: globenv
135 IF (
ASSOCIATED(globenv))
THEN
136 cpassert(globenv%ref_count > 0)
137 globenv%ref_count = globenv%ref_count - 1
138 IF (globenv%ref_count == 0)
THEN
139 IF (
ALLOCATED(globenv%gaussian_rng_stream)) &
140 DEALLOCATE (globenv%gaussian_rng_stream)
methods related to the blacs parallel environment
integer, parameter, public blacs_grid_square
Define type storing the global information of a run. Keep the amount of stored data small....
subroutine, public globenv_retain(globenv)
Retains the global environment globenv.
subroutine, public globenv_create(globenv)
Creates the global environment globenv.
subroutine, public globenv_release(globenv)
Releases the global environment globenv.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Machine interface based on Fortran 2003 and POSIX.
real(kind=dp) function, public m_walltime()
returns time from a real-time clock, protected against rolling early/easily
Parallel (pseudo)random number generator (RNG) for multiple streams and substreams of random numbers.