diff --git a/examples/msim.cpp b/examples/msim.cpp
index 7c8ca332c..cc297e498 100644
--- a/examples/msim.cpp
+++ b/examples/msim.cpp
@@ -17,12 +17,37 @@
along with OPM. If not, see .
*/
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+
#include
-
int main(int argc, char** argv) {
- Opm::msim msim(argv[1]);
- msim.run();
+ std::string deck_file = argv[1];
+ Opm::Parser parser;
+ Opm::ParseContext parse_context;
+ Opm::ErrorGuard error_guard;
+
+ Opm::Deck deck = parser.parseFile(deck_file, parse_context, error_guard);
+ Opm::EclipseState state(deck, parse_context, error_guard);
+ Opm::Schedule schedule(deck, state.getInputGrid(), state.get3DProperties(), state.runspec(), parse_context, error_guard);
+ Opm::SummaryConfig summary_config(deck, schedule, state.getTableManager(), parse_context, error_guard);
+
+ if (error_guard) {
+ error_guard.dump();
+ error_guard.terminate();
+ }
+
+ Opm::msim msim(state);
+ Opm::EclipseIO io(state, state.getInputGrid(), schedule, summary_config);
+ msim.run(schedule, io);
}
diff --git a/msim/include/opm/msim/msim.hpp b/msim/include/opm/msim/msim.hpp
index cc5be2dd1..606ca7406 100644
--- a/msim/include/opm/msim/msim.hpp
+++ b/msim/include/opm/msim/msim.hpp
@@ -5,6 +5,7 @@
#include
#include