Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
examples
extended
parallel
MPI
source
src
G4MPIhistoMerger.cc
이 파일의 문서화 페이지로 가기
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// Merge G4analysis histogram objects via MPI
27
//
28
// History:
29
// Jun 27, 2015 : Ivana Hrivnacova - new implementation using g4analysis
30
31
#include "
G4MPIhistoMerger.hh
"
32
#include "
G4ios.hh
"
33
#include "tools/mpi/hmpi"
34
#include <mpi.h>
35
#include "
G4VAnalysisManager.hh
"
36
37
G4MPIhistoMerger::G4MPIhistoMerger
() :
38
manager(0),destination(
G4MPImanager
::kRANK_MASTER),
39
verboseLevel(0) {}
40
41
G4MPIhistoMerger::G4MPIhistoMerger
(
G4VAnalysisManager
*
m
,
42
G4int
dest,
G4int
v) : manager(m), destination(dest),verboseLevel(v) {}
43
44
void
G4MPIhistoMerger::Merge
()
45
{
46
if
(
verboseLevel
> 0 ) {
47
G4cout
<<
"Starting merging of histograms"
<<
G4endl
;
48
}
49
50
MPI::Intracomm comm = MPI::COMM_WORLD.Dup();
51
52
G4bool
verbose = (
verboseLevel
> 1 );
53
G4int
tag
=
G4MPImanager::kTAG_HISTO
;
54
//const MPI::Intracomm* comm = &COMM_G4COMMAND_;
55
tools::mpi::hmpi* hmpi =
new
tools::mpi::hmpi(
G4cout
,
destination
, tag,
56
comm, verbose);
57
if
( !
manager
->
Merge
(hmpi) ) {
58
G4cout
<<
" Merge FAILED"
<<
G4endl
;
59
}
60
61
delete
hmpi;
62
63
if
(
verboseLevel
> 0 ) {
64
G4cout
<<
"End merging of histograms"
<<
G4endl
;
65
}
66
comm.Free();
67
}
G4MPIhistoMerger::manager
G4VAnalysisManager * manager
Definition:
G4MPIhistoMerger.hh:53
G4ios.hh
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4MPIhistoMerger::destination
G4int destination
Definition:
G4MPIhistoMerger.hh:54
G4MPImanager
Definition:
G4MPImanager.hh:45
tag
Definition:
xmlparse.cc:187
G4VAnalysisManager.hh
G4MPIhistoMerger::Merge
void Merge()
Definition:
G4MPIhistoMerger.cc:44
m
static constexpr double m
Definition:
G4SIunits.hh:129
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4MPImanager::kTAG_HISTO
Definition:
G4MPImanager.hh:55
G4VAnalysisManager::Merge
G4bool Merge(tools::histo::hmpi *hmpi)
Definition:
G4VAnalysisManager.cc:226
G4VAnalysisManager
Definition:
G4VAnalysisManager.hh:65
G4MPIhistoMerger::G4MPIhistoMerger
G4MPIhistoMerger()
Definition:
G4MPIhistoMerger.cc:37
G4MPIhistoMerger.hh
G4int
int G4int
Definition:
G4Types.hh:78
G4cout
G4GLOB_DLL std::ostream G4cout
G4MPIhistoMerger::verboseLevel
G4int verboseLevel
Definition:
G4MPIhistoMerger.hh:55
다음에 의해 생성됨 :
1.8.5