#include <G4MPIToolsManager.hh>
Definition at line 44 of file G4MPIToolsManager.hh.
 
◆ G4MPIToolsManager()
◆ ~G4MPIToolsManager()
  
  
      
        
          | virtual G4MPIToolsManager::~G4MPIToolsManager  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
◆ Merge()
template<typename T > 
  
  
      
        
          | G4bool G4MPIToolsManager::Merge  | 
          ( | 
          const std::vector< T *> &  | 
          htVector,  | 
         
        
           | 
           | 
          const std::vector< G4HnInformation *> &  | 
          hnVector  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Definition at line 176 of file G4MPIToolsManager.hh.
  179   if ( ! htVector.size() ) 
return true;
   182   G4int nofActiveT = 0;
   185     for ( 
G4int i=0; i<
G4int(htVector.size()); ++i ) {
   186       auto activation = hnVector[i]->GetActivation();
   187       if ( activation ) ++nofActiveT;
   190       nofActiveT = 
G4int(htVector.size());
   193   if ( ! nofActiveT ) 
return true;
   196   if ( ! 
fHmpi->comm_rank(commRank) ) {
   199       << 
"    Failed to get MPI commander rank." << 
G4endl   200       << 
"    Merging will not be performed.";
   206   G4bool finalResult = 
true;
   208   if ( commRank != 
fHmpi->rank() ) {
   213       description << 
"on rank "  << commRank
   214            << 
" destination rank: " << 
fHmpi->rank();
   219     auto result = 
Send(nofActiveT, htVector, hnVector);
   221     finalResult = result && finalResult;
   226       description << 
"on rank " << commRank
   227          << 
" destination rank: " << 
fHmpi->rank();
   237       description << 
"on rank " << commRank
   238            << 
" destination rank: " << 
fHmpi->rank();
   243     auto result = 
Receive(nofActiveT, htVector, hnVector);
   245     finalResult = result && finalResult;
   250       description << 
"on rank "  << commRank
   251          << 
" destination rank: " << 
fHmpi->rank();
 std::ostringstream G4ExceptionDescription
 
G4bool GetIsActivation() const
 
const G4AnalysisVerbose * GetVerboseL1() const
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
const G4AnalysisVerbose * GetVerboseL3() const
 
const G4AnalysisVerbose * GetVerboseL4() const
 
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
 
 
 
 
◆ Receive()
template<typename T > 
  
  
      
        
          | G4bool G4MPIToolsManager::Receive  | 
          ( | 
          G4int  | 
          nofActiveT,  | 
         
        
           | 
           | 
          const std::vector< T *> &  | 
          htVector,  | 
         
        
           | 
           | 
          const std::vector< G4HnInformation *> &  | 
          hnVector  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
Definition at line 114 of file G4MPIToolsManager.hh.
  123       << 
"    Failed to get MPI commander size." << 
G4endl   124       << 
"    Merging will not be performed.";
   131   for (
G4int srank = 0; srank < commSize; ++srank) {
   134     if ( srank == 
fHmpi->rank() ) 
continue;
   138     using class_pointer = std::pair<std::string,void*>;
   139     std::vector<class_pointer> hs;
   140     if ( ! 
fHmpi->wait_histos(srank, hs) ) {
   142       description  << 
"    wait_histos from " << srank << 
" : failed.";
   149     if ( 
G4int(hs.size()) != nofActiveT ) {
   151       description << 
"    srank: " << srank << 
" : got " << hs.size() << 
" objects, "   152                   << 
"while " << nofActiveT  << 
" were exepected." << 
G4endl;
   160     for ( 
G4int i=0; i<
G4int(htVector.size()); ++i ) {
   162       auto info = hnVector[i];
   165       auto ht = htVector[i];
   166       auto newHt = 
static_cast<T*
>(hs[counter++].second);
 std::ostringstream G4ExceptionDescription
 
G4bool GetIsActivation() const
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
 
 
 
◆ Send()
template<typename T > 
  
  
      
        
          | G4bool G4MPIToolsManager::Send  | 
          ( | 
          G4int  | 
          nofActiveT,  | 
         
        
           | 
           | 
          const std::vector< T *> &  | 
          htVector,  | 
         
        
           | 
           | 
          const std::vector< G4HnInformation *> &  | 
          hnVector  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
Definition at line 78 of file G4MPIToolsManager.hh.
   86   fHmpi->beg_send(nofActiveT);
    89   for ( 
G4int i=0; i<
G4int(htVector.size()); ++i ) {
    91     auto info = hnVector[i];
    95     auto ht = htVector[i];
    96     auto result = 
fHmpi->pack(*ht);
    97     finalResult = result && finalResult;
   103     description  << 
"    Rank: " << 
fHmpi->rank() << 
" : can't send histos.";
 std::ostringstream G4ExceptionDescription
 
G4bool GetIsActivation() const
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
 
 
 
◆ fHmpi
  
  
      
        
          | tools::histo::hmpi* G4MPIToolsManager::fHmpi | 
         
       
   | 
  
private   | 
  
 
 
◆ fState
The documentation for this class was generated from the following file: