38 #ifndef MADNESS_WORLD_MPI_ARCHIVE_H__INCLUDED
39 #define MADNESS_WORLD_MPI_ARCHIVE_H__INCLUDED
41 #include <type_traits>
76 typename std::enable_if< is_trivially_serializable<T>::value,
void >
::type
109 typename std::enable_if< is_trivially_serializable<T>::value,
void >
::type
123 mutable std::vector<unsigned char>
v;
146 typename std::enable_if< is_trivially_serializable<T>::value,
void >
::type
184 mutable std::vector<unsigned char>
v;
205 typename std::enable_if< is_trivially_serializable<T>::value,
void >
::type
Interface templates for the archives (serialization).
void Send(const T *buf, long lenbuf, int dest, int tag=SafeMPI::DEFAULT_SEND_RECV_TAG) const
Send array of lenbuf elements to process dest.
Definition: worldmpi.h:347
void Recv(T *buf, long lenbuf, int src, int tag) const
Receive data of up to lenbuf elements from process src.
Definition: worldmpi.h:374
A parallel world class.
Definition: world.h:132
WorldMpiInterface & mpi
MPI interface.
Definition: world.h:202
Base class for output archive classes.
Definition: archive.h:382
Archive allowing buffering, serialization of data, and point-to-point communication between processes...
Definition: mpi_archive.h:118
MPIOutputArchive(World &world, const ProcessID &dest, int tag=SafeMPI::MPIAR_TAG)
Construct an archive for sending data via MPI.
Definition: mpi_archive.h:132
void close()
Close the archive (i.e., send any data in the buffer).
Definition: mpi_archive.h:169
void flush() const
Send all data in the buffer to the destination process.
Definition: mpi_archive.h:158
~MPIOutputArchive()
Destructor. Close the archive first, which may entail sending data.
Definition: mpi_archive.h:174
World * world
The world.
Definition: mpi_archive.h:119
int tag
MPI communication tag.
Definition: mpi_archive.h:121
std::enable_if< is_trivially_serializable< T >::value, void >::type store(const T *t, long n) const
Serialize data and store it in the buffer.
Definition: mpi_archive.h:147
madness::archive::VectorOutputArchive var
Archive for storing the buffer.
Definition: mpi_archive.h:124
std::vector< unsigned char > v
The buffer.
Definition: mpi_archive.h:123
ProcessID dest
The destination process.
Definition: mpi_archive.h:120
const std::size_t bufsize
Size of the buffer.
Definition: mpi_archive.h:122
Archive allowing serialization and point-to-point communication between processes with MPI.
Definition: mpi_archive.h:53
std::enable_if< is_trivially_serializable< T >::value, void >::type store(const T *t, long n) const
Serialize data and send it to the destination process.
Definition: mpi_archive.h:77
World * world
The world.
Definition: mpi_archive.h:54
int tag
MPI communication tag.
Definition: mpi_archive.h:56
MPIRawOutputArchive(World &world, const ProcessID &dest, int tag=SafeMPI::MPIAR_TAG)
Construct an archive for sending data via MPI.
Definition: mpi_archive.h:64
ProcessID dest
The destination process.
Definition: mpi_archive.h:55
Wraps an archive around an STL vector for output.
Definition: vector_archive.h:55
std::enable_if< madness::is_trivially_serializable< T >::value, void >::type store(const T *t, long n) const
Appends data to the end of the vector.
Definition: vector_archive.h:79
const double m
Definition: gfit.cc:199
auto T(World &world, response_space &f) -> response_space
Definition: global_functions.cc:34
static const int MPIAR_TAG
Definition: safempi.h:105
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
std::string type(const PairType &n)
Definition: PNOParameters.h:18
static void preamble_load(const MPIInputArchive &ar)
Load the preamble.
Definition: mpi_archive.h:280
static void postamble_load(const MPIInputArchive &ar)
Load the postamble.
Definition: mpi_archive.h:285
static void postamble_store(const MPIOutputArchive &ar)
Store the postamble.
Definition: mpi_archive.h:268
static void preamble_store(const MPIOutputArchive &ar)
Store the preamble.
Definition: mpi_archive.h:263
static void preamble_load(const MPIRawInputArchive &ar)
Load the preamble.
Definition: mpi_archive.h:246
static void postamble_load(const MPIRawInputArchive &ar)
Load the postamble.
Definition: mpi_archive.h:251
static void preamble_store(const MPIRawOutputArchive &ar)
Store the preamble.
Definition: mpi_archive.h:229
static void postamble_store(const MPIRawOutputArchive &ar)
Store the postamble.
Definition: mpi_archive.h:234
Default implementation of the pre/postamble for type checking.
Definition: archive.h:509
Implements an archive wrapping an STL vector.
Declares the World class for the parallel runtime environment.
int ProcessID
Used to clearly identify process number/rank.
Definition: worldtypes.h:43