Skip to content
Snippets Groups Projects
BP1Aggregator.h 1.08 KiB
Newer Older
wfg's avatar
wfg committed
/*
 * BP1Aggregator.h
 *
 *  Created on: Mar 1, 2017
 *      Author: wfg
 */

#ifndef BP1AGGREGATOR_H_
#define BP1AGGREGATOR_H_



#ifdef ADIOS_NOMPI
  #include "mpidummy.h"
#else
  #include <mpi.h>
#endif


wfg's avatar
wfg committed
namespace adios
{
namespace format
{

/**
 * Does all MPI related spatial aggregation tasks
 */
wfg's avatar
wfg committed
class BP1Aggregator
{

public:

    MPI_Comm m_MPIComm = MPI_COMM_SELF; ///< MPI communicator from Engine
    int m_RankMPI = 0; ///< current MPI rank process
    int m_SizeMPI = 1; ///< current MPI processes size
wfg's avatar
wfg committed

    /**
     * Unique constructor
     * @param mpiComm coming from engine
     */
    BP1Aggregator( MPI_Comm mpiComm, const bool debugMode = false );
wfg's avatar
wfg committed

    ~BP1Aggregator( );
    /**
     * Function that aggregates and writes (from rank = 0) profiling.log in python dictionary format
     * @param rankLog contain rank profiling info to be aggregated
     */
    void WriteProfilingLog( const std::string fileName, const std::string& rankLog );
wfg's avatar
wfg committed

wfg's avatar
wfg committed

    const bool m_DebugMode = false;
wfg's avatar
wfg committed


};


} //end namespace format
} //end namespace adios

#endif /* BP1AGGREGATOR_H_ */