33 use precisn,
only: longint
45 integer(longint) :: total_local_memory
46 integer(longint) :: available_local_memory
73 integer(longint),
intent(in) :: total_memory
75 this % total_local_memory = total_memory
76 this % available_local_memory = this % total_local_memory
88 integer(longint),
intent(in) :: total_memory
90 this % total_local_memory = total_memory
91 this % available_local_memory = this % total_local_memory
102 integer(longint),
intent(in) :: alloc_memory
103 integer,
intent(out) :: error
105 this % available_local_memory = this % available_local_memory - alloc_memory
107 if (this % available_local_memory < 0)
then
109 call this % verbose_log_message(
'Run out of memory')
123 integer(longint),
intent(in) :: alloc_memory
124 integer,
intent(out) :: error
126 this % available_local_memory = this % available_local_memory + alloc_memory
128 if (this % available_local_memory > this % total_local_memory)
then
130 call this % verbose_log_message(
'Memory mismatch')
156 integer(longint) :: local(1), global(1)
158 local = this % available_local_memory