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
cc4957c0
Commit
cc4957c0
authored
8 years ago
by
wfg
Browse files
Options
Downloads
Patches
Plain Diff
Updating ADIOS.cpp for MPI testing
parent
eab9abec
No related branches found
No related tags found
1 merge request
!8
Integrate groupless
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ADIOS.cpp
+33
-24
33 additions, 24 deletions
src/ADIOS.cpp
with
33 additions
and
24 deletions
src/ADIOS.cpp
+
33
−
24
View file @
cc4957c0
/*
/*
*
C
ADIOS.cpp
* ADIOS.cpp
*
*
* Created on: Sep 29, 2016
* Created on: Sep 29, 2016
* Author: William F Godoy
* Author: William F Godoy
...
@@ -7,56 +7,70 @@
...
@@ -7,56 +7,70 @@
*/
*/
#include
<fstream>
#include
<fstream>
#include
<iostream>
#include
"
include/C
ADIOS.h"
#include
"ADIOS.h"
namespace
adios
namespace
adios
{
{
//here assign default values of non-primitives
//here assign default values of non-primitives
C
ADIOS
::
C
ADIOS
(
)
ADIOS
::
ADIOS
(
)
{
}
{
}
C
ADIOS
::
C
ADIOS
(
const
std
::
string
xmlConfigFile
)
:
ADIOS
::
ADIOS
(
const
std
::
string
xmlConfigFile
)
:
m_XMLConfigFile
(
xmlConfigFile
)
m_XMLConfigFile
{
xmlConfigFile
}
{
}
{
}
CADIOS
::
CADIOS
(
const
std
::
string
xmlConfigFile
,
const
MPI_Comm
&
mpiComm
)
:
//#ifdef USE_MPI
m_XMLConfigFile
(
xmlConfigFile
),
ADIOS
::
ADIOS
(
const
std
::
string
xmlConfigFile
,
const
MPI_Comm
&
mpiComm
)
:
m_IsUsingMPI
(
true
),
m_XMLConfigFile
{
xmlConfigFile
},
m_MPIComm
(
mpiComm
)
m_IsUsingMPI
{
true
},
m_MPIComm
{
mpiComm
}
{
}
{
}
//#endif
void
C
ADIOS
::
Init
(
)
void
ADIOS
::
Init
(
)
{
{
if
(
m_IsUsingMPI
==
false
)
if
(
m_IsUsingMPI
==
false
&&
m_XMLConfigFile
.
empty
()
==
false
)
{
{
Init
Serial
(
);
Init
NoMPI
(
);
}
}
else
else
{
{
//#ifdef USE_MPI
InitMPI
(
);
InitMPI
(
);
//#endif
}
}
}
}
void
C
ADIOS
::
Init
Serial
(
)
void
ADIOS
::
Init
NoMPI
(
)
{
{
ReadXMLConfigFile
(
);
ReadXMLConfigFile
(
);
}
}
//#ifdef USE_MPI
void
C
ADIOS
::
InitMPI
(
)
void
ADIOS
::
InitMPI
(
)
{
{
//here just say hello from MPI processes
int
size
;
MPI_Comm_size
(
*
m_MPIComm
,
&
size
);
int
rank
;
MPI_Comm_rank
(
*
m_MPIComm
,
&
rank
);
std
::
cout
<<
" Hello World from processor "
<<
rank
<<
"/"
<<
size
<<
"
\n
"
;
}
}
//#endif
void
C
ADIOS
::
ReadXMLConfigFile
(
)
void
ADIOS
::
ReadXMLConfigFile
(
)
{
{
std
::
ifstream
xmlConfigStream
(
m_XMLConfigFile
);
std
::
ifstream
xmlConfigStream
(
m_XMLConfigFile
);
...
@@ -66,21 +80,16 @@ void CADIOS::ReadXMLConfigFile( )
...
@@ -66,21 +80,16 @@ void CADIOS::ReadXMLConfigFile( )
"Check permissions or file existence
\n
"
);
"Check permissions or file existence
\n
"
);
throw
std
::
ios_base
::
failure
(
errorMessage
);
throw
std
::
ios_base
::
failure
(
errorMessage
);
}
}
//here fill SMetadata...
xmlConfigStream
.
close
();
}
}
}
//end namespace
}
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