MADNESS
version 0.9
|
Base class for input and output parallel archives. More...
#include <parar.h>
Public Member Functions | |
BaseParallelArchive () | |
ProcessID | io_node (ProcessID rank) const |
Returns the process doing IO for given node. More... | |
ProcessID | my_io_node () const |
Returns the process doing IO for this node. More... | |
int | num_io_clients () const |
Returns the number of IO clients for this node including self (zero if not an IO node) More... | |
bool | is_io_node () const |
Returns true if this node is doing physical IO. More... | |
World * | get_world () const |
Returns pointer to the world. More... | |
void | open (World &world, const char *filename, int nwriter=1) |
Opens the parallel archive. More... | |
void | close () |
Closes the parallel archive. More... | |
Archive & | local_archive () const |
Returns a reference to local archive ... throws if not an IO node. More... | |
template<typename objT > | |
void | broadcast (objT &obj, ProcessID root) const |
Same as world.gop.broadcast_serializable(obj, root) More... | |
void | remove () |
Removes the files associated with the current archive. More... | |
bool | dofence () const |
void | set_dofence (bool dofence) |
Static Public Member Functions | |
static bool | exists (World &world, const char *filename) |
Returns true if the named, unopened archive exists on disk with read access ... collective. More... | |
static void | remove (World &world, const char *filename) |
Deletes the files associated with the archive of the given name. More... | |
Static Public Attributes | |
static const bool | is_parallel_archive = true |
Base class for input and output parallel archives.
Templated by the local archive (only tested for BinaryFstream(In/Out)putArchive).
|
inline |
|
inline |
Same as world.gop.broadcast_serializable(obj, root)
Referenced by madness::archive::ArchiveImpl< ParallelInputArchive, T >::wrap_load(), and madness::archive::ArchiveImpl< ParallelInputArchive, archive_array< T > >::wrap_load().
|
inline |
Closes the parallel archive.
Referenced by main().
|
inline |
Referenced by madness::archive::ArchiveLoadImpl< ParallelInputArchive, WorldContainer< keyT, valueT > >::load(), madness::archive::BaseParallelArchive< BinaryFstreamInputArchive >::set_dofence(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive, WorldContainer< keyT, valueT > >::store().
|
inlinestatic |
Returns true if the named, unopened archive exists on disk with read access ... collective.
|
inline |
Returns pointer to the world.
Referenced by madness::archive::BaseParallelArchive< BinaryFstreamInputArchive >::broadcast(), madness::archive::ArchiveLoadImpl< ParallelInputArchive, WorldContainer< keyT, valueT > >::load(), madness::archive::ArchiveLoadImpl< ParallelInputArchive, Function< T, NDIM > >::load(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveImpl< ParallelInputArchive, T >::wrap_load(), madness::archive::ArchiveImpl< ParallelInputArchive, archive_array< T > >::wrap_load(), madness::archive::ArchiveImpl< ParallelOutputArchive, T >::wrap_store(), and madness::archive::ArchiveImpl< ParallelOutputArchive, archive_array< T > >::wrap_store().
|
inline |
Returns the process doing IO for given node.
Currently assigned in round-robin-fashion to the first nio processes except on IBM BG/P where use every 64'th
Referenced by madness::archive::BaseParallelArchive< BinaryFstreamInputArchive >::my_io_node(), madness::archive::BaseParallelArchive< BinaryFstreamInputArchive >::open(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive, WorldContainer< keyT, valueT > >::store().
|
inline |
Returns true if this node is doing physical IO.
Referenced by madness::archive::BaseParallelArchive< BinaryFstreamInputArchive >::close(), madness::archive::ArchiveLoadImpl< ParallelInputArchive, WorldContainer< keyT, valueT > >::load(), madness::archive::BaseParallelArchive< BinaryFstreamInputArchive >::local_archive(), madness::archive::BaseParallelArchive< BinaryFstreamInputArchive >::open(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive, WorldContainer< keyT, valueT > >::store().
|
inline |
Returns a reference to local archive ... throws if not an IO node.
Referenced by madness::archive::ArchiveLoadImpl< ParallelInputArchive, WorldContainer< keyT, valueT > >::load(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveImpl< ParallelInputArchive, T >::wrap_load(), madness::archive::ArchiveImpl< ParallelInputArchive, archive_array< T > >::wrap_load(), madness::archive::ArchiveImpl< ParallelOutputArchive, T >::wrap_store(), and madness::archive::ArchiveImpl< ParallelOutputArchive, archive_array< T > >::wrap_store().
|
inline |
Returns the process doing IO for this node.
Referenced by madness::archive::BaseParallelArchive< BinaryFstreamInputArchive >::is_io_node(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive, WorldContainer< keyT, valueT > >::store().
|
inline |
Returns the number of IO clients for this node including self (zero if not an IO node)
Referenced by madness::archive::ArchiveStoreImpl< ParallelOutputArchive, WorldContainer< keyT, valueT > >::store().
|
inline |
Opens the parallel archive.
When writing a new archive, the numer of writers specified is used. When reading an existing archive, the number of ionodes is adjusted to to be the same as the number that wrote the original archive. Presently we don't have logic to handle reading an archive using fewer processes originally used to write it. If you want to fix this have a look in worlddc.h for the only spot that currently needs changing to make that work.
The default number of IO nodes is one and there is an arbitrary maximum of 50 set. On IBM BG/P the maximum is nproc/64.
|
inlinestatic |
Deletes the files associated with the archive of the given name.
Presently assumes a shared file system since process zero does the deleting
|
inline |
Removes the files associated with the current archive.
|
inline |
|
static |