available_memory_shared#

caput.util.mpitools.available_memory_shared() int[source]#

Shared memory in bytes available to a process.

If the process is controlled by a cgroup, cgroup memory allocations are used. Assumes that all processes are part of the same cgroup.

Returns:
memory_bytesint

Memory available in bytes.

Raises:
OSError

If cgroup, memory.stat, or memory.usage_in_bytes files exist but cannot be read.