28#ifndef _chemistry_qc_mbptr12_distarray4_mpiiofile_h
29#define _chemistry_qc_mbptr12_distarray4_mpiiofile_h
31#define OMPI_SKIP_MPICXX
32#define MPICH_SKIP_MPICXX
34#include <util/ref/ref.h>
35#include <util/group/memory.h>
36#include <util/misc/registry.h>
37#include <math/distarray4/distarray4.h>
41#define AVOID_XLC_BUG 1
59 size_t nints_per_block_;
69 mutable double* ints_[max_num_te_types];
70 mutable bool manage_[max_num_te_types];
71 mutable int refcount_[max_num_te_types];
80 int ij_proc(
int i,
int j)
const {
return 0;};
85 DistArray4Dimensions::default_dim());
91 DistArray4Storage
storage = DistArray4Storage_XY);
114 void clone_filename(std::string& result,
const char* original,
int id);
118template <
typename Derived>
122 std::string clonename;
123 using detail::clone_filename;
124 clone_filename(clonename, this->filename_,
id);
126 while (clonelist_->key_exists(clonename)) {
128 clone_filename(clonename, this->filename_,
id);
131 clonelist_ = ListOfClones::instance();
133 clonelist_->add(clonename,
id);
136 if (dim == DistArray4Dimensions::default_dim())
142 result =
new Derived(clonename.c_str(), dim.num_te_types(),
147 result->set_clonelist(clonelist_);
166 DistArray4Storage
storage = DistArray4Storage_XY);
175 int xstart,
int xfence,
int ystart,
int yfence,
178 double* buf = 0)
const;
180 int xstart,
int xfence,
int ystart,
int yfence,
DistArray4_MPIIOFile_Ind handles transformed integrals stored in a binary file accessed through MPI-I...
Definition distarray4_mpiiofile.h:161
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void store_pair_block(int i, int j, tbint_type oper_type, const double *ints)
Stores an ij pair block of integrals.
void retrieve_pair_subblock(int i, int j, tbint_type oper_type, int xstart, int xfence, int ystart, int yfence, double *buf) const
Retrieves a rectangular subblock of ij block of integrals.
void store_pair_subblock(int i, int j, tbint_type oper_type, int xstart, int xfence, int ystart, int yfence, const double *ints)
Stores an rectangular subblock of ij block of integrals.
Ref< DistArray4 > clone(const DistArray4Dimensions &dim=DistArray4Dimensions::default_dim())
how to clone.
const double * retrieve_pair_block(int i, int j, tbint_type oper_type, double *buf=0) const
Retrieves an ij block of integrals.
DistArray4_MPIIOFile handles transformed integrals stored in a binary file accessed through MPI-IO.
Definition distarray4_mpiiofile.h:55
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void activate()
implementation of DistArray4::activate()
void check_error_code_(int errcod) const
Utility function to check MPI I/O error codes.
void release_pair_block(int i, int j, tbint_type oper_type) const
Releases an ij pair block of integrals.
bool has_access(int proc) const
Does this task have access to all the integrals?
Definition distarray4_mpiiofile.h:110
bool data_persistent() const
implementation of DistArray4::data_persistent()
Definition distarray4_mpiiofile.h:101
void deactivate()
implementation of DistArray4::deactivate()
bool is_avail(int i, int j) const
In this implementation blocks are available everywhere.
Definition distarray4_mpiiofile.h:108
void init(bool restart)
Initialization tasks common to all constructors.
bool is_local(int i, int j) const
Is this block stored locally?
Definition distarray4_mpiiofile.h:106
DistArray4 contains a set of one or more distributed dense 4-index arrays.
Definition distarray4.h:94
virtual Ref< DistArray4 > clone(const DistArray4Dimensions &dim=DistArray4Dimensions::default_dim())=0
how to clone.
const DistArray4Storage & storage() const
physical storage of the integrals. The default storage is XY. Storage is not mutable.
Definition distarray4.h:122
int nj() const
Rank of index space j.
Definition distarray4.h:116
int ny() const
Rank of index space y.
Definition distarray4.h:120
unsigned int tbint_type
Types of two-body operators that DistArray4 understands.
Definition distarray4.h:108
int nx() const
Rank of index space x.
Definition distarray4.h:118
int ni() const
Rank of index space i.
Definition distarray4.h:114
int num_te_types() const
The number of types of integrals that are being handled together.
Definition distarray4.h:112
A template class that maintains references counts.
Definition ref.h:361
Registry wraps std::map and can be policy-configured to act as a Singleton or a regular object.
Definition registry.h:112
Restores fundamental and user-defined types from images created with StateOut.
Definition statein.h:79
Serializes fundamental and user-defined types.
Definition stateout.h:71
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
Definition distarray4.h:43
Definition distarray4_mpiiofile.h:68