MPQC  3.0.0-alpha
sc::DistArray4_MPIIOFile_Ind Class Reference

DistArray4_MPIIOFile_Ind handles transformed integrals stored in a binary file accessed through MPI-IO individual I/O routines. More...

#include <math/distarray4/distarray4_mpiiofile.h>

Inheritance diagram for sc::DistArray4_MPIIOFile_Ind:
sc::DistArray4_MPIIOFile sc::DistArray4 sc::SavableState sc::DescribedClass sc::RefCount

Public Member Functions

 DistArray4_MPIIOFile_Ind (const char *filename, int num_te_types, int ni, int nj, int nx, int ny, DistArray4Storage storage=DistArray4Storage_XY)
 
 DistArray4_MPIIOFile_Ind (StateIn &)
 
void save_data_state (StateOut &)
 Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. More...
 
Ref< DistArray4clone (const DistArray4Dimensions &dim=DistArray4Dimensions::default_dim())
 how to clone. More...
 
void store_pair_block (int i, int j, tbint_type oper_type, const double *ints)
 Stores an ij pair block of integrals. More...
 
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. More...
 
const double * retrieve_pair_block (int i, int j, tbint_type oper_type, double *buf=0) const
 Retrieves an ij block of integrals. More...
 
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. More...
 
- Public Member Functions inherited from sc::DistArray4_MPIIOFile
 DistArray4_MPIIOFile (const char *filename, int num_te_types, int ni, int nj, int nx, int ny, DistArray4Storage storage=DistArray4Storage_XY)
 
 DistArray4_MPIIOFile (StateIn &)
 
void activate ()
 implementation of DistArray4::activate()
 
void deactivate ()
 implementation of DistArray4::deactivate()
 
bool data_persistent () const
 implementation of DistArray4::data_persistent()
 
void release_pair_block (int i, int j, tbint_type oper_type) const
 Releases an ij pair block of integrals.
 
bool is_local (int i, int j) const
 Is this block stored locally?
 
bool is_avail (int i, int j) const
 In this implementation blocks are available everywhere.
 
bool has_access (int proc) const
 Does this task have access to all the integrals?
 
- Public Member Functions inherited from sc::DistArray4
 DistArray4 (int num_te_types, int ni, int nj, int nx, int ny, DistArray4Storage storage=DistArray4Storage_XY)
 
 DistArray4 (StateIn &)
 
int num_te_types () const
 The number of types of integrals that are being handled together.
 
int ni () const
 Rank of index space i.
 
int nj () const
 Rank of index space j.
 
int nx () const
 Rank of index space x.
 
int ny () const
 Rank of index space y.
 
const DistArray4Storage & storage () const
 physical storage of the integrals. The default storage is XY. Storage is not mutable.
 
size_t blocksize () const
 Size of each block of the integrals of one type, in double words.
 
size_t blksize () const
 
int ij_index (int i, int j) const
 
int tasks_with_access (std::vector< int > &twa_map) const
 Returns the total number of tasks with access to integrals. More...
 
const Ref< MessageGrp > & msg () const
 
bool active () const
 
- Public Member Functions inherited from sc::SavableState
SavableStateoperator= (const SavableState &)
 
void save_state (StateOut &)
 Save the state of the object as specified by the StateOut object. More...
 
void save_object_state (StateOut &)
 This can be used for saving state when the exact type of the object is known for both the save and the restore. More...
 
virtual void save_vbase_state (StateOut &)
 Save the virtual bases for the object. More...
 
- Public Member Functions inherited from sc::DescribedClass
 DescribedClass (const DescribedClass &)
 
DescribedClassoperator= (const DescribedClass &)
 
ClassDescclass_desc () const MPQC__NOEXCEPT
 This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More...
 
const char * class_name () const
 Return the name of the object's exact type.
 
int class_version () const
 Return the version of the class.
 
virtual void print (std::ostream &=ExEnv::out0()) const
 Print the object.
 
Ref< DescribedClassref ()
 Return this object wrapped up in a Ref smart pointer. More...
 
- Public Member Functions inherited from sc::RefCount
size_t identifier () const
 Return the unique identifier for this object that can be compared for different objects of different types. More...
 
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 

Additional Inherited Members

- Public Types inherited from sc::DistArray4
typedef unsigned int tbint_type
 Types of two-body operators that DistArray4 understands.
 
- Static Public Member Functions inherited from sc::SavableState
static void save_state (SavableState *s, StateOut &)
 
static SavableStaterestore_state (StateIn &si)
 Restores objects saved with save_state. More...
 
static SavableStatekey_restore_state (StateIn &si, const char *keyword)
 Like restore_state, but keyword is used to override values while restoring.
 
static SavableStatedir_restore_state (StateIn &si, const char *objectname, const char *keyword=0)
 
- Static Public Attributes inherited from sc::DistArray4
static const unsigned int max_num_te_types = 14
 
- Protected Types inherited from sc::DistArray4_MPIIOFile
typedef Registry< std::string, int, detail::NonsingletonCreationPolicyListOfClones
 
- Protected Member Functions inherited from sc::DistArray4_MPIIOFile
void set_clonelist (const Ref< ListOfClones > &cl)
 
void check_error_code_ (int errcod) const
 Utility function to check MPI I/O error codes.
 
void init (bool restart)
 Initialization tasks common to all constructors.
 
int ij_proc (int i, int j) const
 
- Protected Member Functions inherited from sc::DistArray4
size_t nxy () const
 
int ntasks () const
 total number of tasks
 
int me () const
 rank of this task
 
int classdebug () const
 return debug level for this class
 
- Protected Member Functions inherited from sc::SavableState
 SavableState (const SavableState &)
 
 SavableState (StateIn &)
 Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above. More...
 
- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 
- Protected Attributes inherited from sc::DistArray4_MPIIOFile
size_t nints_per_block_
 
char * filename_
 
MPI_File datafile_
 
Ref< ListOfClonesclonelist_
 
struct sc::DistArray4_MPIIOFile::PairBlkInfopairblk_
 

Detailed Description

DistArray4_MPIIOFile_Ind handles transformed integrals stored in a binary file accessed through MPI-IO individual I/O routines.

The ordering of integrals in blocks is not specified to avoid having to reorder integrals Each pair block has size of num_te_types*nbasis*nbasis

Member Function Documentation

◆ clone()

Ref<DistArray4> sc::DistArray4_MPIIOFile_Ind::clone ( const DistArray4Dimensions dim = DistArray4Dimensions::default_dim())
virtual

how to clone.

optional dim allows to obtain an object of the same type but different size. the default is to obtain an object of the same size.

Implements sc::DistArray4.

◆ retrieve_pair_block()

const double* sc::DistArray4_MPIIOFile_Ind::retrieve_pair_block ( int  i,
int  j,
tbint_type  oper_type,
double *  buf = 0 
) const
virtual

Retrieves an ij block of integrals.

Note that it comes stored according to storage(). No locking is performed.

Parameters
bufspecifies the buffer in which to write the data (if not provided, will allocate dynamically). this buffer will be used by subsequent retrieve_pair_block() requests until release_pair_block() is called.

Implements sc::DistArray4.

◆ retrieve_pair_subblock()

void sc::DistArray4_MPIIOFile_Ind::retrieve_pair_subblock ( int  i,
int  j,
tbint_type  oper_type,
int  xstart,
int  xfence,
int  ystart,
int  yfence,
double *  buf 
) const
virtual

Retrieves a rectangular subblock of ij block of integrals.

See also
retrieve_pair_block()

Implements sc::DistArray4.

◆ save_data_state()

void sc::DistArray4_MPIIOFile_Ind::save_data_state ( StateOut )
virtual

Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them.

This must be implemented by the derived class if the class has data.

Reimplemented from sc::DistArray4_MPIIOFile.

◆ store_pair_block()

void sc::DistArray4_MPIIOFile_Ind::store_pair_block ( int  i,
int  j,
tbint_type  oper_type,
const double *  ints 
)
virtual

Stores an ij pair block of integrals.

It is assumed to be stored according to storage(). It does not have to be "local", i.e. is_local(i,j) can be false, but:

  • nonlocal writes may require additional copies and/or communication.
  • and currently fail for some implementations :-( Locking is performed, hence should be thread safe

Implements sc::DistArray4.

◆ store_pair_subblock()

void sc::DistArray4_MPIIOFile_Ind::store_pair_subblock ( int  i,
int  j,
tbint_type  oper_type,
int  xstart,
int  xfence,
int  ystart,
int  yfence,
const double *  ints 
)
virtual

Stores an rectangular subblock of ij block of integrals.

Most efficient if the block is contiguous, i.e. yfence - ystart = ny().

See also
store_pair_block()

Implements sc::DistArray4.


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

Generated at Sun Jan 26 2020 23:24:05 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.