Welcome to PDCpy’s documentation!¶
Proactive Data Containers (PDC) software provides an object-centric API and a runtime system with a set of data object management services. These services allow placing data in the memory and storage hierarchy, performing data movement asynchronously, and providing scalable metadata operations to find data objects. More information and publications of PDC is available at https://sdm.lbl.gov/pdc
Main APIs¶
Thoughout the documentation, you may see the following types used when an integer must be in a certain range:
type name |
range |
|---|---|
int32 |
-2**31 to 2**31-1 |
uint32 |
0 to 2**32-1 |
uint64 |
0 to 2**64-1 |
These bounds are checked at runtime and will result in an OverflowError if they are exceeded.
- class pdc.Type(value)¶
Bases:
EnumAll of the data types that PDC objects support
- INT32¶
A 32-bit signed integer.
- UINT32¶
A 32-bit unsigned integer.
- FLOAT¶
A 32-bit floating point number.
- DOUBLE¶
A 64-bit floating point number.
- INT64¶
A 64-bit signed integer.
- UINT64¶
A 64-bit unsigned integer.
- INT16¶
A 16-bit signed integer.
- INT8¶
An 8-bit signed integer.
- as_numpy_type()¶
Returns the numpy type corresponding to this PDC type
- static from_numpy_type(dtype)¶
Returns the PDC type corresponding to this numpy type
- Parameters:
dtype – The numpy type
- Raises:
ValueError – If the numpy type has no corresponding PDC type
- class pdc.KVTags¶
An object used to manipulate object and container tags. Supports the following operations:
operation
effect
value = tags[x]get the value of the tag
xtags[x] = valueset the value of the tag
xdel tags[x]delete the tag
x
- exception pdc.PDCError¶
A general error type that indicates an error from the underlying c pdc api. Don’t count on getting this error most of the time. Usually, the server/client segfaults instead.
- class pdc.ServerContext¶
A context manager that starts and stops a single PDC server instance on enter and exit. This is intended for testing.
Usage:
with pdc.ServerContext(): pdc.init() ...
- Raises:
FileNotFoundError – if pdc_server.exe is not on PATH
- pdc.init()¶
Initialize PDC. This call will block and eventually terminate the program if the PDC server is not running in the same directory as the program. This must be called before any other PDC method.