|
MADNESS 0.10.1
|
Base class for input and output parallel archives. More...
#include <parallel_archive.h>

Public Member Functions | |
| template<typename X = Archive> | |
| BaseParallelArchive (typename std::enable_if_t< std::is_same< X, BinaryFstreamInputArchive >::value||std::is_same< X, BinaryFstreamOutputArchive >::value, int > nio=0) | |
| Default constructor. | |
| BaseParallelArchive (World &world, Archive &ar, int nio) | |
| template<typename objT> | |
| void | broadcast (objT &obj, ProcessID root) const |
| Same as world.gop.broadcast_serializable(obj, root). | |
| void | close () |
| Closes the parallel archive. | |
| bool | dofence () const |
| Check if we should fence around a read/write operation. | |
| World * | get_world () const |
| Returns a pointer to the world. | |
| ProcessID | io_node (ProcessID rank) const |
| Returns the process doing I/O for given node. | |
| bool | is_io_node () const |
| Returns true if this node is doing physical I/O. | |
| Archive & | local_archive () const |
| Returns a reference to the local archive. | |
| ProcessID | my_io_node () const |
| Returns the process doing I/O for this node. | |
| int | num_io_clients () const |
| Returns the number of I/O clients for this node, including self (zero if not an I/O node). | |
| template<typename X = Archive> | |
| std::enable_if_t< std::is_same< X, BinaryFstreamInputArchive >::value||std::is_same< X, BinaryFstreamOutputArchive >::value, void > | open (World &world, const char *filename, int nwriter=1) |
| Opens the parallel archive. | |
| void | remove () |
| Removes the files associated with the current archive. | |
| void | set_dofence (bool dofence) |
| Set the flag for fencing around a read/write operation. | |
| void | set_nclient (World &world) |
Static Public Member Functions | |
| template<typename X = Archive> | |
| static std::enable_if_t< std::is_same< X, BinaryFstreamInputArchive >::value||std::is_same< X, BinaryFstreamOutputArchive >::value, bool > | exists (World &world, const char *filename) |
| Returns true if the named, unopened archive exists on disk with read access. | |
| template<typename X = Archive> | |
| static std::enable_if_t< std::is_same< X, BinaryFstreamInputArchive >::value||std::is_same< X, BinaryFstreamOutputArchive >::value, void > | remove (World &world, const char *filename) |
| Deletes the files associated with the archive of the given name. | |
Static Public Attributes | |
| static const bool | is_parallel_archive = true |
| Mark this class as a parallel archive. | |
Private Attributes | |
| Archive | ar |
| The local archive. | |
| bool | do_fence =true |
| If true (default), a read/write of parallel objects fences before and after I/O. | |
| char | fname [256] |
| Name of the archive. | |
| int | nclient |
| Number of clients of this node, including self. Zero if not I/O node. | |
| int | nio |
| Number of I/O nodes (always includes node zero). | |
| World * | world |
| The world. | |
Base class for input and output parallel archives.
| Archive | The local archive. Only tested for BinaryFstreamInputArchive and BinaryFstreamOutputArchive. |
BaseArchive?
|
inline |
|
inline |
Default constructor.
|
inline |
Same as world.gop.broadcast_serializable(obj, root).
| objT | Type of object to broadcast. |
| [in] | obj | The object to broadcast. |
| [in] | root | The root process for broadcasting. |
Referenced by madness::InitParameters::read(), madness::archive::ArchiveImpl< ParallelInputArchive< localarchiveT >, archive_array< T > >::wrap_load(), and madness::archive::ArchiveImpl< ParallelInputArchive< localarchiveT >, T >::wrap_load().
|
inline |
Closes the parallel archive.
Referenced by test13(), test_io(), and test_serialize().
|
inline |
Check if we should fence around a read/write operation.
Referenced by madness::archive::ArchiveLoadImpl< ParallelInputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::load(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store().
|
inlinestatic |
Returns true if the named, unopened archive exists on disk with read access.
This is a collective operation.
| [in] | world | The world. |
| [in] | filename | Name of the file. |
Referenced by madness::archive::BaseParallelArchive< localarchiveT >::open().
|
inline |
Returns a pointer to the world.
Referenced by madness::archive::BaseParallelArchive< localarchiveT >::broadcast(), madness::archive::ArchiveLoadImpl< ParallelInputArchive< archiveT >, CCPairFunction< T, NDIM > >::load(), madness::archive::ArchiveLoadImpl< ParallelInputArchive< archiveT >, Function< T, NDIM > >::load(), madness::archive::ArchiveLoadImpl< ParallelInputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::load(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< ContainerRecordOutputArchive >, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< VectorOutputArchive >, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveImpl< ParallelInputArchive< localarchiveT >, archive_array< T > >::wrap_load(), madness::archive::ArchiveImpl< ParallelInputArchive< localarchiveT >, T >::wrap_load(), madness::archive::ArchiveImpl< ParallelOutputArchive< localarchiveT >, archive_array< T > >::wrap_store(), and madness::archive::ArchiveImpl< ParallelOutputArchive< localarchiveT >, T >::wrap_store().
|
inline |
Returns the process doing I/O for given node.
Currently assigned in a round-robin fashion to the first nio processes, except on IBM BG/P where we use every 64th.
| [in] | rank | The node to check. |
rank. Referenced by madness::archive::BaseParallelArchive< localarchiveT >::my_io_node(), madness::archive::BaseParallelArchive< localarchiveT >::set_nclient(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store().
|
inline |
Returns true if this node is doing physical I/O.
Referenced by madness::archive::BaseParallelArchive< localarchiveT >::close(), madness::archive::ArchiveLoadImpl< ParallelInputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::load(), madness::archive::BaseParallelArchive< localarchiveT >::local_archive(), madness::archive::BaseParallelArchive< localarchiveT >::open(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store().
|
inline |
Returns a reference to the local archive.
| MadnessException | If not an I/O node. |
Referenced by madness::archive::ArchiveLoadImpl< ParallelInputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::load(), madness::InitParameters::read(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< ContainerRecordOutputArchive >, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< VectorOutputArchive >, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveImpl< ParallelInputArchive< localarchiveT >, archive_array< T > >::wrap_load(), madness::archive::ArchiveImpl< ParallelInputArchive< localarchiveT >, T >::wrap_load(), madness::archive::ArchiveImpl< ParallelOutputArchive< localarchiveT >, archive_array< T > >::wrap_store(), and madness::archive::ArchiveImpl< ParallelOutputArchive< localarchiveT >, T >::wrap_store().
|
inline |
Returns the process doing I/O for this node.
Referenced by madness::archive::BaseParallelArchive< localarchiveT >::is_io_node(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store().
|
inline |
Returns the number of I/O clients for this node, including self (zero if not an I/O node).
Referenced by madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store().
|
inline |
Opens the parallel archive.
| [in] | world | The world. |
| [in] | filename | Name of the file. |
| [in] | nwriter | The number of writers. |
Referenced by test13().
|
inline |
Removes the files associated with the current archive.
Referenced by madness::archive::BaseParallelArchive< localarchiveT >::remove().
|
inlinestatic |
|
inline |
Set the flag for fencing around a read/write operation.
| [in] | dofence | True if we should fence; false otherwise. |
Referenced by madness::Cloud::store_batch().
|
inline |
|
mutableprivate |
The local archive.
|
private |
If true (default), a read/write of parallel objects fences before and after I/O.
|
private |
Name of the archive.
|
static |
Mark this class as a parallel archive.
|
private |
Number of clients of this node, including self. Zero if not I/O node.
|
private |
Number of I/O nodes (always includes node zero).
|
private |
The world.