Permalink
Browse files

Extend lifetime of boost::mpi::detail::mpi_datatype_cache

  • Loading branch information...
1 parent fb42f1d commit ef000953d6cc31900d0179fe9122ca69ddb4cc90 @mkuron mkuron committed Feb 16, 2017
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/core/communication.cpp
@@ -278,6 +278,12 @@ void mpi_init(int *argc, char ***argv) {
}
ErrorHandling::init_error_handling(mpiCallbacks());
+
+ /* Create the datatype cache before registering atexit(mpi_stop). This is
+ necessary as it is a static variable that would otherwise be destructed
+ before mpi_stop is called. mpi_stop however needs to communicate and thus
+ depends on the cache. */
+ boost::mpi::detail::mpi_datatype_cache();
}
void mpi_reshape_communicator(std::array<int, 3> const &node_grid,

0 comments on commit ef00095

Please sign in to comment.