Skip to content
Snippets Groups Projects
Commit 1453bdba authored by William F Godoy's avatar William F Godoy
Browse files

Fixing DataMan reader and adding Engine creation exception

parent 735faa2a
No related branches found
No related tags found
1 merge request!124Refactor
......@@ -42,13 +42,13 @@ int main(int argc, char *argv[])
adios::ADIOS adios(adios::DebugON);
adios::IO &dataManIO = adios.DeclareIO("WAN");
dataManIO.SetEngine("DataMan");
dataManIO.SetEngine("DataManReader");
dataManIO.SetParameters("real_time=yes", "method_type=stream",
"method=dump");
auto dataManReader =
dataManIO.Open("myDoubles.bp", adios::OpenMode::Read);
if (dataManReader == nullptr)
if (!dataManReader)
{
throw std::ios_base::failure(
"ERROR: failed to create DataMan I/O engine at Open\n");
......
......@@ -198,6 +198,17 @@ std::shared_ptr<Engine> IO::Open(const std::string &name,
"HDF5 library, can't use HDF5\n");
#endif
}
else
{
if (m_DebugMode)
{
throw std::invalid_argument("ERROR: engine " + m_EngineType +
" not supported, IO SetEngine must add "
"a supported engine, in call to "
"Open\n");
}
}
return engine;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment