File data_stager.hpp
This file contains a class which implements the data staging logic for the trajectory data. The first partition reads the trajectory data from disc and distributes the trajectory to any other partition.
- Author
Benjamin Lindner ben@benlabs.net
- Version
See VERSION in CMakeLists.txt
- Copyright
GNU General Public License
-
class DataStagerByFrame
- #include <data_stager.hpp>
Loads coordinate data, performs frame decomposition of the trajectory data and places it efficiently into the distributed memory of the parallel partition by using div logic.
Public Functions
-
DataStagerByFrame(Sample &sample, boost::mpi::communicator &allcomm, boost::mpi::communicator &partitioncomm, Timer &timer)
Initializes a data staging object which decomposes the trajectory by frames using div logic (consecutive frames are assigned to the same node)
- Parameters:
sample – [in] Sample interface, which is used to load the frames.
allcomm – [in] MPI Communicator which contains all nodes which participate in the analysis
partitioncomm – [in] MPI Communicator which contains all nodes of the local partition.
timer – [inout] Timer object which is used to store timing information
Private Functions
-
void stage_firstpartition()
Loads trajectory data into the first partition.
-
void distribute_coordinates(coor_t *p_coordinates_buffer, std::vector<std::vector<size_t>> &framesbuffer, size_t s)
-
void stage_fillpartitions()
Clones coordinates from the first to all remaining partitions.
-
DataStagerByFrame(Sample &sample, boost::mpi::communicator &allcomm, boost::mpi::communicator &partitioncomm, Timer &timer)
-
class DataStagerByAtom
- #include <data_stager.hpp>
Loads coordinate data, performs atom decomposition of the trajectory data and places it efficiently into the distributed memory of the parallel partition by using div logic.
Public Functions
-
DataStagerByAtom(Sample &sample, boost::mpi::communicator &allcomm, boost::mpi::communicator &partitioncomm, Timer &timer)
Initializes a data staging object which decomposes the trajectory by atoms using modulo logic (consecutive atoms are assigned to different nodes)
- Parameters:
sample – [in] Sample interface, which is used to load the frames.
allcomm – [in] MPI Communicator which contains all nodes which participate in the analysis
partitioncomm – [in] MPI Communicator which contains all nodes of the local partition.
timer – [inout] Timer object which is used to store timing information
-
coor_t *stage()
Triggers the staging procedure. Data is staged on the first partition and then cloned to all other partitions.
- Returns:
Pointer to the local memory which contains the staged coordinates (2D data, frames x assigned atoms)
-
inline size_t staged_data_size() const
-
DataStagerByAtom(Sample &sample, boost::mpi::communicator &allcomm, boost::mpi::communicator &partitioncomm, Timer &timer)