Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Podhorszki, Norbert
ADIOS2
Commits
554a756f
Commit
554a756f
authored
Sep 19, 2019
by
Brad King
Browse files
utils: Port adios_reorganize to Comm encapsulation
parent
c3991a25
Changes
2
Hide whitespace changes
Inline
Side-by-side
source/utils/adios_reorganize/Reorganize.cpp
View file @
554a756f
...
...
@@ -29,6 +29,8 @@
#include
"adios2/core/ADIOS.h"
#include
"adios2/core/Engine.h"
#include
"adios2/core/IO.h"
#include
"adios2/helper/adiosComm.h"
#include
"adios2/helper/adiosCommMPI.h"
#include
"adios2/helper/adiosFunctions.h"
#include
"adios2/helper/adiosString.h"
...
...
@@ -44,9 +46,12 @@ namespace utils
Reorganize
::
Reorganize
(
int
argc
,
char
*
argv
[])
:
Utils
(
"adios_reorganize"
,
argc
,
argv
)
{
MPI_Comm_split
(
MPI_COMM_WORLD
,
m_MPISplitColor
,
0
,
&
m_Comm
);
MPI_Comm_rank
(
m_Comm
,
&
m_Rank
);
MPI_Comm_size
(
m_Comm
,
&
m_Size
);
{
auto
commWorld
=
helper
::
CommFromMPI
(
MPI_COMM_WORLD
);
m_Comm
=
commWorld
.
Split
(
m_CommSplitColor
,
0
);
}
m_Rank
=
m_Comm
.
Rank
();
m_Size
=
m_Comm
.
Size
();
if
(
argc
<
5
)
{
...
...
@@ -118,11 +123,7 @@ void Reorganize::Run()
print0
(
"Write method = "
,
wmethodname
);
print0
(
"Write method parameters = "
,
wmethodparam_str
);
#ifdef ADIOS2_HAVE_MPI
core
::
ADIOS
adios
(
m_Comm
,
true
,
"C++"
);
#else
core
::
ADIOS
adios
(
true
,
"C++"
);
#endif
core
::
ADIOS
adios
(
CommAsMPI
(
m_Comm
),
true
,
"C++"
);
core
::
IO
&
io
=
adios
.
DeclareIO
(
"group"
);
print0
(
"Waiting to open stream "
,
infilename
,
"..."
);
...
...
source/utils/adios_reorganize/Reorganize.h
View file @
554a756f
...
...
@@ -13,6 +13,7 @@
#include
"adios2.h"
#include
"adios2/core/IO.h"
// DataMap
#include
"adios2/helper/adiosComm.h"
#include
"utils/Utils.h"
namespace
adios2
...
...
@@ -40,7 +41,7 @@ public:
void
Run
()
final
;
private:
static
const
int
m_
MPI
SplitColor
=
23731
;
// color in
MPI_Split_comm
() call
static
const
int
m_
Comm
SplitColor
=
23731
;
// color in
Comm::Split
() call
static
const
std
::
string
m_HelpMessage
;
static
const
Params
m_Options
;
...
...
@@ -84,7 +85,7 @@ private:
// Global variables
int
m_Rank
=
0
;
int
m_Size
=
1
;
MPI_
Comm
m_Comm
;
helper
::
Comm
m_Comm
;
// Read/write method parameters
Params
rmethodparams
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment