MPI-SCATCI
2.0
An MPI version of SCATCI
|
Memory manager module. More...
Data Types | |
type | memorymanager |
This is a simple class to handle memory management tracking. More... | |
Functions/Subroutines | |
subroutine | memorymanager_ctor (this, total_memory) |
Constructor, used to initialize total available memory. More... | |
subroutine | init_memory (this, total_memory) |
Same as constructor, used to reinitialize te memory again (not really used) More... | |
subroutine | track_memory (this, elem_size, nelem, stat, array_name) |
Tracks memory allocation, usually called after an allocation. More... | |
subroutine | free_memory (this, elem_size, nelem) |
Tracks memory deallocation, usually called before a deallocation. More... | |
integer(longint) function | get_available_memory (this) |
Get currently available memory. More... | |
integer(longint) function | get_scaled_available_memory (this, scale_) |
Get currently available memory scaled. More... | |
subroutine | print_memory_report (this) |
Prints a very simple memory report. More... | |
Variables | |
type(memorymanager), public | master_memory |
This is the global memory manager. More... | |
Memory manager module.
This module has an extremely basic memory management system in place, this will hopefully be upgraded in due time
|
private |
Tracks memory deallocation, usually called before a deallocation.
[in,out] | this | Manager object to update. |
[in] | elem_size | Size in byte of each element |
[in] | nelem | Number of elements of size elem_size |
Definition at line 166 of file MemoryManager_module.f90.
|
private |
Get currently available memory.
Definition at line 194 of file MemoryManager_module.f90.
|
private |
Get currently available memory scaled.
This is particularly useful when trying to determine how many elements we can fit into memory by giving a margin of safety
[in,out] | this | Manager object to update. |
[in] | scale_ | Scale valued of available memory (0.0 - 1.0). |
Definition at line 213 of file MemoryManager_module.f90.
|
private |
Same as constructor, used to reinitialize te memory again (not really used)
[in,out] | this | Manager object to update. |
[in] | total_memory | Total available memory for the process in bytes |
Definition at line 99 of file MemoryManager_module.f90.
|
private |
Constructor, used to initialize total available memory.
[in,out] | this | Manager object to update. |
[in] | total_memory | Total available memory for the process in bytes |
Definition at line 80 of file MemoryManager_module.f90.
|
private |
Prints a very simple memory report.
Definition at line 231 of file MemoryManager_module.f90.
|
private |
Tracks memory allocation, usually called after an allocation.
[in,out] | this | Manager object to update. |
[in] | elem_size | Size in byte of each element |
[in] | nelem | Number of elements of size elem_size |
[in] | stat | error Value after an allocate call |
[in] | array_name | Assigned name of array, used to debug where a memory allocation error occured. |
Definition at line 121 of file MemoryManager_module.f90.
type(memorymanager), public memorymanager_module::master_memory |
This is the global memory manager.
No other memory manager can exist
Definition at line 69 of file MemoryManager_module.f90.