OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
optimizer
Util
Trace
MyPid.h
Go to the documentation of this file.
1
//
2
// Class MyPid
3
//
4
// Copyright (c) 2010 - 2013, Yves Ineichen, ETH Zürich
5
// All rights reserved
6
//
7
// Implemented as part of the PhD thesis
8
// "Toward massively parallel multi-objective optimization with application to
9
// particle accelerators" (https://doi.org/10.3929/ethz-a-009792359)
10
//
11
// This file is part of OPAL.
12
//
13
// OPAL is free software: you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation, either version 3 of the License, or
16
// (at your option) any later version.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20
//
21
#include "
Util/Trace/TraceComponent.h
"
22
23
#include "mpi.h"
24
25
class
MyPid
:
public
TraceComponent
{
26
27
public
:
28
29
30
MyPid
(std::string
name
, MPI_Comm comm)
31
:
TraceComponent
(name)
32
{
33
mypid_
= 0;
34
MPI_Comm_rank(comm, &
mypid_
);
35
}
36
37
void
execute
(std::ostringstream &dump) {
38
dump <<
mypid_
;
39
}
40
41
private
:
42
43
int
mypid_
;
44
45
};
TraceComponent
Definition:
TraceComponent.h:27
MyPid
Definition:
MyPid.h:25
TraceComponent.h
MyPid::MyPid
MyPid(std::string name, MPI_Comm comm)
Definition:
MyPid.h:30
MyPid::mypid_
int mypid_
Definition:
MyPid.h:43
MyPid::execute
void execute(std::ostringstream &dump)
Definition:
MyPid.h:37
name
const std::string name
Definition:
MaxNormRadialPeak.cpp:32
Generated on Tue Jul 2 2024 15:05:17 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5