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
2003879c
Commit
2003879c
authored
7 years ago
by
Wang, Ruonan
Browse files
Options
Downloads
Patches
Plain Diff
Added entry in DataManWriter engine for bp format
parent
055634d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!340
for BP buffer over WAN
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/adios2/engine/dataman/DataManWriter.h
+1
-0
1 addition, 0 deletions
source/adios2/engine/dataman/DataManWriter.h
source/adios2/engine/dataman/DataManWriter.tcc
+23
-19
23 additions, 19 deletions
source/adios2/engine/dataman/DataManWriter.tcc
with
24 additions
and
19 deletions
source/adios2/engine/dataman/DataManWriter.h
+
1
−
0
View file @
2003879c
...
@@ -33,6 +33,7 @@ public:
...
@@ -33,6 +33,7 @@ public:
void
Close
(
const
int
transportIndex
=
-
1
)
final
;
void
Close
(
const
int
transportIndex
=
-
1
)
final
;
private:
private:
std
::
string
m_UseFormat
=
"json"
;
bool
m_DoRealTime
=
false
;
bool
m_DoRealTime
=
false
;
bool
m_DoMonitor
=
false
;
bool
m_DoMonitor
=
false
;
transportman
::
DataMan
m_Man
;
transportman
::
DataMan
m_Man
;
...
...
This diff is collapsed.
Click to expand it.
source/adios2/engine/dataman/DataManWriter.tcc
+
23
−
19
View file @
2003879c
...
@@ -22,13 +22,8 @@ namespace adios2
...
@@ -22,13 +22,8 @@ namespace adios2
template <class T>
template <class T>
void DataManWriter::PutSyncCommon(Variable<T> &variable, const T *values)
void DataManWriter::PutSyncCommon(Variable<T> &variable, const T *values)
{
{
// here comes your magic at Writing now variable.m_UserValues has the
// data
// passed by the user
// set variable
variable.SetData(values);
// This part will go away, this is just to monitor variables per rank
variable.SetData(values);
if (variable.m_Shape.empty())
if (variable.m_Shape.empty())
{
{
...
@@ -43,19 +38,28 @@ void DataManWriter::PutSyncCommon(Variable<T> &variable, const T *values)
...
@@ -43,19 +38,28 @@ void DataManWriter::PutSyncCommon(Variable<T> &variable, const T *values)
variable.m_Start.assign(variable.m_Count.size(), 0);
variable.m_Start.assign(variable.m_Count.size(), 0);
}
}
nlohmann::json jmsg;
if(m_UseFormat == "json"){
jmsg["doid"] = m_Name;
jmsg["var"] = variable.m_Name;
nlohmann::json jmsg;
jmsg["dtype"] = GetType<T>();
jmsg["doid"] = m_Name;
jmsg["putshape"] = variable.m_Count;
jmsg["var"] = variable.m_Name;
jmsg["varshape"] = variable.m_Shape;
jmsg["dtype"] = GetType<T>();
jmsg["offset"] = variable.m_Start;
jmsg["putshape"] = variable.m_Count;
jmsg["timestep"] = 0;
jmsg["varshape"] = variable.m_Shape;
jmsg["bytes"] =
jmsg["offset"] = variable.m_Start;
std::accumulate(variable.m_Shape.begin(), variable.m_Shape.end(),
jmsg["timestep"] = 0;
sizeof(T), std::multiplies<size_t>());
jmsg["bytes"] =
std::accumulate(variable.m_Shape.begin(), variable.m_Shape.end(),
m_Man.WriteWAN(values, jmsg);
sizeof(T), std::multiplies<size_t>());
m_Man.WriteWAN(values, jmsg);
}
if(m_UseFormat == "bp"){
// add bp serialization
}
if (m_DoMonitor)
if (m_DoMonitor)
{
{
...
...
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