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
679798eb
Commit
679798eb
authored
Mar 03, 2020
by
Nick
Browse files
Prevent hang when throwing out of adios constructor in MPI.
parent
dab81f1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
source/adios2/core/ADIOS.cpp
View file @
679798eb
...
...
@@ -11,7 +11,8 @@
#include
"ADIOS.h"
#include
<algorithm>
// std::transform
#include
<ios>
//std::ios_base::failure
#include
<fstream>
#include
<ios>
//std::ios_base::failure
#include
"adios2/core/IO.h"
#include
"adios2/helper/adiosCommDummy.h"
...
...
@@ -64,6 +65,12 @@ ADIOS::ADIOS(const std::string configFile, helper::Comm comm,
{
if
(
!
configFile
.
empty
())
{
std
::
ifstream
f
(
configFile
.
c_str
());
if
(
!
f
.
good
())
{
throw
std
::
logic_error
(
"Config file "
+
configFile
+
" passed to ADIOS does not exist."
);
}
if
(
helper
::
EndsWith
(
configFile
,
".xml"
))
{
XMLInit
(
configFile
);
...
...
testing/adios2/engine/bp/CMakeLists.txt
View file @
679798eb
...
...
@@ -40,9 +40,10 @@ bp3_bp4_gtest_add_tests_helper(ChangingShape)
bp3_bp4_gtest_add_tests_helper
(
WriteReadBlockInfo
)
bp3_bp4_gtest_add_tests_helper
(
WriteReadVariableSpan
)
bp3_bp4_gtest_add_tests_helper
(
TimeAggregation
)
bp3_bp4_gtest_add_tests_helper
(
NoXMLRecovery
)
if
(
ADIOS2_HAVE_MPI
)
bp3_bp4_gtest_add_tests_helper
(
WriteAggregateRead
)
bp3_bp4_gtest_add_tests_helper
(
WriteAggregateRead
)
endif
()
# BP3 only for now
...
...
testing/adios2/engine/bp/TestBPNoXMLRecovery.cpp
0 → 100644
View file @
679798eb
#include
<iostream>
#include
<vector>
#include
<adios2.h>
#include
<mpi.h>
int
main
(
int
argc
,
char
*
argv
[])
{
int
rank
=
0
;
int
size
=
1
;
#ifdef ADIOS2_HAVE_MPI
MPI_Init
(
&
argc
,
&
argv
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
size
);
#endif
adios2
::
ADIOS
ad
;
try
{
ad
=
adios2
::
ADIOS
(
"does_not_exist.xml"
,
MPI_COMM_WORLD
,
adios2
::
DebugON
);
}
catch
(
std
::
exception
&
e
)
{
if
(
rank
==
0
)
{
std
::
cout
<<
e
.
what
()
<<
"
\n
"
;
}
ad
=
adios2
::
ADIOS
(
MPI_COMM_WORLD
,
adios2
::
DebugON
);
}
#ifdef ADIOS2_HAVE_MPI
return
MPI_Finalize
();
#endif
}
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