MADNESS  version 0.9
Public Member Functions | List of all members
madness::archive::ParallelOutputArchive Class Reference

An archive for storing local or parallel data wrapping BinaryFstreamOutputArchive. More...

#include <parar.h>

Inheritance diagram for madness::archive::ParallelOutputArchive:
Inheritance graph
[legend]
Collaboration diagram for madness::archive::ParallelOutputArchive:
Collaboration graph
[legend]

Public Member Functions

 ParallelOutputArchive ()
 
 ParallelOutputArchive (World &world, const char *filename, int nio=1)
 Creates a parallel archive for output with given base filename and number of IO nodes. More...
 
void flush ()
 
- Public Member Functions inherited from madness::archive::BaseParallelArchive< BinaryFstreamOutputArchive >
 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...
 
Worldget_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...
 
BinaryFstreamOutputArchivelocal_archive () const
 Returns a reference to local archive ... throws if not an IO node. More...
 
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)
 
- Public Member Functions inherited from madness::archive::BaseArchive
 BaseArchive ()
 

Additional Inherited Members

- Static Public Member Functions inherited from madness::archive::BaseParallelArchive< BinaryFstreamOutputArchive >
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 inherited from madness::archive::BaseParallelArchive< BinaryFstreamOutputArchive >
static const bool is_parallel_archive
 
- Static Public Attributes inherited from madness::archive::BaseOutputArchive
static const bool is_output_archive = true
 
- Static Public Attributes inherited from madness::archive::BaseArchive
static const bool is_archive = true
 
static const bool is_input_archive = false
 
static const bool is_output_archive = false
 
static const bool is_parallel_archive = false
 

Detailed Description

An archive for storing local or parallel data wrapping BinaryFstreamOutputArchive.

Writes of process local objects only stores the data from process zero.

Writes of parallel containers (presently only WorldContainer) store all data.

Each of the server or IO nodes creates a BinaryFstreamOutputArchive with the name filename.rank. Client processes send their data to servers in round-robin fashion.

Process zero records the number of writers so that when the archive is opened for reading the number of readers is forced to match.

Constructor & Destructor Documentation

madness::archive::ParallelOutputArchive::ParallelOutputArchive ( )
inline
madness::archive::ParallelOutputArchive::ParallelOutputArchive ( World world,
const char *  filename,
int  nio = 1 
)
inline

Creates a parallel archive for output with given base filename and number of IO nodes.

References madness::archive::BaseParallelArchive< BinaryFstreamOutputArchive >::open().

Member Function Documentation

void madness::archive::ParallelOutputArchive::flush ( )
inline

The documentation for this class was generated from the following file: