Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADIOS2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Podhorszki, Norbert
ADIOS2
Commits
19bebb15
Commit
19bebb15
authored
7 years ago
by
Ruonan Wang
Committed by
Atkins, Charles Vernon
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed multistep example for no-mpi by adding extra ifdef's
parent
8cd6c95f
No related branches found
No related tags found
1 merge request
!111
Fixed multistep example for no-mpi by adding extra ifdef's
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/experimental/multistep/reader_allsteps.cpp
+17
-0
17 additions, 0 deletions
examples/experimental/multistep/reader_allsteps.cpp
with
17 additions
and
0 deletions
examples/experimental/multistep/reader_allsteps.cpp
+
17
−
0
View file @
19bebb15
...
...
@@ -191,7 +191,9 @@ int main(int argc, char *argv[])
if
(
rank
==
0
)
Print2DArray
(
Nparts
,
vNparts
->
GetNSteps
(),
Nwriters
,
"Nparts"
);
Delete2DArray
(
Nparts
);
#ifdef ADIOS2_HAVE_MPI
MPI_Barrier
(
MPI_COMM_WORLD
);
#endif
/*
* GlobalArrayFixedDims
...
...
@@ -227,19 +229,28 @@ int main(int argc, char *argv[])
vGlobalArrayFixedDims
->
SetStepSelection
(
0
,
vGlobalArrayFixedDims
->
GetNSteps
());
bpReader
->
Read
<
double
>
(
*
vGlobalArrayFixedDims
,
GlobalArrayFixedDims
[
0
]);
#ifdef ADIOS2_HAVE_MPI
MPI_Barrier
(
MPI_COMM_WORLD
);
MPI_Status
status
;
#endif
int
token
=
0
;
#ifdef ADIOS2_HAVE_MPI
if
(
rank
>
0
)
MPI_Recv
(
&
token
,
1
,
MPI_INT
,
rank
-
1
,
0
,
MPI_COMM_WORLD
,
&
status
);
std
::
cout
<<
"Rank "
<<
rank
<<
" read start = "
<<
start
<<
" count = "
<<
count
<<
std
::
endl
;
#endif
Print2DArray
(
GlobalArrayFixedDims
,
vGlobalArrayFixedDims
->
GetNSteps
(),
count
,
"GlobalArrayFixedDims"
);
#ifdef ADIOS2_HAVE_MPI
if
(
rank
<
nproc
-
1
)
MPI_Send
(
&
token
,
1
,
MPI_INT
,
rank
+
1
,
0
,
MPI_COMM_WORLD
);
#endif
Delete2DArray
(
GlobalArrayFixedDims
);
#ifdef ADIOS2_HAVE_MPI
MPI_Barrier
(
MPI_COMM_WORLD
);
#endif
/*
* LocalArrayFixedDims
...
...
@@ -256,7 +267,9 @@ int main(int argc, char *argv[])
}
std
::
cout
<<
"LocalArrayFixedDims is irregular. Cannot read this "
"variable yet...
\n
"
;
#ifdef ADIOS2_HAVE_MPI
MPI_Barrier
(
MPI_COMM_WORLD
);
#endif
/*
* LocalArrayFixedDimsJoined
...
...
@@ -282,7 +295,9 @@ int main(int argc, char *argv[])
vLocalArrayFixedDimsJoined
->
m_Shape
[
0
],
"LocalArrayFixedDimsJoined"
);
Delete2DArray
(
LocalArrayFixedDimsJoined
);
#ifdef ADIOS2_HAVE_MPI
MPI_Barrier
(
MPI_COMM_WORLD
);
#endif
/*
* GlobalArray which changes size over time
...
...
@@ -299,7 +314,9 @@ int main(int argc, char *argv[])
"dimension is supposed to be adios::IrregularDim indicating an "
"Irregular array
\n
"
);
}
#ifdef ADIOS2_HAVE_MPI
MPI_Barrier
(
MPI_COMM_WORLD
);
#endif
// Close file/stream
bpReader
->
Close
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment