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
1e7fd8f8
Unverified
Commit
1e7fd8f8
authored
Mar 03, 2020
by
Atkins, Charles Vernon
Committed by
GitHub
Mar 03, 2020
Browse files
Merge pull request #2013 from NAThompson/prevent_hang
Prevent hang when throwing out of adios constructor in MPI.
parents
ec31a361
bcb9cfc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
source/adios2/core/ADIOS.cpp
View file @
1e7fd8f8
...
...
@@ -11,11 +11,13 @@
#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"
#include
"adios2/helper/adiosFunctions.h"
//InquireKey, BroadcastFile
#include
<adios2sys/SystemTools.hxx>
// OPERATORS
...
...
@@ -64,6 +66,11 @@ ADIOS::ADIOS(const std::string configFile, helper::Comm comm,
{
if
(
!
configFile
.
empty
())
{
if
(
!
adios2sys
::
SystemTools
::
FileExists
(
configFile
))
{
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 @
1e7fd8f8
...
...
@@ -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 @
1e7fd8f8
#include
<iostream>
#include
<vector>
#include
<adios2.h>
#ifdef ADIOS2_HAVE_MPI
#include
<mpi.h>
#endif
int
main
(
int
argc
,
char
*
argv
[])
{
int
rank
=
0
;
#ifdef ADIOS2_HAVE_MPI
MPI_Init
(
&
argc
,
&
argv
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
#endif
adios2
::
ADIOS
ad
;
try
{
#ifdef ADIOS2_HAVE_MPI
ad
=
adios2
::
ADIOS
(
"does_not_exist.xml"
,
MPI_COMM_WORLD
,
adios2
::
DebugON
);
#else
ad
=
adios2
::
ADIOS
(
"does_not_exist.xml"
,
adios2
::
DebugON
);
#endif
}
catch
(
std
::
exception
&
e
)
{
if
(
rank
==
0
)
{
std
::
cout
<<
e
.
what
()
<<
"
\n
"
;
}
#ifdef ADIOS2_HAVE_MPI
ad
=
adios2
::
ADIOS
(
MPI_COMM_WORLD
,
adios2
::
DebugON
);
#else
ad
=
adios2
::
ADIOS
(
adios2
::
DebugON
);
#endif
}
#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