data_baseisf_data_baseIOLoaderDumpershared_numpy_store

shared_numpy_store

Read and write numpy arrays to and from shared memory.

Shared memory is a memory space that is shared between multiple processes.

Note

This module is speicalized for use with SLURM HPC systems. To use with other systems, set the JOB_SHMTMPDIR environment variable to a directory in shared memory.

Classes

Uninterruptible

Context manager to create an uninterruptible section of code.

SharedNumpyStore

Store numpy arrays on disk and share them between processes.

Loader

Loader for SharedNumpyStore objects.

Functions

shared_array_from_numpy(arr, name)

Takes an array in memory and puts it into shared memory

shared_array_from_disk(path, shape, dtype, name, start_row, end_row)

Loads a numpy array from disk and puts it into shared memory

memmap_from_disk(path, shape, dtype, name, start_row, end_row)

Memory map a numpy array on disk.

shared_array_from_shared_mem_name(fname, shape, dtype)

Loads an existing shared array by its name

check(obj)

Check whether the object can be saved with this dumper.

dump(obj, savedir)

Dump the shared numpy store in the specified directory.