Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
fmempool.F90
Go to the documentation of this file.
1 
2 #include "fassert.inc"
3 
5 module fmempool
6  use iso_c_binding
7 #ifdef _OPENMP
8  use omp_lib
9 #endif
10  use assert
11  implicit none
12 
13  interface mp_acquire
14  module procedure mp_acquire_int_1d
15  module procedure mp_acquire_int_2d
16  module procedure mp_acquire_int_3d
17  module procedure mp_acquire_int_6d
18  module procedure mp_acquire_real_1d
19  module procedure mp_acquire_real_2d
20  module procedure mp_acquire_real_3d
21  module procedure mp_acquire_real_6d
22  module procedure mp_acquire_double_1d
23  module procedure mp_acquire_double_2d
24  module procedure mp_acquire_double_3d
25  module procedure mp_acquire_double_6d
26  end interface mp_acquire
27 
28  interface mp_release
29  module procedure mp_release_int_1d
30  module procedure mp_release_int_2d
31  module procedure mp_release_int_3d
32  module procedure mp_release_int_6d
33  module procedure mp_release_real_1d
34  module procedure mp_release_real_2d
35  module procedure mp_release_real_3d
36  module procedure mp_release_real_6d
37  module procedure mp_release_double_1d
38  module procedure mp_release_double_2d
39  module procedure mp_release_double_3d
40  module procedure mp_release_double_6d
41  end interface mp_release
42 
43  integer, parameter :: int_size = 4
44  integer, parameter :: real_size = 4
45  integer, parameter :: double_size = 2*real_size
46  integer, parameter :: n_max_slices = 128
47 
48  type :: memslice
49  logical :: acquired
50  integer(kind=1), pointer :: mem(:)
51  end type memslice
52 
53  type :: mempool
54  type(memslice), pointer :: slice(:)
55  end type mempool
56 
57  type(mempool), pointer, save :: pool(:) => null()
58  logical, save :: verbose = .false.
59  logical, save :: disabled = .false.
60 
61  public :: mp_init, mp_finalize, mp_statistics, &
64 
65  private
66 
67 contains
68 
69  ! check if an environment variable is set to true or false
70  function query_environment(env_var, default_val)
71  implicit none
72  logical :: query_environment
73  character(len=*), intent(in) :: env_var
74  logical, intent(in) :: default_val
75  character(len=255) :: env_str
76  query_environment = default_val
77  call get_environment_variable(env_var, env_str)
78  if (len_trim(env_str) > 0) then
79  select case (trim(env_str))
80  case ("1", "ON", "TRUE", "on", "true")
81  query_environment = .true.
82  case ("0", "OFF", "FALSE", "off", "false")
83  query_environment = .false.
84  end select
85  end if
86  end function query_environment
87 
88  ! get the number of elements from multidimensional array specifiers
89  function get_n_elem(mn, mx) result(n_elem)
90  integer, intent(in) :: mn(:)
91  integer, intent(in) :: mx(:)
92  integer :: i, nd
93  integer(kind=8) :: n_elem
94  nd = size(mn)
95  i = 1
96  n_elem = mx(i) - mn(i) + 1
97  do i = 2, nd
98  n_elem = n_elem*(mx(i) - mn(i) + 1)
99  end do
100  end function get_n_elem
101 
102  ! get the maximum available number of threads
104  integer :: get_omp_world_size
105 #ifdef _OPENMP
106  get_omp_world_size = omp_get_max_threads();
107 #else
108  get_omp_world_size = 1;
109 #endif
110  end function get_omp_world_size
111 
112  ! get the rank of the current thread
114  integer :: get_omp_thread_idx
115 #ifdef _OPENMP
116  get_omp_thread_idx = omp_get_thread_num();
117 #else
118  get_omp_thread_idx = 0;
119 #endif
120  end function get_omp_thread_idx
121 
122  subroutine mp_acquire_bytes(f_pointer, n_bytes)
123  integer(kind=1), pointer :: f_pointer(:)
124  integer(kind=8), intent(in) :: n_bytes
125  integer :: it, j
126  it = get_omp_thread_idx()
127  do j = 1, n_max_slices
128  if (.not. pool(it)%slice(j)%acquired) then
129  exit
130  end if
131  end do
132  assert(j <= n_max_slices) ! not enough slices available
133  if (associated(pool(it)%slice(j)%mem)) then
134  if (size(pool(it)%slice(j)%mem) < n_bytes) then
135  deallocate (pool(it)%slice(j)%mem)
136  allocate (pool(it)%slice(j)%mem(n_bytes))
137  end if
138  else
139  allocate (pool(it)%slice(j)%mem(n_bytes))
140  end if
141  pool(it)%slice(j)%acquired = .true.
142  f_pointer => pool(it)%slice(j)%mem
143  end subroutine mp_acquire_bytes
144 
145  subroutine mp_release_bytes(c_pointer)
146  type(c_ptr) :: c_pointer
147  integer :: it, j
148  it = get_omp_thread_idx()
149  do j = 1, n_max_slices
150  if (c_associated(c_loc(pool(it)%slice(j)%mem), c_pointer)) then
151  exit
152  end if
153  end do
154  assert(j <= n_max_slices) ! could not find pointer to be released
155  pool(it)%slice(j)%acquired = .false.
156  if (disabled) then
157  deallocate (pool(it)%slice(j)%mem)
158  nullify (pool(it)%slice(j)%mem)
159  end if
160  end subroutine mp_release_bytes
161 
162 ! --- public API functions below ---
163 
164  ! initialize the memory pool
165  subroutine mp_init(min_threads, verbosity, disable)
166  integer, intent(in), optional :: min_threads
167  logical, intent(in), optional :: verbosity
168  logical, intent(in), optional :: disable
169  integer :: i, j, nt
170  character(len=32) :: disabled_str
171  if (present(min_threads)) then
172  if (min_threads < get_omp_world_size()) then
173  nt = get_omp_world_size()
174  else
175  nt = min_threads
176  end if
177  else
178  nt = get_omp_world_size()
179  end if
180  allocate (pool(0:nt - 1))
181  do i = 0, nt - 1
182  allocate (pool(i)%slice(n_max_slices))
183  do j = 1, n_max_slices
184  pool(i)%slice(j)%acquired = .false.
185  nullify (pool(i)%slice(j)%mem)
186  end do
187  end do
188  if (present(verbosity)) then
189  verbose = verbosity
190  else
191  verbose = query_environment("MP_VERBOSE", .false.)
192  end if
193  if (present(disable)) then
194  disabled = disable
195  else
196  disabled = query_environment("MP_DISABLE", .false.)
197  end if
198  if (disabled) then
199  disabled_str = ", disabled"
200  else
201  disabled_str = ""
202  end if
203  if (verbose) then
204 #ifdef _OPENMP
205  write (*, *) "mempool: initialized (OpenMP)"//trim(adjustl(disabled_str))
206 #else
207  write (*, *) "mempool: initialized (not threaded)"//trim(adjustl(disabled_str))
208 #endif
209  end if
210  end subroutine mp_init
211 
212  ! deallocate any memory used by the memory pool
213  subroutine mp_finalize()
214  integer :: i, j, nt
215  nt = get_omp_world_size()
216  do i = 0, nt - 1
217  do j = 1, n_max_slices
218  if (associated(pool(i)%slice(j)%mem)) then
219  deallocate (pool(i)%slice(j)%mem)
220  nullify (pool(i)%slice(j)%mem)
221  end if
222  pool(i)%slice(j)%acquired = .false.
223  end do
224  deallocate (pool(i)%slice)
225  nullify (pool(i)%slice)
226  end do
227  deallocate (pool)
228  nullify (pool)
229  if (verbose) then
230  write (*, *) "mempool: finalized"
231  end if
232  end subroutine mp_finalize
233 
234  ! deallocate any unused memory from the memory pool
235  subroutine mp_compactify()
236  integer :: i, j, it, nt
237  it = get_omp_thread_idx()
238  nt = get_omp_world_size()
239  if (it == 0) then
240  do i = 0, nt - 1
241  do j = 1, n_max_slices
242  if ((.not. pool(i)%slice(j)%acquired) .and. (associated(pool(i)%slice(j)%mem))) then
243  deallocate (pool(i)%slice(j)%mem)
244  nullify (pool(i)%slice(j)%mem)
245  end if
246  end do
247  end do
248  end if
249  end subroutine mp_compactify
250 
251  ! print statistics
252  subroutine mp_statistics()
253  integer :: i, j, it, nt, n_slices, n_acquired, n_allocated
254  integer(kind=8) :: n_bytes
255  character(len=32) :: thread_str, acquired_str, slices_str, bytes_str, alloc_str
256  it = get_omp_thread_idx()
257  nt = get_omp_world_size()
258  if ((verbose) .and. (it == 0)) then
259  write (*, *) "mempool statistics"
260  do i = 0, nt - 1
261  n_bytes = 0
262  n_acquired = 0
263  n_allocated = 0
264  do j = 1, n_max_slices
265  if (pool(i)%slice(j)%acquired) then
266  n_acquired = n_acquired + 1
267  end if
268  if (associated(pool(i)%slice(j)%mem)) then
269  n_allocated = n_allocated + 1
270  n_bytes = n_bytes + size(pool(i)%slice(j)%mem)
271  end if
272  end do
273  ! --- do some nice printing ---
274  write (thread_str, *) i
275  write (slices_str, *) n_max_slices
276  write (acquired_str, *) n_acquired
277  write (bytes_str, *) n_bytes
278  write (alloc_str, *) n_allocated
279  write (*, '(A)') " "// &
280  "pool["//trim(adjustl(thread_str))//"]: "// &
281  "n_slices="//trim(adjustl(slices_str))//", "// &
282  "n_acquired="//trim(adjustl(acquired_str))//", "// &
283  "n_allocated="//trim(adjustl(alloc_str))//", "// &
284  "n_bytes="//trim(adjustl(bytes_str))
285  end do
286  end if
287  end subroutine mp_statistics
288 
289  ! return if the memory pool is disabled
290  function mp_disabled()
291  logical :: mp_disabled
293  end function mp_disabled
294 
295  ! --- mp_acquire and mp_release interface implementations below ---
296 
297  ! double precision routines
298 
299  subroutine mp_acquire_double_1d(f_pointer, mn, mx)
300  double precision, pointer :: f_pointer(:)
301  integer, intent(in) :: mn(1)
302  integer, intent(in) :: mx(1)
303  integer(kind=8) :: n_bytes, n_elem
304  integer(kind=1), pointer :: ptr(:)
305  double precision, pointer :: flat_ptr(:)
306 
307  n_elem = get_n_elem(mn, mx)
308  n_bytes = n_elem*double_size
309  call mp_acquire_bytes(ptr, n_bytes)
310 
311  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
312  f_pointer(mn(1):mx(1)) => flat_ptr
313  nullify (flat_ptr)
314  end subroutine mp_acquire_double_1d
315 
316  subroutine mp_release_double_1d(f_pointer)
317  double precision, pointer :: f_pointer(:)
318 
319  call mp_release_bytes(c_loc(f_pointer))
320  nullify (f_pointer)
321  end subroutine mp_release_double_1d
322 
323  subroutine mp_acquire_double_2d(f_pointer, mn, mx)
324  double precision, pointer :: f_pointer(:, :)
325  integer, intent(in) :: mn(2)
326  integer, intent(in) :: mx(2)
327  integer(kind=8) :: n_bytes, n_elem
328  integer(kind=1), pointer :: ptr(:)
329  double precision, pointer :: flat_ptr(:)
330 
331  n_elem = get_n_elem(mn, mx)
332  n_bytes = n_elem*double_size
333  call mp_acquire_bytes(ptr, n_bytes)
334 
335  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
336  f_pointer(mn(1):mx(1), &
337  mn(2):mx(2)) => flat_ptr
338  nullify (flat_ptr)
339  end subroutine mp_acquire_double_2d
340 
341  subroutine mp_release_double_2d(f_pointer)
342  double precision, pointer :: f_pointer(:, :)
343 
344  call mp_release_bytes(c_loc(f_pointer))
345  nullify (f_pointer)
346  end subroutine mp_release_double_2d
347 
348  subroutine mp_acquire_double_3d(f_pointer, mn, mx)
349  double precision, pointer :: f_pointer(:, :, :)
350  integer, intent(in) :: mn(3)
351  integer, intent(in) :: mx(3)
352  integer(kind=8) :: n_bytes, n_elem
353  integer(kind=1), pointer :: ptr(:)
354  double precision, pointer :: flat_ptr(:)
355 
356  n_elem = get_n_elem(mn, mx)
357  n_bytes = n_elem*double_size
358  call mp_acquire_bytes(ptr, n_bytes)
359 
360  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
361  f_pointer(mn(1):mx(1), &
362  mn(2):mx(2), &
363  mn(3):mx(3)) => flat_ptr
364  nullify (flat_ptr)
365  end subroutine mp_acquire_double_3d
366 
367  subroutine mp_release_double_3d(f_pointer)
368  double precision, pointer :: f_pointer(:, :, :)
369 
370  call mp_release_bytes(c_loc(f_pointer))
371  nullify (f_pointer)
372  end subroutine mp_release_double_3d
373 
374  subroutine mp_acquire_double_6d(f_pointer, mn, mx)
375  double precision, pointer :: f_pointer(:, :, :, :, :, :)
376  integer, intent(in) :: mn(6)
377  integer, intent(in) :: mx(6)
378  integer(kind=8) :: n_bytes, n_elem
379  integer(kind=1), pointer :: ptr(:)
380  double precision, pointer :: flat_ptr(:)
381 
382  n_elem = get_n_elem(mn, mx)
383  n_bytes = n_elem*double_size
384  call mp_acquire_bytes(ptr, n_bytes)
385 
386  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
387  f_pointer(mn(1):mx(1), &
388  mn(2):mx(2), &
389  mn(3):mx(3), &
390  mn(4):mx(4), &
391  mn(5):mx(5), &
392  mn(6):mx(6)) => flat_ptr
393  nullify (flat_ptr)
394  end subroutine mp_acquire_double_6d
395 
396  subroutine mp_release_double_6d(f_pointer)
397  double precision, pointer :: f_pointer(:, :, :, :, :, :)
398 
399  call mp_release_bytes(c_loc(f_pointer))
400  nullify (f_pointer)
401  end subroutine mp_release_double_6d
402 
403  ! single precision routines
404 
405  subroutine mp_acquire_real_1d(f_pointer, mn, mx)
406  real, pointer :: f_pointer(:)
407  integer, intent(in) :: mn(1)
408  integer, intent(in) :: mx(1)
409  integer(kind=8) :: n_bytes, n_elem
410  integer(kind=1), pointer :: ptr(:)
411  real, pointer :: flat_ptr(:)
412 
413  n_elem = get_n_elem(mn, mx)
414  n_bytes = n_elem*real_size
415  call mp_acquire_bytes(ptr, n_bytes)
416 
417  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
418  f_pointer(mn(1):mx(1)) => flat_ptr
419  nullify (flat_ptr)
420  end subroutine mp_acquire_real_1d
421 
422  subroutine mp_release_real_1d(f_pointer)
423  real, pointer :: f_pointer(:)
424 
425  call mp_release_bytes(c_loc(f_pointer))
426  nullify (f_pointer)
427  end subroutine mp_release_real_1d
428 
429  subroutine mp_acquire_real_2d(f_pointer, mn, mx)
430  real, pointer :: f_pointer(:, :)
431  integer, intent(in) :: mn(2)
432  integer, intent(in) :: mx(2)
433  integer(kind=8) :: n_bytes, n_elem
434  integer(kind=1), pointer :: ptr(:)
435  real, pointer :: flat_ptr(:)
436 
437  n_elem = get_n_elem(mn, mx)
438  n_bytes = n_elem*real_size
439  call mp_acquire_bytes(ptr, n_bytes)
440 
441  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
442  f_pointer(mn(1):mx(1), &
443  mn(2):mx(2)) => flat_ptr
444  nullify (flat_ptr)
445  end subroutine mp_acquire_real_2d
446 
447  subroutine mp_release_real_2d(f_pointer)
448  real, pointer :: f_pointer(:, :)
449 
450  call mp_release_bytes(c_loc(f_pointer))
451  nullify (f_pointer)
452  end subroutine mp_release_real_2d
453 
454  subroutine mp_acquire_real_3d(f_pointer, mn, mx)
455  real, pointer :: f_pointer(:, :, :)
456  integer, intent(in) :: mn(3)
457  integer, intent(in) :: mx(3)
458  integer(kind=8) :: n_bytes, n_elem
459  integer(kind=1), pointer :: ptr(:)
460  real, pointer :: flat_ptr(:)
461 
462  n_elem = get_n_elem(mn, mx)
463  n_bytes = n_elem*real_size
464  call mp_acquire_bytes(ptr, n_bytes)
465 
466  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
467  f_pointer(mn(1):mx(1), &
468  mn(2):mx(2), &
469  mn(3):mx(3)) => flat_ptr
470  nullify (flat_ptr)
471  end subroutine mp_acquire_real_3d
472 
473  subroutine mp_release_real_3d(f_pointer)
474  real, pointer :: f_pointer(:, :, :)
475 
476  call mp_release_bytes(c_loc(f_pointer))
477  nullify (f_pointer)
478  end subroutine mp_release_real_3d
479 
480  subroutine mp_acquire_real_6d(f_pointer, mn, mx)
481  real, pointer :: f_pointer(:, :, :, :, :, :)
482  integer, intent(in) :: mn(6)
483  integer, intent(in) :: mx(6)
484  integer(kind=8) :: n_bytes, n_elem
485  integer(kind=1), pointer :: ptr(:)
486  real, pointer :: flat_ptr(:)
487 
488  n_elem = get_n_elem(mn, mx)
489  n_bytes = n_elem*real_size
490  call mp_acquire_bytes(ptr, n_bytes)
491 
492  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
493  f_pointer(mn(1):mx(1), &
494  mn(2):mx(2), &
495  mn(3):mx(3), &
496  mn(4):mx(4), &
497  mn(5):mx(5), &
498  mn(6):mx(6)) => flat_ptr
499  nullify (flat_ptr)
500  end subroutine mp_acquire_real_6d
501 
502  subroutine mp_release_real_6d(f_pointer)
503  real, pointer :: f_pointer(:, :, :, :, :, :)
504 
505  call mp_release_bytes(c_loc(f_pointer))
506  nullify (f_pointer)
507  end subroutine mp_release_real_6d
508 
509  ! 4-byte integer routines
510 
511  subroutine mp_acquire_int_1d(f_pointer, mn, mx)
512  integer, pointer :: f_pointer(:)
513  integer, intent(in) :: mn(1)
514  integer, intent(in) :: mx(1)
515  integer(kind=8) :: n_bytes, n_elem
516  integer(kind=1), pointer :: ptr(:)
517  integer, pointer :: flat_ptr(:)
518 
519  n_elem = get_n_elem(mn, mx)
520  n_bytes = n_elem*int_size
521  call mp_acquire_bytes(ptr, n_bytes)
522 
523  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
524  f_pointer(mn(1):mx(1)) => flat_ptr
525  nullify (flat_ptr)
526  end subroutine mp_acquire_int_1d
527 
528  subroutine mp_release_int_1d(f_pointer)
529  integer, pointer :: f_pointer(:)
530 
531  call mp_release_bytes(c_loc(f_pointer))
532  nullify (f_pointer)
533  end subroutine mp_release_int_1d
534 
535  subroutine mp_acquire_int_2d(f_pointer, mn, mx)
536  integer, pointer :: f_pointer(:, :)
537  integer, intent(in) :: mn(2)
538  integer, intent(in) :: mx(2)
539  integer(kind=8) :: n_bytes, n_elem
540  integer(kind=1), pointer :: ptr(:)
541  integer, pointer :: flat_ptr(:)
542 
543  n_elem = get_n_elem(mn, mx)
544  n_bytes = n_elem*int_size
545  call mp_acquire_bytes(ptr, n_bytes)
546 
547  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
548  f_pointer(mn(1):mx(1), &
549  mn(2):mx(2)) => flat_ptr
550  nullify (flat_ptr)
551  end subroutine mp_acquire_int_2d
552 
553  subroutine mp_release_int_2d(f_pointer)
554  integer, pointer :: f_pointer(:, :)
555 
556  call mp_release_bytes(c_loc(f_pointer))
557  nullify (f_pointer)
558  end subroutine mp_release_int_2d
559 
560  subroutine mp_acquire_int_3d(f_pointer, mn, mx)
561  integer, pointer :: f_pointer(:, :, :)
562  integer, intent(in) :: mn(3)
563  integer, intent(in) :: mx(3)
564  integer(kind=8) :: n_bytes, n_elem
565  integer(kind=1), pointer :: ptr(:)
566  integer, pointer :: flat_ptr(:)
567 
568  n_elem = get_n_elem(mn, mx)
569  n_bytes = n_elem*int_size
570  call mp_acquire_bytes(ptr, n_bytes)
571 
572  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
573  f_pointer(mn(1):mx(1), &
574  mn(2):mx(2), &
575  mn(3):mx(3)) => flat_ptr
576  nullify (flat_ptr)
577  end subroutine mp_acquire_int_3d
578 
579  subroutine mp_release_int_3d(f_pointer)
580  integer, pointer :: f_pointer(:, :, :)
581 
582  call mp_release_bytes(c_loc(f_pointer))
583  nullify (f_pointer)
584  end subroutine mp_release_int_3d
585 
586  subroutine mp_acquire_int_6d(f_pointer, mn, mx)
587  integer, pointer :: f_pointer(:, :, :, :, :, :)
588  integer, intent(in) :: mn(6)
589  integer, intent(in) :: mx(6)
590  integer(kind=8) :: n_bytes, n_elem
591  integer(kind=1), pointer :: ptr(:)
592  integer, pointer :: flat_ptr(:)
593 
594  n_elem = get_n_elem(mn, mx)
595  n_bytes = n_elem*int_size
596  call mp_acquire_bytes(ptr, n_bytes)
597 
598  call c_f_pointer(c_loc(ptr), flat_ptr, [n_elem])
599  f_pointer(mn(1):mx(1), &
600  mn(2):mx(2), &
601  mn(3):mx(3), &
602  mn(4):mx(4), &
603  mn(5):mx(5), &
604  mn(6):mx(6)) => flat_ptr
605  nullify (flat_ptr)
606  end subroutine mp_acquire_int_6d
607 
608  subroutine mp_release_int_6d(f_pointer)
609  integer, pointer :: f_pointer(:, :, :, :, :, :)
610 
611  call mp_release_bytes(c_loc(f_pointer))
612  nullify (f_pointer)
613  end subroutine mp_release_int_6d
614 
615 end module fmempool
Plain Fortran implementation of a memory pool.
Definition: fmempool.F90:5
integer function get_omp_thread_idx()
Definition: fmempool.F90:114
integer(kind=8) function get_n_elem(mn, mx)
Definition: fmempool.F90:90
subroutine mp_release_int_6d(f_pointer)
Definition: fmempool.F90:609
subroutine, public mp_compactify()
Definition: fmempool.F90:236
subroutine mp_acquire_double_2d(f_pointer, mn, mx)
Definition: fmempool.F90:324
subroutine mp_acquire_int_3d(f_pointer, mn, mx)
Definition: fmempool.F90:561
subroutine mp_acquire_real_1d(f_pointer, mn, mx)
Definition: fmempool.F90:406
subroutine mp_release_bytes(c_pointer)
Definition: fmempool.F90:146
subroutine mp_release_double_1d(f_pointer)
Definition: fmempool.F90:317
subroutine mp_release_real_1d(f_pointer)
Definition: fmempool.F90:423
subroutine mp_release_double_2d(f_pointer)
Definition: fmempool.F90:342
type(mempool), dimension(:), pointer, save pool
Definition: fmempool.F90:57
subroutine, public mp_init(min_threads, verbosity, disable)
Definition: fmempool.F90:166
integer, parameter double_size
Definition: fmempool.F90:45
subroutine mp_release_double_6d(f_pointer)
Definition: fmempool.F90:397
subroutine mp_release_real_3d(f_pointer)
Definition: fmempool.F90:474
logical function, public mp_disabled()
Definition: fmempool.F90:291
logical function query_environment(env_var, default_val)
Definition: fmempool.F90:71
subroutine mp_acquire_int_2d(f_pointer, mn, mx)
Definition: fmempool.F90:536
subroutine, public mp_statistics()
Definition: fmempool.F90:253
subroutine mp_release_double_3d(f_pointer)
Definition: fmempool.F90:368
subroutine mp_release_real_6d(f_pointer)
Definition: fmempool.F90:503
subroutine mp_acquire_real_3d(f_pointer, mn, mx)
Definition: fmempool.F90:455
subroutine mp_acquire_int_6d(f_pointer, mn, mx)
Definition: fmempool.F90:587
integer, parameter n_max_slices
Definition: fmempool.F90:46
subroutine mp_acquire_bytes(f_pointer, n_bytes)
Definition: fmempool.F90:123
integer, parameter real_size
Definition: fmempool.F90:44
subroutine mp_release_int_3d(f_pointer)
Definition: fmempool.F90:580
integer, parameter int_size
Definition: fmempool.F90:43
subroutine mp_acquire_double_3d(f_pointer, mn, mx)
Definition: fmempool.F90:349
subroutine mp_acquire_int_1d(f_pointer, mn, mx)
Definition: fmempool.F90:512
subroutine mp_acquire_double_1d(f_pointer, mn, mx)
Definition: fmempool.F90:300
subroutine mp_acquire_double_6d(f_pointer, mn, mx)
Definition: fmempool.F90:375
subroutine mp_acquire_real_6d(f_pointer, mn, mx)
Definition: fmempool.F90:481
logical, save disabled
Definition: fmempool.F90:59
subroutine mp_release_int_1d(f_pointer)
Definition: fmempool.F90:529
subroutine mp_acquire_real_2d(f_pointer, mn, mx)
Definition: fmempool.F90:430
subroutine, public mp_finalize()
Definition: fmempool.F90:214
integer function get_omp_world_size()
Definition: fmempool.F90:104
subroutine mp_release_int_2d(f_pointer)
Definition: fmempool.F90:554
logical, save verbose
Definition: fmempool.F90:58
subroutine mp_release_real_2d(f_pointer)
Definition: fmempool.F90:448
    Report Typos and Errors