|
MPI-SCATCI 2.0
An MPI version of SCATCI
|
This is a simple class to handle memory management tracking. More...
Public Member Functions | |
| procedure, public | construct memorymanager_ctor |
| procedure, public | init_memory (this, total_memory) |
| Initialize the memory with a new value. | |
| procedure, public | track_memory (this, elem_size, nelem, stat, array_name) |
| Tracks. | |
| procedure, public | free_memory (this, elem_size, nelem) |
| Tracks memory deallocation, usually called before a deallocation. | |
| procedure, public | get_available_memory (this) |
| Get currently available memory. | |
| procedure, public | get_scaled_available_memory (this, scale_) |
| Get currently available memory scaled. | |
| procedure, public | print_memory_report (this) |
| Prints a very simple memory report. | |
Public Attributes | |
| integer(longint) | available_local_memory = 0 |
| Memory we have left over. | |
| integer(longint) | cached_tracked_memory = 0 |
| logical | initialized = .false. |
Private Attributes | |
| integer(longint) | total_local_memory = 0 |
| The total memory we have been assigned. | |
This is a simple class to handle memory management tracking.
Definition at line 46 of file MemoryManager_module.f90.
| procedure, public MemoryManager_module::MemoryManager::construct |
Definition at line 54 of file MemoryManager_module.f90.
| procedure, public MemoryManager_module::MemoryManager::free_memory | ( | class(memorymanager) | this, |
| integer, intent(in) | elem_size, | ||
| integer, intent(in) | nelem ) |
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 57 of file MemoryManager_module.f90.
| procedure, public MemoryManager_module::MemoryManager::get_available_memory | ( | class(memorymanager) | this | ) |
Get currently available memory.
Definition at line 58 of file MemoryManager_module.f90.
| procedure, public MemoryManager_module::MemoryManager::get_scaled_available_memory | ( | class(memorymanager) | this, |
| real(wp), intent(in) | scale_ ) |
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 59 of file MemoryManager_module.f90.
| procedure, public MemoryManager_module::MemoryManager::init_memory | ( | class(memorymanager) | this, |
| integer(longint), intent(in) | total_memory ) |
Initialize the memory with a new value.
| [in,out] | this | Manager object to update. |
| [in] | total_memory | Total available memory for the process in bytes |
Definition at line 55 of file MemoryManager_module.f90.
| procedure, public MemoryManager_module::MemoryManager::print_memory_report | ( | class(memorymanager) | this | ) |
Prints a very simple memory report.
Definition at line 60 of file MemoryManager_module.f90.
| procedure, public MemoryManager_module::MemoryManager::track_memory | ( | class(memorymanager) | this, |
| integer, intent(in) | elem_size, | ||
| integer, intent(in) | nelem, | ||
| integer, intent(in) | stat, | ||
| character(len=*), intent(in) | array_name ) |
Tracks.
| [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 56 of file MemoryManager_module.f90.
| integer(longint) MemoryManager_module::MemoryManager::available_local_memory = 0 |
Memory we have left over.
Definition at line 49 of file MemoryManager_module.f90.
| integer(longint) MemoryManager_module::MemoryManager::cached_tracked_memory = 0 |
Definition at line 50 of file MemoryManager_module.f90.
| logical MemoryManager_module::MemoryManager::initialized = .false. |
Definition at line 51 of file MemoryManager_module.f90.
|
private |
The total memory we have been assigned.
Definition at line 48 of file MemoryManager_module.f90.