|
votca 2026-dev
|
Memory the user grants the process (–memory, GB), for choices that trade memory for speed (caches, batch sizes). More...
#include <memorybudget.h>
Static Public Member Functions | |
| static void | Set (double total_gb, Index concurrent_jobs=1) |
| total_gb <= 0: no budget given | |
| static void | SetConcurrentJobs (Index concurrent_jobs) |
| static bool | Given () |
| static double | DefaultAllowanceBytes () |
| static double | JobBudgetBytes () |
| The share of the budget of one job (0 without a budget). | |
| static double | AvailableBytes () |
| static double | ResidentBytes () |
| Resident memory of the process (-1 if unknown on this platform). | |
| static double | PeakResidentBytes () |
| Peak resident memory of the process so far (-1 if unknown). | |
| static std::string | Usage () |
| static std::string | Describe () |
| e.g. "budget 400 GB, 46.1 GB in use" or "no --memory given" | |
Static Private Attributes | |
| static double | total_bytes_ = 0.0 |
| static Index | concurrent_jobs_ = 1 |
Memory the user grants the process (–memory, GB), for choices that trade memory for speed (caches, batch sizes).
The budget is the total for the process; with several jobs running concurrently in one process (xtp_parallel -t) each gets an equal share. It is advisory, as mem in Gaussian or maxcore in ORCA: it steers optional allocations, it does not limit the memory a calculation needs anyway.
Without a budget a fixed allowance of DefaultAllowanceBytes() is available for optional buffers, regardless of what the process already holds.
Definition at line 45 of file memorybudget.h.
|
static |
Bytes one job may still allocate for optional buffers: its share of the budget minus its share of the resident memory of the process, minus a margin (5% of the share, at least 1 GB); without a budget the default allowance.
Definition at line 112 of file memorybudget.cc.
|
inlinestatic |
Definition at line 51 of file memorybudget.h.
|
static |
e.g. "budget 400 GB, 46.1 GB in use" or "no --memory given"
Definition at line 122 of file memorybudget.cc.
|
inlinestatic |
Definition at line 50 of file memorybudget.h.
|
static |
The share of the budget of one job (0 without a budget).
Definition at line 65 of file memorybudget.cc.
|
static |
Peak resident memory of the process so far (-1 if unknown).
Definition at line 83 of file memorybudget.cc.
|
static |
Resident memory of the process (-1 if unknown on this platform).
Definition at line 69 of file memorybudget.cc.
|
static |
total_gb <= 0: no budget given
Definition at line 56 of file memorybudget.cc.
|
static |
Definition at line 61 of file memorybudget.cc.
|
static |
e.g. "memory in use 203 GB, peak 231 GB" (empty if unknown), for the logs of the large steps
Definition at line 97 of file memorybudget.cc.
|
staticprivate |
Definition at line 77 of file memorybudget.h.
|
staticprivate |
Definition at line 76 of file memorybudget.h.