Repository: multiscale/muscle3 (language: python)

Issue:
Program SEGFAULTS when linking against both libmuscle_mpi and libmuscle
When a C++ or Fortran program is targeting the `mpi` version of libmuscle, but links against both the mpi and regular shared library, SEGFAULTS or other undefined behaviour may happen.

When linking with `-lmuscle -lmuscle_mpi` (in that order!), the following happens:
- When constructing the instance, the call signature (with `MPI_Comm` and `root` arguments) is only provided by the `mpi` library, so the muscle instance is created by the `mpi` enabled version of the library
- When calling other methods of the public API, both `libmuscle.so` and `libmuscle_mpi.so` provide an implementation. Since `-lmuscle` was provided first when linking, the non-MPI implementation provided by `libmuscle.so` is used! Since the non-MPI library has a different memory layout of the Instance object (it doesn't have the MPI members), this will likely trigger a SEGFAULT, undefined behaviour, or more subtle bugs.

Suggested solution:
- Implement the MPI constructor signature in the non-MPI version (and vice-versa), and make them throw a runtime error.


Discussion / hints:
Note: documentation https://muscle3.readthedocs.io/en/latest/installing.html should also be updated to include a note or warning against combining `libmuscle` and `libmuscle_mpi`
I think I would prefer having different symbol names, so that this fails at link time rather than at runtime. If it doesn't get linked correctly, then anything can happen at runtime and that's a little too shaky.

For C++, we could rename the `libmuscle::impl` namespace to `libmuscle::impl_mpi` for the MPI version of the library, that should give an error message that hints at what's wrong. This will still leave the symbols outside of `Instance` duplicated (e.g. `Message` and `Data`), so that linking against both libraries could still get them confused, but they don't use MPI so they're identical and that should hopefully work anyway. I don't think there's much else we can do at link time.

For Fortran, we could achieve a similar result by changing the names of the exported C functions; those names are hidden from the user so it won't change the API, but they are what gets linked against, so you get an error about `LIBMUSCLE_MPI_Instance_create_` not being found and that should give a hint.

Fix patch:
diff --git a/libmuscle/cpp/build/libmuscle/Makefile b/libmuscle/cpp/build/libmuscle/Makefile
index d85d53b5..0ecefd1e 100644
--- a/libmuscle/cpp/build/libmuscle/Makefile
+++ b/libmuscle/cpp/build/libmuscle/Makefile
@@ -45,7 +45,7 @@ public_headers := libmuscle/data.hpp libmuscle/data.tpp libmuscle/instance.hpp
 public_headers += libmuscle/libmuscle.hpp libmuscle/mcp/data_pack.hpp
 public_headers += libmuscle/mcp/data_pack.tpp libmuscle/message.hpp
 public_headers += libmuscle/ports_description.hpp libmuscle/util.hpp libmuscle/util.tpp
-public_headers += libmuscle/version.h
+public_headers += libmuscle/version.h libmuscle/namespace.hpp
 installed_headers := $(public_headers:%=$(PREFIX)/include/%)
 
 pkg_config_files := libmuscle.pc
diff --git a/libmuscle/cpp/build/libmuscle/libmuscle_mpi.version b/libmuscle/cpp/build/libmuscle/libmuscle_mpi.version
index 48de674d..6848b3bf 100644
--- a/libmuscle/cpp/build/libmuscle/libmuscle_mpi.version
+++ b/libmuscle/cpp/build/libmuscle/libmuscle_mpi.version
@@ -1,377 +1,377 @@
 {
     global:
         extern "C++" {
-            libmuscle::impl::Instance::Instance*;
-            "libmuscle::impl::Instance::~Instance()";
-            libmuscle::impl::Instance::reuse_instance*;
-            libmuscle::impl::Instance::error_shutdown*;
-            libmuscle::impl::Instance::set_port_length*;
-            libmuscle::impl::Instance::get_port_length*;
-            libmuscle::impl::Instance::is_connected*;
-            libmuscle::impl::Instance::is_resizable*;
-            libmuscle::impl::Instance::is_vector_port*;
-            libmuscle::impl::Instance::list_ports*;
-            libmuscle::impl::Instance::get_setting*;
-            "bool libmuscle::impl::Instance::get_setting_as<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "bool libmuscle::impl::Instance::get_setting_as<bool>(std::string const&) const";
-            "int64_t libmuscle::impl::Instance::get_setting_as<int64_t>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "int64_t libmuscle::impl::Instance::get_setting_as<int64_t>(std::string const&) const";
-            "int libmuscle::impl::Instance::get_setting_as<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "int libmuscle::impl::Instance::get_setting_as<int>(std::string const&) const";
-            "long libmuscle::impl::Instance::get_setting_as<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "long libmuscle::impl::Instance::get_setting_as<long>(std::string const&) const";
-            "long long libmuscle::impl::Instance::get_setting_as<long long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "long long libmuscle::impl::Instance::get_setting_as<long long>(std::string const&) const";
-            "double libmuscle::impl::Instance::get_setting_as<double>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "double libmuscle::impl::Instance::get_setting_as<double>(std::string const&) const";
-            "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > libmuscle::impl::Instance::get_setting_as<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "std::string libmuscle::impl::Instance::get_setting_as<std::string>(std::string const&) const";
-            "std::vector<double, std::allocator<double> > libmuscle::impl::Instance::get_setting_as<std::vector<double, std::allocator<double> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "std::vector<double, std::allocator<double> > libmuscle::impl::Instance::get_setting_as<std::vector<double, std::allocator<double> > >(std::string const&) const";
-            "std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > libmuscle::impl::Instance::get_setting_as<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > libmuscle::impl::Instance::get_setting_as<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > >(std::string const&) const";
-            libmuscle::impl::Instance::receive_with_settings*;
-            libmuscle::impl::Instance::receive*;
-            libmuscle::impl::Instance::send*;
-            libmuscle::impl::Instance::resuming*;
-            libmuscle::impl::Instance::load_snapshot*;
-            libmuscle::impl::Instance::should_init*;
-            libmuscle::impl::Instance::should_save_snapshot*;
-            libmuscle::impl::Instance::save_snapshot*;
-            libmuscle::impl::Instance::should_save_final_snapshot*;
-            libmuscle::impl::Instance::save_final_snapshot*;
+            libmuscle::mpi_impl::Instance::Instance*;
+            "libmuscle::mpi_impl::Instance::~Instance()";
+            libmuscle::mpi_impl::Instance::reuse_instance*;
+            libmuscle::mpi_impl::Instance::error_shutdown*;
+            libmuscle::mpi_impl::Instance::set_port_length*;
+            libmuscle::mpi_impl::Instance::get_port_length*;
+            libmuscle::mpi_impl::Instance::is_connected*;
+            libmuscle::mpi_impl::Instance::is_resizable*;
+            libmuscle::mpi_impl::Instance::is_vector_port*;
+            libmuscle::mpi_impl::Instance::list_ports*;
+            libmuscle::mpi_impl::Instance::get_setting*;
+            "bool libmuscle::mpi_impl::Instance::get_setting_as<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "bool libmuscle::mpi_impl::Instance::get_setting_as<bool>(std::string const&) const";
+            "int64_t libmuscle::mpi_impl::Instance::get_setting_as<int64_t>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "int64_t libmuscle::mpi_impl::Instance::get_setting_as<int64_t>(std::string const&) const";
+            "int libmuscle::mpi_impl::Instance::get_setting_as<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "int libmuscle::mpi_impl::Instance::get_setting_as<int>(std::string const&) const";
+            "long libmuscle::mpi_impl::Instance::get_setting_as<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "long libmuscle::mpi_impl::Instance::get_setting_as<long>(std::string const&) const";
+            "long long libmuscle::mpi_impl::Instance::get_setting_as<long long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "long long libmuscle::mpi_impl::Instance::get_setting_as<long long>(std::string const&) const";
+            "double libmuscle::mpi_impl::Instance::get_setting_as<double>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "double libmuscle::mpi_impl::Instance::get_setting_as<double>(std::string const&) const";
+            "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > libmuscle::mpi_impl::Instance::get_setting_as<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "std::string libmuscle::mpi_impl::Instance::get_setting_as<std::string>(std::string const&) const";
+            "std::vector<double, std::allocator<double> > libmuscle::mpi_impl::Instance::get_setting_as<std::vector<double, std::allocator<double> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "std::vector<double, std::allocator<double> > libmuscle::mpi_impl::Instance::get_setting_as<std::vector<double, std::allocator<double> > >(std::string const&) const";
+            "std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > libmuscle::mpi_impl::Instance::get_setting_as<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > libmuscle::mpi_impl::Instance::get_setting_as<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > >(std::string const&) const";
+            libmuscle::mpi_impl::Instance::receive_with_settings*;
+            libmuscle::mpi_impl::Instance::receive*;
+            libmuscle::mpi_impl::Instance::send*;
+            libmuscle::mpi_impl::Instance::resuming*;
+            libmuscle::mpi_impl::Instance::load_snapshot*;
+            libmuscle::mpi_impl::Instance::should_init*;
+            libmuscle::mpi_impl::Instance::should_save_snapshot*;
+            libmuscle::mpi_impl::Instance::save_snapshot*;
+            libmuscle::mpi_impl::Instance::should_save_final_snapshot*;
+            libmuscle::mpi_impl::Instance::save_final_snapshot*;
 
-            libmuscle::impl::Message::*;
+            libmuscle::mpi_impl::Message::*;
 
-            "libmuscle::impl::DataConstRef::DataConstRef()";
-            "libmuscle::impl::DataConstRef::DataConstRef(bool)";
-            "libmuscle::impl::DataConstRef::DataConstRef(char const*)";
-            "libmuscle::impl::DataConstRef::DataConstRef(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)";
-            "libmuscle::impl::DataConstRef::DataConstRef(std::string const&)";
-            "libmuscle::impl::DataConstRef::DataConstRef(int)";
-            "libmuscle::impl::DataConstRef::DataConstRef(long)";
-            "libmuscle::impl::DataConstRef::DataConstRef(long long)";
-            "libmuscle::impl::DataConstRef::DataConstRef(unsigned int)";
-            "libmuscle::impl::DataConstRef::DataConstRef(unsigned long)";
-            "libmuscle::impl::DataConstRef::DataConstRef(unsigned long long)";
-            "libmuscle::impl::DataConstRef::DataConstRef(float)";
-            "libmuscle::impl::DataConstRef::DataConstRef(double)";
-            "libmuscle::impl::DataConstRef::DataConstRef(ymmsl::impl::SettingValue const&)";
-            "libmuscle::impl::DataConstRef::DataConstRef(ymmsl::impl::Settings const&)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<bool>(bool const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<bool>(bool const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<double>(double const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<double>(double const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<float>(float const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<float>(float const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<int>(int const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<int>(int const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<long>(long const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid<long>(long const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::DataConstRef::reseat(libmuscle::impl::DataConstRef const&)";
-            "libmuscle::impl::DataConstRef::size() const";
-            "bool libmuscle::impl::DataConstRef::is_a<bool>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<char>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<double>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<float>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<unsigned char>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<int>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<unsigned int>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<ymmsl::impl::SettingValue>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<ymmsl::impl::Settings>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >() const";
-            "bool libmuscle::impl::DataConstRef::is_a<std::string>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<short>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<unsigned short>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<long long>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<unsigned long long>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<long>() const";
-            "bool libmuscle::impl::DataConstRef::is_a<unsigned long>() const";
-            "libmuscle::impl::DataConstRef::is_a_dict() const";
-            "libmuscle::impl::DataConstRef::is_a_list() const";
-            "bool libmuscle::impl::DataConstRef::is_a_grid_of<bool>() const";
-            "bool libmuscle::impl::DataConstRef::is_a_grid_of<double>() const";
-            "bool libmuscle::impl::DataConstRef::is_a_grid_of<float>() const";
-            "bool libmuscle::impl::DataConstRef::is_a_grid_of<int>() const";
-            "bool libmuscle::impl::DataConstRef::is_a_grid_of<long>() const";
-            "libmuscle::impl::DataConstRef::is_a_byte_array() const";
-            "libmuscle::impl::DataConstRef::is_nil() const";
-            "libmuscle::impl::DataConstRef::as_byte_array() const";
-            "ymmsl::impl::SettingValue libmuscle::impl::DataConstRef::as<ymmsl::impl::SettingValue>() const";
-            "ymmsl::impl::Settings libmuscle::impl::DataConstRef::as<ymmsl::impl::Settings>() const";
-            "libmuscle::impl::DataConstRef::operator[](unsigned long) const";
-            "libmuscle::impl::DataConstRef::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
-            "libmuscle::impl::DataConstRef::operator[](std::string const&) const";
-            "libmuscle::impl::DataConstRef::key(unsigned long) const";
-            "libmuscle::impl::DataConstRef::value(unsigned long) const";
-            "bool const* libmuscle::impl::DataConstRef::elements<bool>() const";
-            "double const* libmuscle::impl::DataConstRef::elements<double>() const";
-            "float const* libmuscle::impl::DataConstRef::elements<float>() const";
-            "int const* libmuscle::impl::DataConstRef::elements<int>() const";
-            "long const* libmuscle::impl::DataConstRef::elements<long>() const";
-            "libmuscle::impl::DataConstRef::has_indexes() const";
-            "libmuscle::impl::DataConstRef::indexes[abi:cxx11]() const";
-            "libmuscle::impl::DataConstRef::shape() const";
-            "libmuscle::impl::DataConstRef::storage_order() const";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef()";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(bool)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(char const*)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(std::string const&)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(int)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(long)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(long long)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(unsigned int)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(unsigned long)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(unsigned long long)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(float)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(double)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(ymmsl::mpi_impl::SettingValue const&)";
+            "libmuscle::mpi_impl::DataConstRef::DataConstRef(ymmsl::mpi_impl::Settings const&)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<bool>(bool const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<bool>(bool const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<double>(double const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<double>(double const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<float>(float const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<float>(float const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<int>(int const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<int>(int const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<long>(long const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef libmuscle::mpi_impl::DataConstRef::grid<long>(long const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::DataConstRef::reseat(libmuscle::mpi_impl::DataConstRef const&)";
+            "libmuscle::mpi_impl::DataConstRef::size() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<bool>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<char>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<double>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<float>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<unsigned char>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<int>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<unsigned int>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<ymmsl::mpi_impl::SettingValue>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<ymmsl::mpi_impl::Settings>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<std::string>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<short>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<unsigned short>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<long long>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<unsigned long long>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<long>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a<unsigned long>() const";
+            "libmuscle::mpi_impl::DataConstRef::is_a_dict() const";
+            "libmuscle::mpi_impl::DataConstRef::is_a_list() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a_grid_of<bool>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a_grid_of<double>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a_grid_of<float>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a_grid_of<int>() const";
+            "bool libmuscle::mpi_impl::DataConstRef::is_a_grid_of<long>() const";
+            "libmuscle::mpi_impl::DataConstRef::is_a_byte_array() const";
+            "libmuscle::mpi_impl::DataConstRef::is_nil() const";
+            "libmuscle::mpi_impl::DataConstRef::as_byte_array() const";
+            "ymmsl::mpi_impl::SettingValue libmuscle::mpi_impl::DataConstRef::as<ymmsl::mpi_impl::SettingValue>() const";
+            "ymmsl::mpi_impl::Settings libmuscle::mpi_impl::DataConstRef::as<ymmsl::mpi_impl::Settings>() const";
+            "libmuscle::mpi_impl::DataConstRef::operator[](unsigned long) const";
+            "libmuscle::mpi_impl::DataConstRef::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const";
+            "libmuscle::mpi_impl::DataConstRef::operator[](std::string const&) const";
+            "libmuscle::mpi_impl::DataConstRef::key(unsigned long) const";
+            "libmuscle::mpi_impl::DataConstRef::value(unsigned long) const";
+            "bool const* libmuscle::mpi_impl::DataConstRef::elements<bool>() const";
+            "double const* libmuscle::mpi_impl::DataConstRef::elements<double>() const";
+            "float const* libmuscle::mpi_impl::DataConstRef::elements<float>() const";
+            "int const* libmuscle::mpi_impl::DataConstRef::elements<int>() const";
+            "long const* libmuscle::mpi_impl::DataConstRef::elements<long>() const";
+            "libmuscle::mpi_impl::DataConstRef::has_indexes() const";
+            "libmuscle::mpi_impl::DataConstRef::indexes[abi:cxx11]() const";
+            "libmuscle::mpi_impl::DataConstRef::shape() const";
+            "libmuscle::mpi_impl::DataConstRef::storage_order() const";
 
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<bool>(bool const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<bool>(bool const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<double>(double const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<double>(double const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<float>(float const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<float>(float const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<int>(int const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<int>(int const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<long>(long const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data libmuscle::impl::Data::grid<long>(long const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::impl::StorageOrder)";
-            "libmuscle::impl::Data::byte_array(char const*, unsigned int)";
-            "libmuscle::impl::Data::byte_array(unsigned int)";
-            "libmuscle::impl::Data::dict()";
-            "libmuscle::impl::Data::init_dict_(unsigned int)";
-            "libmuscle::impl::Data::set_dict_item_(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libmuscle::impl::DataConstRef const&)";
-            "libmuscle::impl::Data::set_dict_item_(unsigned int, std::string const&, libmuscle::impl::DataConstRef const&)";
-            "libmuscle::impl::Data::set_dict_item_(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libmuscle::impl::Data const&)";
-            "libmuscle::impl::Data::set_dict_item_(unsigned int, std::string const&, libmuscle::impl::Data const&)";
-            "libmuscle::impl::Data::list()";
-            "libmuscle::impl::Data::init_list_(unsigned int)";
-            "libmuscle::impl::Data::nils(unsigned long)";
-            "libmuscle::impl::Data::operator=(libmuscle::impl::Data const&)";
-            "libmuscle::impl::Data::operator[](unsigned long)";
-            "libmuscle::impl::Data::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)";
-            "libmuscle::impl::Data::operator[](std::string const&)";
-            "libmuscle::impl::Data::as_byte_array()";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<bool>(bool const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<bool>(bool const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<double>(double const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<double>(double const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<float>(float const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<float>(float const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<int>(int const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<int>(int const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<long>(long const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data libmuscle::mpi_impl::Data::grid<long>(long const*, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<std::string, std::allocator<std::string> > const&, libmuscle::mpi_impl::StorageOrder)";
+            "libmuscle::mpi_impl::Data::byte_array(char const*, unsigned int)";
+            "libmuscle::mpi_impl::Data::byte_array(unsigned int)";
+            "libmuscle::mpi_impl::Data::dict()";
+            "libmuscle::mpi_impl::Data::init_dict_(unsigned int)";
+            "libmuscle::mpi_impl::Data::set_dict_item_(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libmuscle::mpi_impl::DataConstRef const&)";
+            "libmuscle::mpi_impl::Data::set_dict_item_(unsigned int, std::string const&, libmuscle::mpi_impl::DataConstRef const&)";
+            "libmuscle::mpi_impl::Data::set_dict_item_(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libmuscle::mpi_impl::Data const&)";
+            "libmuscle::mpi_impl::Data::set_dict_item_(unsigned int, std::string const&, libmuscle::mpi_impl::Data const&)";
+            "libmuscle::mpi_impl::Data::list()";
+            "libmuscle::mpi_impl::Data::init_list_(unsigned int)";
+            "libmuscle::mpi_impl::Data::nils(unsigned long)";
+            "libmuscle::mpi_impl::Data::operator=(libmuscle::mpi_impl::Data const&)";
+            "libmuscle::mpi_impl::Data::operator[](unsigned long)";
+            "libmuscle::mpi_impl::Data::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)";
+            "libmuscle::mpi_impl::Data::operator[](std::string const&)";
+            "libmuscle::mpi_impl::Data::as_byte_array()";
         };
 
-        LIBMUSCLE_DataConstRef_create_nil_;
-        LIBMUSCLE_DataConstRef_create_logical_;
-        LIBMUSCLE_DataConstRef_create_character_;
-        LIBMUSCLE_DataConstRef_create_int1_;
-        LIBMUSCLE_DataConstRef_create_int2_;
-        LIBMUSCLE_DataConstRef_create_int4_;
-        LIBMUSCLE_DataConstRef_create_int8_;
-        LIBMUSCLE_DataConstRef_create_real4_;
-        LIBMUSCLE_DataConstRef_create_real8_;
-        LIBMUSCLE_DataConstRef_create_settings_;
-        LIBMUSCLE_DataConstRef_create_copy_;
-        LIBMUSCLE_DataConstRef_create_grid_logical_a_;
-        LIBMUSCLE_DataConstRef_create_grid_int4_a_;
-        LIBMUSCLE_DataConstRef_create_grid_int8_a_;
-        LIBMUSCLE_DataConstRef_create_grid_real4_a_;
-        LIBMUSCLE_DataConstRef_create_grid_real8_a_;
-        LIBMUSCLE_DataConstRef_create_grid_logical_n_;
-        LIBMUSCLE_DataConstRef_create_grid_int4_n_;
-        LIBMUSCLE_DataConstRef_create_grid_int8_n_;
-        LIBMUSCLE_DataConstRef_create_grid_real4_n_;
-        LIBMUSCLE_DataConstRef_create_grid_real8_n_;
-        LIBMUSCLE_DataConstRef_free_;
-        LIBMUSCLE_DataConstRef_is_a_logical_;
-        LIBMUSCLE_DataConstRef_is_a_character_;
-        LIBMUSCLE_DataConstRef_is_a_int_;
-        LIBMUSCLE_DataConstRef_is_a_int1_;
-        LIBMUSCLE_DataConstRef_is_a_int2_;
-        LIBMUSCLE_DataConstRef_is_a_int4_;
-        LIBMUSCLE_DataConstRef_is_a_int8_;
-        LIBMUSCLE_DataConstRef_is_a_real4_;
-        LIBMUSCLE_DataConstRef_is_a_real8_;
-        LIBMUSCLE_DataConstRef_is_a_dict_;
-        LIBMUSCLE_DataConstRef_is_a_list_;
-        LIBMUSCLE_DataConstRef_is_a_grid_of_logical_;
-        LIBMUSCLE_DataConstRef_is_a_grid_of_real4_;
-        LIBMUSCLE_DataConstRef_is_a_grid_of_real8_;
-        LIBMUSCLE_DataConstRef_is_a_grid_of_int4_;
-        LIBMUSCLE_DataConstRef_is_a_grid_of_int8_;
-        LIBMUSCLE_DataConstRef_is_a_byte_array_;
-        LIBMUSCLE_DataConstRef_is_nil_;
-        LIBMUSCLE_DataConstRef_is_a_settings_;
-        LIBMUSCLE_DataConstRef_size_;
-        LIBMUSCLE_DataConstRef_as_logical_;
-        LIBMUSCLE_DataConstRef_as_character_;
-        LIBMUSCLE_DataConstRef_as_int_;
-        LIBMUSCLE_DataConstRef_as_int1_;
-        LIBMUSCLE_DataConstRef_as_int2_;
-        LIBMUSCLE_DataConstRef_as_int4_;
-        LIBMUSCLE_DataConstRef_as_int8_;
-        LIBMUSCLE_DataConstRef_as_real4_;
-        LIBMUSCLE_DataConstRef_as_real8_;
-        LIBMUSCLE_DataConstRef_as_settings_;
-        LIBMUSCLE_DataConstRef_as_byte_array_;
-        LIBMUSCLE_DataConstRef_get_item_by_key_;
-        LIBMUSCLE_DataConstRef_get_item_by_index_;
-        LIBMUSCLE_DataConstRef_num_dims_;
-        LIBMUSCLE_DataConstRef_shape_;
-        LIBMUSCLE_DataConstRef_elements_logical_;
-        LIBMUSCLE_DataConstRef_elements_int4_;
-        LIBMUSCLE_DataConstRef_elements_int8_;
-        LIBMUSCLE_DataConstRef_elements_real4_;
-        LIBMUSCLE_DataConstRef_elements_real8_;
-        LIBMUSCLE_DataConstRef_has_indexes_;
-        LIBMUSCLE_DataConstRef_index_;
-        LIBMUSCLE_Data_create_nil_;
-        LIBMUSCLE_Data_create_logical_;
-        LIBMUSCLE_Data_create_character_;
-        LIBMUSCLE_Data_create_int1_;
-        LIBMUSCLE_Data_create_int2_;
-        LIBMUSCLE_Data_create_int4_;
-        LIBMUSCLE_Data_create_int8_;
-        LIBMUSCLE_Data_create_real4_;
-        LIBMUSCLE_Data_create_real8_;
-        LIBMUSCLE_Data_create_settings_;
-        LIBMUSCLE_Data_create_copy_;
-        LIBMUSCLE_Data_create_grid_logical_a_;
-        LIBMUSCLE_Data_create_grid_int4_a_;
-        LIBMUSCLE_Data_create_grid_int8_a_;
-        LIBMUSCLE_Data_create_grid_real4_a_;
-        LIBMUSCLE_Data_create_grid_real8_a_;
-        LIBMUSCLE_Data_create_grid_logical_n_;
-        LIBMUSCLE_Data_create_grid_int4_n_;
-        LIBMUSCLE_Data_create_grid_int8_n_;
-        LIBMUSCLE_Data_create_grid_real4_n_;
-        LIBMUSCLE_Data_create_grid_real8_n_;
-        LIBMUSCLE_Data_free_;
-        LIBMUSCLE_Data_is_a_logical_;
-        LIBMUSCLE_Data_is_a_character_;
-        LIBMUSCLE_Data_is_a_int_;
-        LIBMUSCLE_Data_is_a_int1_;
-        LIBMUSCLE_Data_is_a_int2_;
-        LIBMUSCLE_Data_is_a_int4_;
-        LIBMUSCLE_Data_is_a_int8_;
-        LIBMUSCLE_Data_is_a_real4_;
-        LIBMUSCLE_Data_is_a_real8_;
-        LIBMUSCLE_Data_is_a_dict_;
-        LIBMUSCLE_Data_is_a_list_;
-        LIBMUSCLE_Data_is_a_grid_of_logical_;
-        LIBMUSCLE_Data_is_a_grid_of_real4_;
-        LIBMUSCLE_Data_is_a_grid_of_real8_;
-        LIBMUSCLE_Data_is_a_grid_of_int4_;
-        LIBMUSCLE_Data_is_a_grid_of_int8_;
-        LIBMUSCLE_Data_is_a_byte_array_;
-        LIBMUSCLE_Data_is_nil_;
-        LIBMUSCLE_Data_is_a_settings_;
-        LIBMUSCLE_Data_size_;
-        LIBMUSCLE_Data_as_logical_;
-        LIBMUSCLE_Data_as_character_;
-        LIBMUSCLE_Data_as_int_;
-        LIBMUSCLE_Data_as_int1_;
-        LIBMUSCLE_Data_as_int2_;
-        LIBMUSCLE_Data_as_int4_;
-        LIBMUSCLE_Data_as_int8_;
-        LIBMUSCLE_Data_as_real4_;
-        LIBMUSCLE_Data_as_real8_;
-        LIBMUSCLE_Data_as_settings_;
-        LIBMUSCLE_Data_as_byte_array_;
-        LIBMUSCLE_Data_get_item_by_key_;
-        LIBMUSCLE_Data_get_item_by_index_;
-        LIBMUSCLE_Data_num_dims_;
-        LIBMUSCLE_Data_shape_;
-        LIBMUSCLE_Data_elements_logical_;
-        LIBMUSCLE_Data_elements_int4_;
-        LIBMUSCLE_Data_elements_int8_;
-        LIBMUSCLE_Data_elements_real4_;
-        LIBMUSCLE_Data_elements_real8_;
-        LIBMUSCLE_Data_has_indexes_;
-        LIBMUSCLE_Data_index_;
-        LIBMUSCLE_Data_create_dict_;
-        LIBMUSCLE_Data_create_list_;
-        LIBMUSCLE_Data_create_nils_;
-        LIBMUSCLE_Data_create_byte_array_empty_;
-        LIBMUSCLE_Data_create_byte_array_from_buf_;
-        LIBMUSCLE_Data_set_logical_;
-        LIBMUSCLE_Data_set_character_;
-        LIBMUSCLE_Data_set_int1_;
-        LIBMUSCLE_Data_set_int2_;
-        LIBMUSCLE_Data_set_int4_;
-        LIBMUSCLE_Data_set_int8_;
-        LIBMUSCLE_Data_set_real4_;
-        LIBMUSCLE_Data_set_real8_;
-        LIBMUSCLE_Data_set_data_;
-        LIBMUSCLE_Data_set_nil_;
-        LIBMUSCLE_Data_set_item_key_logical_;
-        LIBMUSCLE_Data_set_item_key_character_;
-        LIBMUSCLE_Data_set_item_key_int1_;
-        LIBMUSCLE_Data_set_item_key_int2_;
-        LIBMUSCLE_Data_set_item_key_int4_;
-        LIBMUSCLE_Data_set_item_key_int8_;
-        LIBMUSCLE_Data_set_item_key_real4_;
-        LIBMUSCLE_Data_set_item_key_real8_;
-        LIBMUSCLE_Data_set_item_key_data_;
-        LIBMUSCLE_Data_set_item_index_logical_;
-        LIBMUSCLE_Data_set_item_index_character_;
-        LIBMUSCLE_Data_set_item_index_int1_;
-        LIBMUSCLE_Data_set_item_index_int2_;
-        LIBMUSCLE_Data_set_item_index_int4_;
-        LIBMUSCLE_Data_set_item_index_int8_;
-        LIBMUSCLE_Data_set_item_index_real4_;
-        LIBMUSCLE_Data_set_item_index_real8_;
-        LIBMUSCLE_Data_set_item_index_data_;
-        LIBMUSCLE_Data_key_;
-        LIBMUSCLE_Data_value_;
-        LIBMUSCLE_PortsDescription_create_;
-        LIBMUSCLE_PortsDescription_free_;
-        LIBMUSCLE_PortsDescription_add_;
-        LIBMUSCLE_PortsDescription_num_ports_;
-        LIBMUSCLE_PortsDescription_get_;
-        LIBMUSCLE_Message_create_t_;
-        LIBMUSCLE_Message_create_td_;
-        LIBMUSCLE_Message_create_tnd_;
-        LIBMUSCLE_Message_create_tds_;
-        LIBMUSCLE_Message_create_tnds_;
-        LIBMUSCLE_Message_free_;
-        LIBMUSCLE_Message_timestamp_;
-        LIBMUSCLE_Message_set_timestamp_;
-        LIBMUSCLE_Message_has_next_timestamp_;
-        LIBMUSCLE_Message_next_timestamp_;
-        LIBMUSCLE_Message_set_next_timestamp_;
-        LIBMUSCLE_Message_unset_next_timestamp_;
-        LIBMUSCLE_Message_get_data_;
-        LIBMUSCLE_Message_set_data_d_;
-        LIBMUSCLE_Message_set_data_dcr_;
-        LIBMUSCLE_Message_has_settings_;
-        LIBMUSCLE_Message_get_settings_;
-        LIBMUSCLE_Message_set_settings_;
-        LIBMUSCLE_Message_unset_settings_;
-        LIBMUSCLE_Instance_create_;
-        LIBMUSCLE_Instance_free_;
-        LIBMUSCLE_Instance_reuse_instance_;
-        LIBMUSCLE_Instance_error_shutdown_;
-        LIBMUSCLE_Instance_is_setting_a_character_;
-        LIBMUSCLE_Instance_is_setting_a_int8_;
-        LIBMUSCLE_Instance_is_setting_a_real8_;
-        LIBMUSCLE_Instance_is_setting_a_logical_;
-        LIBMUSCLE_Instance_is_setting_a_real8array_;
-        LIBMUSCLE_Instance_is_setting_a_real8array2_;
-        LIBMUSCLE_Instance_get_setting_as_character_;
-        LIBMUSCLE_Instance_get_setting_as_int8_;
-        LIBMUSCLE_Instance_get_setting_as_real8_;
-        LIBMUSCLE_Instance_get_setting_as_logical_;
-        LIBMUSCLE_Instance_get_setting_as_real8array_;
-        LIBMUSCLE_Instance_get_setting_as_real8array2_;
-        LIBMUSCLE_Instance_list_ports_;
-        LIBMUSCLE_Instance_is_connected_;
-        LIBMUSCLE_Instance_is_vector_port_;
-        LIBMUSCLE_Instance_is_resizable_;
-        LIBMUSCLE_Instance_get_port_length_;
-        LIBMUSCLE_Instance_set_port_length_;
-        LIBMUSCLE_Instance_send_pm_;
-        LIBMUSCLE_Instance_send_pms_;
-        LIBMUSCLE_Instance_receive_p_;
-        LIBMUSCLE_Instance_receive_pd_;
-        LIBMUSCLE_Instance_receive_ps_;
-        LIBMUSCLE_Instance_receive_psd_;
-        LIBMUSCLE_Instance_receive_with_settings_p_;
-        LIBMUSCLE_Instance_receive_with_settings_pd_;
-        LIBMUSCLE_Instance_receive_with_settings_ps_;
-        LIBMUSCLE_Instance_receive_with_settings_psd_;
-        LIBMUSCLE_Instance_resuming_;
-        LIBMUSCLE_Instance_should_init_;
-        LIBMUSCLE_Instance_load_snapshot_;
-        LIBMUSCLE_Instance_should_save_snapshot_;
-        LIBMUSCLE_Instance_save_snapshot_;
-        LIBMUSCLE_Instance_should_save_final_snapshot_;
-        LIBMUSCLE_Instance_save_final_snapshot_;
+        LIBMUSCLE_MPI_DataConstRef_create_nil_;
+        LIBMUSCLE_MPI_DataConstRef_create_logical_;
+        LIBMUSCLE_MPI_DataConstRef_create_character_;
+        LIBMUSCLE_MPI_DataConstRef_create_int1_;
+        LIBMUSCLE_MPI_DataConstRef_create_int2_;
+        LIBMUSCLE_MPI_DataConstRef_create_int4_;
+        LIBMUSCLE_MPI_DataConstRef_create_int8_;
+        LIBMUSCLE_MPI_DataConstRef_create_real4_;
+        LIBMUSCLE_MPI_DataConstRef_create_real8_;
+        LIBMUSCLE_MPI_DataConstRef_create_settings_;
+        LIBMUSCLE_MPI_DataConstRef_create_copy_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_;
+        LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_;
+        LIBMUSCLE_MPI_DataConstRef_free_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_logical_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_character_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_int_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_int1_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_int2_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_int4_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_int8_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_real4_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_real8_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_dict_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_list_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_logical_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real4_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real8_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int4_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int8_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_byte_array_;
+        LIBMUSCLE_MPI_DataConstRef_is_nil_;
+        LIBMUSCLE_MPI_DataConstRef_is_a_settings_;
+        LIBMUSCLE_MPI_DataConstRef_size_;
+        LIBMUSCLE_MPI_DataConstRef_as_logical_;
+        LIBMUSCLE_MPI_DataConstRef_as_character_;
+        LIBMUSCLE_MPI_DataConstRef_as_int_;
+        LIBMUSCLE_MPI_DataConstRef_as_int1_;
+        LIBMUSCLE_MPI_DataConstRef_as_int2_;
+        LIBMUSCLE_MPI_DataConstRef_as_int4_;
+        LIBMUSCLE_MPI_DataConstRef_as_int8_;
+        LIBMUSCLE_MPI_DataConstRef_as_real4_;
+        LIBMUSCLE_MPI_DataConstRef_as_real8_;
+        LIBMUSCLE_MPI_DataConstRef_as_settings_;
+        LIBMUSCLE_MPI_DataConstRef_as_byte_array_;
+        LIBMUSCLE_MPI_DataConstRef_get_item_by_key_;
+        LIBMUSCLE_MPI_DataConstRef_get_item_by_index_;
+        LIBMUSCLE_MPI_DataConstRef_num_dims_;
+        LIBMUSCLE_MPI_DataConstRef_shape_;
+        LIBMUSCLE_MPI_DataConstRef_elements_logical_;
+        LIBMUSCLE_MPI_DataConstRef_elements_int4_;
+        LIBMUSCLE_MPI_DataConstRef_elements_int8_;
+        LIBMUSCLE_MPI_DataConstRef_elements_real4_;
+        LIBMUSCLE_MPI_DataConstRef_elements_real8_;
+        LIBMUSCLE_MPI_DataConstRef_has_indexes_;
+        LIBMUSCLE_MPI_DataConstRef_index_;
+        LIBMUSCLE_MPI_Data_create_nil_;
+        LIBMUSCLE_MPI_Data_create_logical_;
+        LIBMUSCLE_MPI_Data_create_character_;
+        LIBMUSCLE_MPI_Data_create_int1_;
+        LIBMUSCLE_MPI_Data_create_int2_;
+        LIBMUSCLE_MPI_Data_create_int4_;
+        LIBMUSCLE_MPI_Data_create_int8_;
+        LIBMUSCLE_MPI_Data_create_real4_;
+        LIBMUSCLE_MPI_Data_create_real8_;
+        LIBMUSCLE_MPI_Data_create_settings_;
+        LIBMUSCLE_MPI_Data_create_copy_;
+        LIBMUSCLE_MPI_Data_create_grid_logical_a_;
+        LIBMUSCLE_MPI_Data_create_grid_int4_a_;
+        LIBMUSCLE_MPI_Data_create_grid_int8_a_;
+        LIBMUSCLE_MPI_Data_create_grid_real4_a_;
+        LIBMUSCLE_MPI_Data_create_grid_real8_a_;
+        LIBMUSCLE_MPI_Data_create_grid_logical_n_;
+        LIBMUSCLE_MPI_Data_create_grid_int4_n_;
+        LIBMUSCLE_MPI_Data_create_grid_int8_n_;
+        LIBMUSCLE_MPI_Data_create_grid_real4_n_;
+        LIBMUSCLE_MPI_Data_create_grid_real8_n_;
+        LIBMUSCLE_MPI_Data_free_;
+        LIBMUSCLE_MPI_Data_is_a_logical_;
+        LIBMUSCLE_MPI_Data_is_a_character_;
+        LIBMUSCLE_MPI_Data_is_a_int_;
+        LIBMUSCLE_MPI_Data_is_a_int1_;
+        LIBMUSCLE_MPI_Data_is_a_int2_;
+        LIBMUSCLE_MPI_Data_is_a_int4_;
+        LIBMUSCLE_MPI_Data_is_a_int8_;
+        LIBMUSCLE_MPI_Data_is_a_real4_;
+        LIBMUSCLE_MPI_Data_is_a_real8_;
+        LIBMUSCLE_MPI_Data_is_a_dict_;
+        LIBMUSCLE_MPI_Data_is_a_list_;
+        LIBMUSCLE_MPI_Data_is_a_grid_of_logical_;
+        LIBMUSCLE_MPI_Data_is_a_grid_of_real4_;
+        LIBMUSCLE_MPI_Data_is_a_grid_of_real8_;
+        LIBMUSCLE_MPI_Data_is_a_grid_of_int4_;
+        LIBMUSCLE_MPI_Data_is_a_grid_of_int8_;
+        LIBMUSCLE_MPI_Data_is_a_byte_array_;
+        LIBMUSCLE_MPI_Data_is_nil_;
+        LIBMUSCLE_MPI_Data_is_a_settings_;
+        LIBMUSCLE_MPI_Data_size_;
+        LIBMUSCLE_MPI_Data_as_logical_;
+        LIBMUSCLE_MPI_Data_as_character_;
+        LIBMUSCLE_MPI_Data_as_int_;
+        LIBMUSCLE_MPI_Data_as_int1_;
+        LIBMUSCLE_MPI_Data_as_int2_;
+        LIBMUSCLE_MPI_Data_as_int4_;
+        LIBMUSCLE_MPI_Data_as_int8_;
+        LIBMUSCLE_MPI_Data_as_real4_;
+        LIBMUSCLE_MPI_Data_as_real8_;
+        LIBMUSCLE_MPI_Data_as_settings_;
+        LIBMUSCLE_MPI_Data_as_byte_array_;
+        LIBMUSCLE_MPI_Data_get_item_by_key_;
+        LIBMUSCLE_MPI_Data_get_item_by_index_;
+        LIBMUSCLE_MPI_Data_num_dims_;
+        LIBMUSCLE_MPI_Data_shape_;
+        LIBMUSCLE_MPI_Data_elements_logical_;
+        LIBMUSCLE_MPI_Data_elements_int4_;
+        LIBMUSCLE_MPI_Data_elements_int8_;
+        LIBMUSCLE_MPI_Data_elements_real4_;
+        LIBMUSCLE_MPI_Data_elements_real8_;
+        LIBMUSCLE_MPI_Data_has_indexes_;
+        LIBMUSCLE_MPI_Data_index_;
+        LIBMUSCLE_MPI_Data_create_dict_;
+        LIBMUSCLE_MPI_Data_create_list_;
+        LIBMUSCLE_MPI_Data_create_nils_;
+        LIBMUSCLE_MPI_Data_create_byte_array_empty_;
+        LIBMUSCLE_MPI_Data_create_byte_array_from_buf_;
+        LIBMUSCLE_MPI_Data_set_logical_;
+        LIBMUSCLE_MPI_Data_set_character_;
+        LIBMUSCLE_MPI_Data_set_int1_;
+        LIBMUSCLE_MPI_Data_set_int2_;
+        LIBMUSCLE_MPI_Data_set_int4_;
+        LIBMUSCLE_MPI_Data_set_int8_;
+        LIBMUSCLE_MPI_Data_set_real4_;
+        LIBMUSCLE_MPI_Data_set_real8_;
+        LIBMUSCLE_MPI_Data_set_data_;
+        LIBMUSCLE_MPI_Data_set_nil_;
+        LIBMUSCLE_MPI_Data_set_item_key_logical_;
+        LIBMUSCLE_MPI_Data_set_item_key_character_;
+        LIBMUSCLE_MPI_Data_set_item_key_int1_;
+        LIBMUSCLE_MPI_Data_set_item_key_int2_;
+        LIBMUSCLE_MPI_Data_set_item_key_int4_;
+        LIBMUSCLE_MPI_Data_set_item_key_int8_;
+        LIBMUSCLE_MPI_Data_set_item_key_real4_;
+        LIBMUSCLE_MPI_Data_set_item_key_real8_;
+        LIBMUSCLE_MPI_Data_set_item_key_data_;
+        LIBMUSCLE_MPI_Data_set_item_index_logical_;
+        LIBMUSCLE_MPI_Data_set_item_index_character_;
+        LIBMUSCLE_MPI_Data_set_item_index_int1_;
+        LIBMUSCLE_MPI_Data_set_item_index_int2_;
+        LIBMUSCLE_MPI_Data_set_item_index_int4_;
+        LIBMUSCLE_MPI_Data_set_item_index_int8_;
+        LIBMUSCLE_MPI_Data_set_item_index_real4_;
+        LIBMUSCLE_MPI_Data_set_item_index_real8_;
+        LIBMUSCLE_MPI_Data_set_item_index_data_;
+        LIBMUSCLE_MPI_Data_key_;
+        LIBMUSCLE_MPI_Data_value_;
+        LIBMUSCLE_MPI_PortsDescription_create_;
+        LIBMUSCLE_MPI_PortsDescription_free_;
+        LIBMUSCLE_MPI_PortsDescription_add_;
+        LIBMUSCLE_MPI_PortsDescription_num_ports_;
+        LIBMUSCLE_MPI_PortsDescription_get_;
+        LIBMUSCLE_MPI_Message_create_t_;
+        LIBMUSCLE_MPI_Message_create_td_;
+        LIBMUSCLE_MPI_Message_create_tnd_;
+        LIBMUSCLE_MPI_Message_create_tds_;
+        LIBMUSCLE_MPI_Message_create_tnds_;
+        LIBMUSCLE_MPI_Message_free_;
+        LIBMUSCLE_MPI_Message_timestamp_;
+        LIBMUSCLE_MPI_Message_set_timestamp_;
+        LIBMUSCLE_MPI_Message_has_next_timestamp_;
+        LIBMUSCLE_MPI_Message_next_timestamp_;
+        LIBMUSCLE_MPI_Message_set_next_timestamp_;
+        LIBMUSCLE_MPI_Message_unset_next_timestamp_;
+        LIBMUSCLE_MPI_Message_get_data_;
+        LIBMUSCLE_MPI_Message_set_data_d_;
+        LIBMUSCLE_MPI_Message_set_data_dcr_;
+        LIBMUSCLE_MPI_Message_has_settings_;
+        LIBMUSCLE_MPI_Message_get_settings_;
+        LIBMUSCLE_MPI_Message_set_settings_;
+        LIBMUSCLE_MPI_Message_unset_settings_;
+        LIBMUSCLE_MPI_Instance_create_;
+        LIBMUSCLE_MPI_Instance_free_;
+        LIBMUSCLE_MPI_Instance_reuse_instance_;
+        LIBMUSCLE_MPI_Instance_error_shutdown_;
+        LIBMUSCLE_MPI_Instance_is_setting_a_character_;
+        LIBMUSCLE_MPI_Instance_is_setting_a_int8_;
+        LIBMUSCLE_MPI_Instance_is_setting_a_real8_;
+        LIBMUSCLE_MPI_Instance_is_setting_a_logical_;
+        LIBMUSCLE_MPI_Instance_is_setting_a_real8array_;
+        LIBMUSCLE_MPI_Instance_is_setting_a_real8array2_;
+        LIBMUSCLE_MPI_Instance_get_setting_as_character_;
+        LIBMUSCLE_MPI_Instance_get_setting_as_int8_;
+        LIBMUSCLE_MPI_Instance_get_setting_as_real8_;
+        LIBMUSCLE_MPI_Instance_get_setting_as_logical_;
+        LIBMUSCLE_MPI_Instance_get_setting_as_real8array_;
+        LIBMUSCLE_MPI_Instance_get_setting_as_real8array2_;
+        LIBMUSCLE_MPI_Instance_list_ports_;
+        LIBMUSCLE_MPI_Instance_is_connected_;
+        LIBMUSCLE_MPI_Instance_is_vector_port_;
+        LIBMUSCLE_MPI_Instance_is_resizable_;
+        LIBMUSCLE_MPI_Instance_get_port_length_;
+        LIBMUSCLE_MPI_Instance_set_port_length_;
+        LIBMUSCLE_MPI_Instance_send_pm_;
+        LIBMUSCLE_MPI_Instance_send_pms_;
+        LIBMUSCLE_MPI_Instance_receive_p_;
+        LIBMUSCLE_MPI_Instance_receive_pd_;
+        LIBMUSCLE_MPI_Instance_receive_ps_;
+        LIBMUSCLE_MPI_Instance_receive_psd_;
+        LIBMUSCLE_MPI_Instance_receive_with_settings_p_;
+        LIBMUSCLE_MPI_Instance_receive_with_settings_pd_;
+        LIBMUSCLE_MPI_Instance_receive_with_settings_ps_;
+        LIBMUSCLE_MPI_Instance_receive_with_settings_psd_;
+        LIBMUSCLE_MPI_Instance_resuming_;
+        LIBMUSCLE_MPI_Instance_should_init_;
+        LIBMUSCLE_MPI_Instance_load_snapshot_;
+        LIBMUSCLE_MPI_Instance_should_save_snapshot_;
+        LIBMUSCLE_MPI_Instance_save_snapshot_;
+        LIBMUSCLE_MPI_Instance_should_save_final_snapshot_;
+        LIBMUSCLE_MPI_Instance_save_final_snapshot_;
         LIBMUSCLE_InstanceFlags_to_int_;
-        LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_;
-        LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_;
-        LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_;
+        LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_create_;
+        LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_free_;
+        LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_set_arg_;
 
     local: *;
 };
diff --git a/libmuscle/cpp/src/libmuscle/api_guard.cpp b/libmuscle/cpp/src/libmuscle/api_guard.cpp
index 0c798ee0..57364207 100644
--- a/libmuscle/cpp/src/libmuscle/api_guard.cpp
+++ b/libmuscle/cpp/src/libmuscle/api_guard.cpp
@@ -2,7 +2,7 @@
 
 #include <sstream>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 APIGuard::APIGuard(bool uses_checkpointing, bool is_root)
         : phase_(APIPhase::BEFORE_FIRST_REUSE_INSTANCE),
diff --git a/libmuscle/cpp/src/libmuscle/api_guard.hpp b/libmuscle/cpp/src/libmuscle/api_guard.hpp
index 099b9cdd..8bcb1538 100644
--- a/libmuscle/cpp/src/libmuscle/api_guard.hpp
+++ b/libmuscle/cpp/src/libmuscle/api_guard.hpp
@@ -1,9 +1,11 @@
 #pragma once
 
+#include <libmuscle/namespace.hpp>
+
 #include <stdexcept>
 #include <string>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Different phases that the user code traverses.
  *
diff --git a/libmuscle/cpp/src/libmuscle/bindings/cmdlineargs.cpp b/libmuscle/cpp/src/libmuscle/bindings/cmdlineargs.cpp
index c0129aeb..eb7da50b 100644
--- a/libmuscle/cpp/src/libmuscle/bindings/cmdlineargs.cpp
+++ b/libmuscle/cpp/src/libmuscle/bindings/cmdlineargs.cpp
@@ -1,7 +1,7 @@
 #include <libmuscle/bindings/cmdlineargs.hpp>
 
 
-namespace libmuscle { namespace impl { namespace bindings {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace bindings {
 
 CmdLineArgs::CmdLineArgs(int count)
         : ptrs_(count, nullptr)
diff --git a/libmuscle/cpp/src/libmuscle/bindings/cmdlineargs.hpp b/libmuscle/cpp/src/libmuscle/bindings/cmdlineargs.hpp
index 6a64aaf2..90046a78 100644
--- a/libmuscle/cpp/src/libmuscle/bindings/cmdlineargs.hpp
+++ b/libmuscle/cpp/src/libmuscle/bindings/cmdlineargs.hpp
@@ -3,8 +3,10 @@
 #include <string>
 #include <vector>
 
+#include <libmuscle/namespace.hpp>
 
-namespace libmuscle { namespace impl { namespace bindings {
+
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace bindings {
 
 // Simple helper class for passing command line args from Fortran to C++.
 class CmdLineArgs {
diff --git a/libmuscle/cpp/src/libmuscle/bindings/libmuscle_mpi_fortran_c.cpp b/libmuscle/cpp/src/libmuscle/bindings/libmuscle_mpi_fortran_c.cpp
index e0e721f3..cb91459c 100644
--- a/libmuscle/cpp/src/libmuscle/bindings/libmuscle_mpi_fortran_c.cpp
+++ b/libmuscle/cpp/src/libmuscle/bindings/libmuscle_mpi_fortran_c.cpp
@@ -15,72 +15,72 @@ using libmuscle::PortsDescription;
 using libmuscle::Message;
 using libmuscle::Instance;
 using libmuscle::InstanceFlags;
-using libmuscle::impl::bindings::CmdLineArgs;
+using libmuscle::mpi_impl::bindings::CmdLineArgs;
 using ymmsl::Operator;
 using ymmsl::Settings;
 
 
 extern "C" {
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_nil_() {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_nil_() {
     DataConstRef * result = new DataConstRef();
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_logical_(bool value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_logical_(bool value) {
     DataConstRef * result = new DataConstRef(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_character_(char * value, std::size_t value_size) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_character_(char * value, std::size_t value_size) {
     std::string value_s(value, value_size);
     DataConstRef * result = new DataConstRef(value_s);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_int1_(char value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_int1_(char value) {
     DataConstRef * result = new DataConstRef(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_int2_(short int value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_int2_(short int value) {
     DataConstRef * result = new DataConstRef(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_int4_(int32_t value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_int4_(int32_t value) {
     DataConstRef * result = new DataConstRef(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_int8_(int64_t value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_int8_(int64_t value) {
     DataConstRef * result = new DataConstRef(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_real4_(float value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_real4_(float value) {
     DataConstRef * result = new DataConstRef(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_real8_(double value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_real8_(double value) {
     DataConstRef * result = new DataConstRef(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_settings_(std::intptr_t value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_settings_(std::intptr_t value) {
     Settings * value_p = reinterpret_cast<Settings *>(value);
     DataConstRef * result = new DataConstRef(*value_p);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_copy_(std::intptr_t value) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_copy_(std::intptr_t value) {
     DataConstRef * value_p = reinterpret_cast<DataConstRef *>(value);
     DataConstRef * result = new DataConstRef(*value_p);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_logical_a_(bool * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_(bool * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<bool const * const>(data_array);
@@ -88,7 +88,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_logical_a_(bool * data_array, s
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int4_a_(int32_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_(int32_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<int32_t const * const>(data_array);
@@ -96,7 +96,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int4_a_(int32_t * data_array, s
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int8_a_(int64_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_(int64_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<int64_t const * const>(data_array);
@@ -104,7 +104,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int8_a_(int64_t * data_array, s
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real4_a_(float * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_(float * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<float const * const>(data_array);
@@ -112,7 +112,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real4_a_(float * data_array, st
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real8_a_(double * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_(double * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<double const * const>(data_array);
@@ -120,7 +120,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real8_a_(double * data_array, s
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_logical_n_(
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_(
         bool * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -157,7 +157,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_logical_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int4_n_(
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_(
         int32_t * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -194,7 +194,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int4_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int8_n_(
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_(
         int64_t * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -231,7 +231,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int8_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real4_n_(
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_(
         float * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -268,7 +268,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real4_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real8_n_(
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_(
         double * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -305,133 +305,133 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real8_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_DataConstRef_free_(std::intptr_t self) {
+void LIBMUSCLE_MPI_DataConstRef_free_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     delete self_p;
     return;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_logical_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_logical_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<bool>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_character_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_character_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<std::string>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_int_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_int_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<int>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_int1_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_int1_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<char>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_int2_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_int2_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<int16_t>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_int4_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_int4_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<int32_t>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_int8_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_int8_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<int64_t>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_real4_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_real4_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<float>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_real8_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_real8_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<double>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_dict_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_dict_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a_dict();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_list_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_list_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a_list();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_grid_of_logical_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_logical_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a_grid_of<bool>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_grid_of_real4_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real4_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a_grid_of<float>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_grid_of_real8_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real8_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a_grid_of<double>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_grid_of_int4_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int4_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a_grid_of<int32_t>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_grid_of_int8_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int8_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a_grid_of<int64_t>();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_byte_array_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_byte_array_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a_byte_array();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_nil_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_nil_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_nil();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_is_a_settings_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_DataConstRef_is_a_settings_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     bool result = self_p->is_a<Settings>();
     return result;
 }
 
-std::size_t LIBMUSCLE_DataConstRef_size_(std::intptr_t self) {
+std::size_t LIBMUSCLE_MPI_DataConstRef_size_(std::intptr_t self) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     std::size_t result = self_p->size();
     return result;
 }
 
-bool LIBMUSCLE_DataConstRef_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_DataConstRef_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -476,7 +476,7 @@ bool LIBMUSCLE_DataConstRef_as_logical_(std::intptr_t self, int * err_code, char
     return false;
 }
 
-void LIBMUSCLE_DataConstRef_as_character_(std::intptr_t self, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_DataConstRef_as_character_(std::intptr_t self, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -523,7 +523,7 @@ void LIBMUSCLE_DataConstRef_as_character_(std::intptr_t self, char ** ret_val, s
     }
 }
 
-int LIBMUSCLE_DataConstRef_as_int_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+int LIBMUSCLE_MPI_DataConstRef_as_int_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -568,7 +568,7 @@ int LIBMUSCLE_DataConstRef_as_int_(std::intptr_t self, int * err_code, char ** e
     return 0;
 }
 
-char LIBMUSCLE_DataConstRef_as_int1_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+char LIBMUSCLE_MPI_DataConstRef_as_int1_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -613,7 +613,7 @@ char LIBMUSCLE_DataConstRef_as_int1_(std::intptr_t self, int * err_code, char **
     return 0;
 }
 
-short int LIBMUSCLE_DataConstRef_as_int2_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+short int LIBMUSCLE_MPI_DataConstRef_as_int2_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -658,7 +658,7 @@ short int LIBMUSCLE_DataConstRef_as_int2_(std::intptr_t self, int * err_code, ch
     return 0;
 }
 
-int32_t LIBMUSCLE_DataConstRef_as_int4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+int32_t LIBMUSCLE_MPI_DataConstRef_as_int4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -703,7 +703,7 @@ int32_t LIBMUSCLE_DataConstRef_as_int4_(std::intptr_t self, int * err_code, char
     return 0;
 }
 
-int64_t LIBMUSCLE_DataConstRef_as_int8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+int64_t LIBMUSCLE_MPI_DataConstRef_as_int8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -748,7 +748,7 @@ int64_t LIBMUSCLE_DataConstRef_as_int8_(std::intptr_t self, int * err_code, char
     return 0;
 }
 
-float LIBMUSCLE_DataConstRef_as_real4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+float LIBMUSCLE_MPI_DataConstRef_as_real4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -793,7 +793,7 @@ float LIBMUSCLE_DataConstRef_as_real4_(std::intptr_t self, int * err_code, char
     return 0.0;
 }
 
-double LIBMUSCLE_DataConstRef_as_real8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+double LIBMUSCLE_MPI_DataConstRef_as_real8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -838,7 +838,7 @@ double LIBMUSCLE_DataConstRef_as_real8_(std::intptr_t self, int * err_code, char
     return 0.0;
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_as_settings_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_as_settings_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -883,7 +883,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_as_settings_(std::intptr_t self, int * err_
     return 0;
 }
 
-void LIBMUSCLE_DataConstRef_as_byte_array_(
+void LIBMUSCLE_MPI_DataConstRef_as_byte_array_(
         std::intptr_t self,
         char ** data, std::size_t * data_size,
         int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -902,7 +902,7 @@ void LIBMUSCLE_DataConstRef_as_byte_array_(
         *err_msg_len = msg.size();
     }
 }
-std::intptr_t LIBMUSCLE_DataConstRef_get_item_by_key_(
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_get_item_by_key_(
         std::intptr_t self,
         char * key, std::size_t key_size,
         int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -931,7 +931,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_get_item_by_key_(
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_DataConstRef_get_item_by_index_(
+std::intptr_t LIBMUSCLE_MPI_DataConstRef_get_item_by_index_(
         std::intptr_t self,
         std::size_t i,
         int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -959,7 +959,7 @@ std::intptr_t LIBMUSCLE_DataConstRef_get_item_by_index_(
     return 0;
 }
 
-std::size_t LIBMUSCLE_DataConstRef_num_dims_(
+std::size_t LIBMUSCLE_MPI_DataConstRef_num_dims_(
         std::intptr_t self,
         int * err_code, char ** err_msg, std::size_t * err_msg_len
 ) {
@@ -978,7 +978,7 @@ std::size_t LIBMUSCLE_DataConstRef_num_dims_(
     return 0;
 }
 
-void LIBMUSCLE_DataConstRef_shape_(std::intptr_t self, std::size_t ** shp, std::size_t * shp_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_DataConstRef_shape_(std::intptr_t self, std::size_t ** shp, std::size_t * shp_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -1025,7 +1025,7 @@ void LIBMUSCLE_DataConstRef_shape_(std::intptr_t self, std::size_t ** shp, std::
     }
 }
 
-void LIBMUSCLE_DataConstRef_elements_logical_(
+void LIBMUSCLE_MPI_DataConstRef_elements_logical_(
         std::intptr_t self,
         std::size_t ndims,
         bool ** elements,
@@ -1056,7 +1056,7 @@ void LIBMUSCLE_DataConstRef_elements_logical_(
     }
 }
 
-void LIBMUSCLE_DataConstRef_elements_int4_(
+void LIBMUSCLE_MPI_DataConstRef_elements_int4_(
         std::intptr_t self,
         std::size_t ndims,
         int32_t ** elements,
@@ -1087,7 +1087,7 @@ void LIBMUSCLE_DataConstRef_elements_int4_(
     }
 }
 
-void LIBMUSCLE_DataConstRef_elements_int8_(
+void LIBMUSCLE_MPI_DataConstRef_elements_int8_(
         std::intptr_t self,
         std::size_t ndims,
         int64_t ** elements,
@@ -1118,7 +1118,7 @@ void LIBMUSCLE_DataConstRef_elements_int8_(
     }
 }
 
-void LIBMUSCLE_DataConstRef_elements_real4_(
+void LIBMUSCLE_MPI_DataConstRef_elements_real4_(
         std::intptr_t self,
         std::size_t ndims,
         float ** elements,
@@ -1149,7 +1149,7 @@ void LIBMUSCLE_DataConstRef_elements_real4_(
     }
 }
 
-void LIBMUSCLE_DataConstRef_elements_real8_(
+void LIBMUSCLE_MPI_DataConstRef_elements_real8_(
         std::intptr_t self,
         std::size_t ndims,
         double ** elements,
@@ -1180,7 +1180,7 @@ void LIBMUSCLE_DataConstRef_elements_real8_(
     }
 }
 
-bool LIBMUSCLE_DataConstRef_has_indexes_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_DataConstRef_has_indexes_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -1225,7 +1225,7 @@ bool LIBMUSCLE_DataConstRef_has_indexes_(std::intptr_t self, int * err_code, cha
     return false;
 }
 
-void LIBMUSCLE_DataConstRef_index_(std::intptr_t self, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_DataConstRef_index_(std::intptr_t self, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     DataConstRef * self_p = reinterpret_cast<DataConstRef *>(self);
     try {
         *err_code = 0;
@@ -1272,65 +1272,65 @@ void LIBMUSCLE_DataConstRef_index_(std::intptr_t self, std::size_t i, char ** re
     }
 }
 
-std::intptr_t LIBMUSCLE_Data_create_nil_() {
+std::intptr_t LIBMUSCLE_MPI_Data_create_nil_() {
     Data * result = new Data();
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_logical_(bool value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_logical_(bool value) {
     Data * result = new Data(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_character_(char * value, std::size_t value_size) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_character_(char * value, std::size_t value_size) {
     std::string value_s(value, value_size);
     Data * result = new Data(value_s);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_int1_(char value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_int1_(char value) {
     Data * result = new Data(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_int2_(short int value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_int2_(short int value) {
     Data * result = new Data(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_int4_(int32_t value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_int4_(int32_t value) {
     Data * result = new Data(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_int8_(int64_t value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_int8_(int64_t value) {
     Data * result = new Data(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_real4_(float value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_real4_(float value) {
     Data * result = new Data(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_real8_(double value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_real8_(double value) {
     Data * result = new Data(value);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_settings_(std::intptr_t value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_settings_(std::intptr_t value) {
     Settings * value_p = reinterpret_cast<Settings *>(value);
     Data * result = new Data(*value_p);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_copy_(std::intptr_t value) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_copy_(std::intptr_t value) {
     Data * value_p = reinterpret_cast<Data *>(value);
     Data * result = new Data(*value_p);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_logical_a_(bool * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_logical_a_(bool * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<bool const * const>(data_array);
@@ -1338,7 +1338,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_logical_a_(bool * data_array, std::size
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_int4_a_(int32_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_int4_a_(int32_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<int32_t const * const>(data_array);
@@ -1346,7 +1346,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_int4_a_(int32_t * data_array, std::size
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_int8_a_(int64_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_int8_a_(int64_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<int64_t const * const>(data_array);
@@ -1354,7 +1354,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_int8_a_(int64_t * data_array, std::size
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_real4_a_(float * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_real4_a_(float * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<float const * const>(data_array);
@@ -1362,7 +1362,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_real4_a_(float * data_array, std::size_
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_real8_a_(double * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_real8_a_(double * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) {
     std::vector<std::size_t> data_array_shape_v(
             data_array_shape, data_array_shape + data_array_ndims);
     auto data_array_p = const_cast<double const * const>(data_array);
@@ -1370,7 +1370,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_real8_a_(double * data_array, std::size
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_logical_n_(
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_logical_n_(
         bool * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -1407,7 +1407,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_logical_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_int4_n_(
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_int4_n_(
         int32_t * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -1444,7 +1444,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_int4_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_int8_n_(
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_int8_n_(
         int64_t * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -1481,7 +1481,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_int8_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_real4_n_(
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_real4_n_(
         float * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -1518,7 +1518,7 @@ std::intptr_t LIBMUSCLE_Data_create_grid_real4_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_grid_real8_n_(
+std::intptr_t LIBMUSCLE_MPI_Data_create_grid_real8_n_(
         double * data_array,
         std::size_t * data_array_shape,
         std::size_t data_array_ndims,
@@ -1555,133 +1555,133 @@ std::intptr_t LIBMUSCLE_Data_create_grid_real8_n_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_Data_free_(std::intptr_t self) {
+void LIBMUSCLE_MPI_Data_free_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     delete self_p;
     return;
 }
 
-bool LIBMUSCLE_Data_is_a_logical_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_logical_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<bool>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_character_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_character_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<std::string>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_int_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_int_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<int>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_int1_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_int1_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<char>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_int2_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_int2_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<int16_t>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_int4_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_int4_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<int32_t>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_int8_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_int8_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<int64_t>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_real4_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_real4_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<float>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_real8_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_real8_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<double>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_dict_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_dict_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a_dict();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_list_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_list_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a_list();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_grid_of_logical_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_grid_of_logical_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a_grid_of<bool>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_grid_of_real4_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_grid_of_real4_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a_grid_of<float>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_grid_of_real8_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_grid_of_real8_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a_grid_of<double>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_grid_of_int4_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_grid_of_int4_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a_grid_of<int32_t>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_grid_of_int8_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_grid_of_int8_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a_grid_of<int64_t>();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_byte_array_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_byte_array_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a_byte_array();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_nil_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_nil_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_nil();
     return result;
 }
 
-bool LIBMUSCLE_Data_is_a_settings_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Data_is_a_settings_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     bool result = self_p->is_a<Settings>();
     return result;
 }
 
-std::size_t LIBMUSCLE_Data_size_(std::intptr_t self) {
+std::size_t LIBMUSCLE_MPI_Data_size_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::size_t result = self_p->size();
     return result;
 }
 
-bool LIBMUSCLE_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -1726,7 +1726,7 @@ bool LIBMUSCLE_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_
     return false;
 }
 
-void LIBMUSCLE_Data_as_character_(std::intptr_t self, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_as_character_(std::intptr_t self, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -1773,7 +1773,7 @@ void LIBMUSCLE_Data_as_character_(std::intptr_t self, char ** ret_val, std::size
     }
 }
 
-int LIBMUSCLE_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+int LIBMUSCLE_MPI_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -1818,7 +1818,7 @@ int LIBMUSCLE_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg,
     return 0;
 }
 
-char LIBMUSCLE_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+char LIBMUSCLE_MPI_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -1863,7 +1863,7 @@ char LIBMUSCLE_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg
     return 0;
 }
 
-short int LIBMUSCLE_Data_as_int2_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+short int LIBMUSCLE_MPI_Data_as_int2_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -1908,7 +1908,7 @@ short int LIBMUSCLE_Data_as_int2_(std::intptr_t self, int * err_code, char ** er
     return 0;
 }
 
-int32_t LIBMUSCLE_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+int32_t LIBMUSCLE_MPI_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -1953,7 +1953,7 @@ int32_t LIBMUSCLE_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_
     return 0;
 }
 
-int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+int64_t LIBMUSCLE_MPI_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -1998,7 +1998,7 @@ int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_
     return 0;
 }
 
-float LIBMUSCLE_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+float LIBMUSCLE_MPI_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -2043,7 +2043,7 @@ float LIBMUSCLE_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_m
     return 0.0;
 }
 
-double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+double LIBMUSCLE_MPI_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -2088,7 +2088,7 @@ double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_
     return 0.0;
 }
 
-std::intptr_t LIBMUSCLE_Data_as_settings_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Data_as_settings_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -2133,7 +2133,7 @@ std::intptr_t LIBMUSCLE_Data_as_settings_(std::intptr_t self, int * err_code, ch
     return 0;
 }
 
-void LIBMUSCLE_Data_as_byte_array_(
+void LIBMUSCLE_MPI_Data_as_byte_array_(
         std::intptr_t self,
         char ** data, std::size_t * data_size,
         int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -2152,7 +2152,7 @@ void LIBMUSCLE_Data_as_byte_array_(
         *err_msg_len = msg.size();
     }
 }
-std::intptr_t LIBMUSCLE_Data_get_item_by_key_(
+std::intptr_t LIBMUSCLE_MPI_Data_get_item_by_key_(
         std::intptr_t self,
         char * key, std::size_t key_size,
         int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -2181,7 +2181,7 @@ std::intptr_t LIBMUSCLE_Data_get_item_by_key_(
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_Data_get_item_by_index_(
+std::intptr_t LIBMUSCLE_MPI_Data_get_item_by_index_(
         std::intptr_t self,
         std::size_t i,
         int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -2209,7 +2209,7 @@ std::intptr_t LIBMUSCLE_Data_get_item_by_index_(
     return 0;
 }
 
-std::size_t LIBMUSCLE_Data_num_dims_(
+std::size_t LIBMUSCLE_MPI_Data_num_dims_(
         std::intptr_t self,
         int * err_code, char ** err_msg, std::size_t * err_msg_len
 ) {
@@ -2228,7 +2228,7 @@ std::size_t LIBMUSCLE_Data_num_dims_(
     return 0;
 }
 
-void LIBMUSCLE_Data_shape_(std::intptr_t self, std::size_t ** shp, std::size_t * shp_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_shape_(std::intptr_t self, std::size_t ** shp, std::size_t * shp_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -2275,7 +2275,7 @@ void LIBMUSCLE_Data_shape_(std::intptr_t self, std::size_t ** shp, std::size_t *
     }
 }
 
-void LIBMUSCLE_Data_elements_logical_(
+void LIBMUSCLE_MPI_Data_elements_logical_(
         std::intptr_t self,
         std::size_t ndims,
         bool ** elements,
@@ -2306,7 +2306,7 @@ void LIBMUSCLE_Data_elements_logical_(
     }
 }
 
-void LIBMUSCLE_Data_elements_int4_(
+void LIBMUSCLE_MPI_Data_elements_int4_(
         std::intptr_t self,
         std::size_t ndims,
         int32_t ** elements,
@@ -2337,7 +2337,7 @@ void LIBMUSCLE_Data_elements_int4_(
     }
 }
 
-void LIBMUSCLE_Data_elements_int8_(
+void LIBMUSCLE_MPI_Data_elements_int8_(
         std::intptr_t self,
         std::size_t ndims,
         int64_t ** elements,
@@ -2368,7 +2368,7 @@ void LIBMUSCLE_Data_elements_int8_(
     }
 }
 
-void LIBMUSCLE_Data_elements_real4_(
+void LIBMUSCLE_MPI_Data_elements_real4_(
         std::intptr_t self,
         std::size_t ndims,
         float ** elements,
@@ -2399,7 +2399,7 @@ void LIBMUSCLE_Data_elements_real4_(
     }
 }
 
-void LIBMUSCLE_Data_elements_real8_(
+void LIBMUSCLE_MPI_Data_elements_real8_(
         std::intptr_t self,
         std::size_t ndims,
         double ** elements,
@@ -2430,7 +2430,7 @@ void LIBMUSCLE_Data_elements_real8_(
     }
 }
 
-bool LIBMUSCLE_Data_has_indexes_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Data_has_indexes_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -2475,7 +2475,7 @@ bool LIBMUSCLE_Data_has_indexes_(std::intptr_t self, int * err_code, char ** err
     return false;
 }
 
-void LIBMUSCLE_Data_index_(std::intptr_t self, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_index_(std::intptr_t self, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -2522,95 +2522,95 @@ void LIBMUSCLE_Data_index_(std::intptr_t self, std::size_t i, char ** ret_val, s
     }
 }
 
-std::intptr_t LIBMUSCLE_Data_create_dict_() {
+std::intptr_t LIBMUSCLE_MPI_Data_create_dict_() {
     Data * result = new Data(Data::dict());
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_list_() {
+std::intptr_t LIBMUSCLE_MPI_Data_create_list_() {
     Data * result = new Data(Data::list());
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_nils_(std::size_t size) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_nils_(std::size_t size) {
     Data * result = new Data(Data::nils(size));
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_byte_array_empty_(std::size_t size) {
+std::intptr_t LIBMUSCLE_MPI_Data_create_byte_array_empty_(std::size_t size) {
     Data * result = new Data(Data::byte_array(size));
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Data_create_byte_array_from_buf_(
+std::intptr_t LIBMUSCLE_MPI_Data_create_byte_array_from_buf_(
        char * buf, std::size_t buf_size
 ) {
    Data * result = new Data(Data::byte_array(buf, buf_size));
    return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_Data_set_logical_(std::intptr_t self, bool value) {
+void LIBMUSCLE_MPI_Data_set_logical_(std::intptr_t self, bool value) {
     Data * self_p = reinterpret_cast<Data *>(self);
     *self_p = value;
     return;
 }
 
-void LIBMUSCLE_Data_set_character_(std::intptr_t self, char * value, std::size_t value_size) {
+void LIBMUSCLE_MPI_Data_set_character_(std::intptr_t self, char * value, std::size_t value_size) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string value_s(value, value_size);
     *self_p = value_s;
     return;
 }
 
-void LIBMUSCLE_Data_set_int1_(std::intptr_t self, char value) {
+void LIBMUSCLE_MPI_Data_set_int1_(std::intptr_t self, char value) {
     Data * self_p = reinterpret_cast<Data *>(self);
     *self_p = value;
     return;
 }
 
-void LIBMUSCLE_Data_set_int2_(std::intptr_t self, short int value) {
+void LIBMUSCLE_MPI_Data_set_int2_(std::intptr_t self, short int value) {
     Data * self_p = reinterpret_cast<Data *>(self);
     *self_p = value;
     return;
 }
 
-void LIBMUSCLE_Data_set_int4_(std::intptr_t self, int32_t value) {
+void LIBMUSCLE_MPI_Data_set_int4_(std::intptr_t self, int32_t value) {
     Data * self_p = reinterpret_cast<Data *>(self);
     *self_p = value;
     return;
 }
 
-void LIBMUSCLE_Data_set_int8_(std::intptr_t self, int64_t value) {
+void LIBMUSCLE_MPI_Data_set_int8_(std::intptr_t self, int64_t value) {
     Data * self_p = reinterpret_cast<Data *>(self);
     *self_p = value;
     return;
 }
 
-void LIBMUSCLE_Data_set_real4_(std::intptr_t self, float value) {
+void LIBMUSCLE_MPI_Data_set_real4_(std::intptr_t self, float value) {
     Data * self_p = reinterpret_cast<Data *>(self);
     *self_p = value;
     return;
 }
 
-void LIBMUSCLE_Data_set_real8_(std::intptr_t self, double value) {
+void LIBMUSCLE_MPI_Data_set_real8_(std::intptr_t self, double value) {
     Data * self_p = reinterpret_cast<Data *>(self);
     *self_p = value;
     return;
 }
 
-void LIBMUSCLE_Data_set_data_(std::intptr_t self, std::intptr_t value) {
+void LIBMUSCLE_MPI_Data_set_data_(std::intptr_t self, std::intptr_t value) {
     Data * self_p = reinterpret_cast<Data *>(self);
     Data * value_p = reinterpret_cast<Data *>(value);
     *self_p = *value_p;
     return;
 }
 
-void LIBMUSCLE_Data_set_nil_(std::intptr_t self) {
+void LIBMUSCLE_MPI_Data_set_nil_(std::intptr_t self) {
     Data * self_p = reinterpret_cast<Data *>(self);
     *self_p = Data();
 }
 
-void LIBMUSCLE_Data_set_item_key_logical_(std::intptr_t self, char * key, std::size_t key_size, bool value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_logical_(std::intptr_t self, char * key, std::size_t key_size, bool value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     try {
@@ -2655,7 +2655,7 @@ void LIBMUSCLE_Data_set_item_key_logical_(std::intptr_t self, char * key, std::s
     }
 }
 
-void LIBMUSCLE_Data_set_item_key_character_(std::intptr_t self, char * key, std::size_t key_size, char * value, std::size_t value_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_character_(std::intptr_t self, char * key, std::size_t key_size, char * value, std::size_t value_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     std::string value_s(value, value_size);
@@ -2701,7 +2701,7 @@ void LIBMUSCLE_Data_set_item_key_character_(std::intptr_t self, char * key, std:
     }
 }
 
-void LIBMUSCLE_Data_set_item_key_int1_(std::intptr_t self, char * key, std::size_t key_size, char value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_int1_(std::intptr_t self, char * key, std::size_t key_size, char value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     try {
@@ -2746,7 +2746,7 @@ void LIBMUSCLE_Data_set_item_key_int1_(std::intptr_t self, char * key, std::size
     }
 }
 
-void LIBMUSCLE_Data_set_item_key_int2_(std::intptr_t self, char * key, std::size_t key_size, short int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_int2_(std::intptr_t self, char * key, std::size_t key_size, short int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     try {
@@ -2791,7 +2791,7 @@ void LIBMUSCLE_Data_set_item_key_int2_(std::intptr_t self, char * key, std::size
     }
 }
 
-void LIBMUSCLE_Data_set_item_key_int4_(std::intptr_t self, char * key, std::size_t key_size, int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_int4_(std::intptr_t self, char * key, std::size_t key_size, int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     try {
@@ -2836,7 +2836,7 @@ void LIBMUSCLE_Data_set_item_key_int4_(std::intptr_t self, char * key, std::size
     }
 }
 
-void LIBMUSCLE_Data_set_item_key_int8_(std::intptr_t self, char * key, std::size_t key_size, int64_t value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_int8_(std::intptr_t self, char * key, std::size_t key_size, int64_t value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     try {
@@ -2881,7 +2881,7 @@ void LIBMUSCLE_Data_set_item_key_int8_(std::intptr_t self, char * key, std::size
     }
 }
 
-void LIBMUSCLE_Data_set_item_key_real4_(std::intptr_t self, char * key, std::size_t key_size, float value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_real4_(std::intptr_t self, char * key, std::size_t key_size, float value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     try {
@@ -2926,7 +2926,7 @@ void LIBMUSCLE_Data_set_item_key_real4_(std::intptr_t self, char * key, std::siz
     }
 }
 
-void LIBMUSCLE_Data_set_item_key_real8_(std::intptr_t self, char * key, std::size_t key_size, double value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_real8_(std::intptr_t self, char * key, std::size_t key_size, double value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     try {
@@ -2971,7 +2971,7 @@ void LIBMUSCLE_Data_set_item_key_real8_(std::intptr_t self, char * key, std::siz
     }
 }
 
-void LIBMUSCLE_Data_set_item_key_data_(std::intptr_t self, char * key, std::size_t key_size, std::intptr_t value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_key_data_(std::intptr_t self, char * key, std::size_t key_size, std::intptr_t value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string key_s(key, key_size);
     Data * value_p = reinterpret_cast<Data *>(value);
@@ -3017,7 +3017,7 @@ void LIBMUSCLE_Data_set_item_key_data_(std::intptr_t self, char * key, std::size
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_logical_(std::intptr_t self, std::size_t i, bool value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_logical_(std::intptr_t self, std::size_t i, bool value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -3061,7 +3061,7 @@ void LIBMUSCLE_Data_set_item_index_logical_(std::intptr_t self, std::size_t i, b
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_character_(std::intptr_t self, std::size_t i, char * value, std::size_t value_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_character_(std::intptr_t self, std::size_t i, char * value, std::size_t value_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     std::string value_s(value, value_size);
     try {
@@ -3106,7 +3106,7 @@ void LIBMUSCLE_Data_set_item_index_character_(std::intptr_t self, std::size_t i,
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_int1_(std::intptr_t self, std::size_t i, char value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_int1_(std::intptr_t self, std::size_t i, char value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -3150,7 +3150,7 @@ void LIBMUSCLE_Data_set_item_index_int1_(std::intptr_t self, std::size_t i, char
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_int2_(std::intptr_t self, std::size_t i, short int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_int2_(std::intptr_t self, std::size_t i, short int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -3194,7 +3194,7 @@ void LIBMUSCLE_Data_set_item_index_int2_(std::intptr_t self, std::size_t i, shor
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_int4_(std::intptr_t self, std::size_t i, int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_int4_(std::intptr_t self, std::size_t i, int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -3238,7 +3238,7 @@ void LIBMUSCLE_Data_set_item_index_int4_(std::intptr_t self, std::size_t i, int
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_int8_(std::intptr_t self, std::size_t i, int64_t value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_int8_(std::intptr_t self, std::size_t i, int64_t value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -3282,7 +3282,7 @@ void LIBMUSCLE_Data_set_item_index_int8_(std::intptr_t self, std::size_t i, int6
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_real4_(std::intptr_t self, std::size_t i, float value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_real4_(std::intptr_t self, std::size_t i, float value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -3326,7 +3326,7 @@ void LIBMUSCLE_Data_set_item_index_real4_(std::intptr_t self, std::size_t i, flo
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_real8_(std::intptr_t self, std::size_t i, double value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_real8_(std::intptr_t self, std::size_t i, double value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     try {
         *err_code = 0;
@@ -3370,7 +3370,7 @@ void LIBMUSCLE_Data_set_item_index_real8_(std::intptr_t self, std::size_t i, dou
     }
 }
 
-void LIBMUSCLE_Data_set_item_index_data_(std::intptr_t self, std::size_t i, std::intptr_t value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Data_set_item_index_data_(std::intptr_t self, std::size_t i, std::intptr_t value, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Data * self_p = reinterpret_cast<Data *>(self);
     Data * value_p = reinterpret_cast<Data *>(value);
     try {
@@ -3415,7 +3415,7 @@ void LIBMUSCLE_Data_set_item_index_data_(std::intptr_t self, std::size_t i, std:
     }
 }
 
-void LIBMUSCLE_Data_key_(
+void LIBMUSCLE_MPI_Data_key_(
         std::intptr_t self, std::size_t i,
         char ** ret_val, std::size_t * ret_val_size,
         int * err_code,
@@ -3446,7 +3446,7 @@ void LIBMUSCLE_Data_key_(
     }
 }
 
-std::intptr_t LIBMUSCLE_Data_value_(
+std::intptr_t LIBMUSCLE_MPI_Data_value_(
         std::intptr_t self, std::size_t i,
         int * err_code,
         char ** err_msg, std::size_t * err_msg_len
@@ -3474,18 +3474,18 @@ std::intptr_t LIBMUSCLE_Data_value_(
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_PortsDescription_create_() {
+std::intptr_t LIBMUSCLE_MPI_PortsDescription_create_() {
     PortsDescription * result = new PortsDescription();
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_PortsDescription_free_(std::intptr_t self) {
+void LIBMUSCLE_MPI_PortsDescription_free_(std::intptr_t self) {
     PortsDescription * self_p = reinterpret_cast<PortsDescription *>(self);
     delete self_p;
     return;
 }
 
-void LIBMUSCLE_PortsDescription_add_(std::intptr_t self, int op, char * port, std::size_t port_size) {
+void LIBMUSCLE_MPI_PortsDescription_add_(std::intptr_t self, int op, char * port, std::size_t port_size) {
     PortsDescription * self_p = reinterpret_cast<PortsDescription *>(self);
     Operator op_e = static_cast<Operator>(op);
     std::string port_s(port, port_size);
@@ -3493,7 +3493,7 @@ void LIBMUSCLE_PortsDescription_add_(std::intptr_t self, int op, char * port, st
     return;
 }
 
-std::size_t LIBMUSCLE_PortsDescription_num_ports_(std::intptr_t self, int op) {
+std::size_t LIBMUSCLE_MPI_PortsDescription_num_ports_(std::intptr_t self, int op) {
     PortsDescription * self_p = reinterpret_cast<PortsDescription *>(self);
     Operator op_e = static_cast<Operator>(op);
     std::size_t result = 0u;
@@ -3502,7 +3502,7 @@ std::size_t LIBMUSCLE_PortsDescription_num_ports_(std::intptr_t self, int op) {
     return result;
 }
 
-void LIBMUSCLE_PortsDescription_get_(std::intptr_t self, int op, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_PortsDescription_get_(std::intptr_t self, int op, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     PortsDescription * self_p = reinterpret_cast<PortsDescription *>(self);
     Operator op_e = static_cast<Operator>(op);
     try {
@@ -3550,125 +3550,125 @@ void LIBMUSCLE_PortsDescription_get_(std::intptr_t self, int op, std::size_t i,
     }
 }
 
-std::intptr_t LIBMUSCLE_Message_create_t_(double timestamp) {
+std::intptr_t LIBMUSCLE_MPI_Message_create_t_(double timestamp) {
     Message * result = new Message(timestamp);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Message_create_td_(double timestamp, std::intptr_t data) {
+std::intptr_t LIBMUSCLE_MPI_Message_create_td_(double timestamp, std::intptr_t data) {
     Data * data_p = reinterpret_cast<Data *>(data);
     Message * result = new Message(timestamp, *data_p);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Message_create_tnd_(double timestamp, double next_timestamp, std::intptr_t data) {
+std::intptr_t LIBMUSCLE_MPI_Message_create_tnd_(double timestamp, double next_timestamp, std::intptr_t data) {
     Data * data_p = reinterpret_cast<Data *>(data);
     Message * result = new Message(timestamp, next_timestamp, *data_p);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Message_create_tds_(double timestamp, std::intptr_t data, std::intptr_t settings) {
+std::intptr_t LIBMUSCLE_MPI_Message_create_tds_(double timestamp, std::intptr_t data, std::intptr_t settings) {
     Data * data_p = reinterpret_cast<Data *>(data);
     Settings * settings_p = reinterpret_cast<Settings *>(settings);
     Message * result = new Message(timestamp, *data_p, *settings_p);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-std::intptr_t LIBMUSCLE_Message_create_tnds_(double timestamp, double next_timestamp, std::intptr_t data, std::intptr_t settings) {
+std::intptr_t LIBMUSCLE_MPI_Message_create_tnds_(double timestamp, double next_timestamp, std::intptr_t data, std::intptr_t settings) {
     Data * data_p = reinterpret_cast<Data *>(data);
     Settings * settings_p = reinterpret_cast<Settings *>(settings);
     Message * result = new Message(timestamp, next_timestamp, *data_p, *settings_p);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_Message_free_(std::intptr_t self) {
+void LIBMUSCLE_MPI_Message_free_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     delete self_p;
     return;
 }
 
-double LIBMUSCLE_Message_timestamp_(std::intptr_t self) {
+double LIBMUSCLE_MPI_Message_timestamp_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     double result = self_p->timestamp();
     return result;
 }
 
-void LIBMUSCLE_Message_set_timestamp_(std::intptr_t self, double timestamp) {
+void LIBMUSCLE_MPI_Message_set_timestamp_(std::intptr_t self, double timestamp) {
     Message * self_p = reinterpret_cast<Message *>(self);
     self_p->set_timestamp(timestamp);
     return;
 }
 
-bool LIBMUSCLE_Message_has_next_timestamp_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Message_has_next_timestamp_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     bool result = self_p->has_next_timestamp();
     return result;
 }
 
-double LIBMUSCLE_Message_next_timestamp_(std::intptr_t self) {
+double LIBMUSCLE_MPI_Message_next_timestamp_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     double result = self_p->next_timestamp();
     return result;
 }
 
-void LIBMUSCLE_Message_set_next_timestamp_(std::intptr_t self, double next_timestamp) {
+void LIBMUSCLE_MPI_Message_set_next_timestamp_(std::intptr_t self, double next_timestamp) {
     Message * self_p = reinterpret_cast<Message *>(self);
     self_p->set_next_timestamp(next_timestamp);
     return;
 }
 
-void LIBMUSCLE_Message_unset_next_timestamp_(std::intptr_t self) {
+void LIBMUSCLE_MPI_Message_unset_next_timestamp_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     self_p->unset_next_timestamp();
     return;
 }
 
-std::intptr_t LIBMUSCLE_Message_get_data_(std::intptr_t self) {
+std::intptr_t LIBMUSCLE_MPI_Message_get_data_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     DataConstRef * result = new DataConstRef(self_p->data());
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_Message_set_data_d_(std::intptr_t self, std::intptr_t data) {
+void LIBMUSCLE_MPI_Message_set_data_d_(std::intptr_t self, std::intptr_t data) {
     Message * self_p = reinterpret_cast<Message *>(self);
     Data * data_p = reinterpret_cast<Data *>(data);
     self_p->set_data(*data_p);
     return;
 }
 
-void LIBMUSCLE_Message_set_data_dcr_(std::intptr_t self, std::intptr_t data) {
+void LIBMUSCLE_MPI_Message_set_data_dcr_(std::intptr_t self, std::intptr_t data) {
     Message * self_p = reinterpret_cast<Message *>(self);
     DataConstRef * data_p = reinterpret_cast<DataConstRef *>(data);
     self_p->set_data(*data_p);
     return;
 }
 
-bool LIBMUSCLE_Message_has_settings_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Message_has_settings_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     bool result = self_p->has_settings();
     return result;
 }
 
-std::intptr_t LIBMUSCLE_Message_get_settings_(std::intptr_t self) {
+std::intptr_t LIBMUSCLE_MPI_Message_get_settings_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     Settings * result = new Settings(self_p->settings());
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_Message_set_settings_(std::intptr_t self, std::intptr_t settings) {
+void LIBMUSCLE_MPI_Message_set_settings_(std::intptr_t self, std::intptr_t settings) {
     Message * self_p = reinterpret_cast<Message *>(self);
     Settings * settings_p = reinterpret_cast<Settings *>(settings);
     self_p->set_settings(*settings_p);
     return;
 }
 
-void LIBMUSCLE_Message_unset_settings_(std::intptr_t self) {
+void LIBMUSCLE_MPI_Message_unset_settings_(std::intptr_t self) {
     Message * self_p = reinterpret_cast<Message *>(self);
     self_p->unset_settings();
     return;
 }
 
-std::intptr_t LIBMUSCLE_Instance_create_(
+std::intptr_t LIBMUSCLE_MPI_Instance_create_(
         std::intptr_t cla,
         std::intptr_t ports,
         int flags,
@@ -3689,26 +3689,26 @@ std::intptr_t LIBMUSCLE_Instance_create_(
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_Instance_free_(std::intptr_t self) {
+void LIBMUSCLE_MPI_Instance_free_(std::intptr_t self) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     delete self_p;
     return;
 }
 
-bool LIBMUSCLE_Instance_reuse_instance_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Instance_reuse_instance_(std::intptr_t self) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     bool result = self_p->reuse_instance();
     return result;
 }
 
-void LIBMUSCLE_Instance_error_shutdown_(std::intptr_t self, char * message, std::size_t message_size) {
+void LIBMUSCLE_MPI_Instance_error_shutdown_(std::intptr_t self, char * message, std::size_t message_size) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string message_s(message, message_size);
     self_p->error_shutdown(message_s);
     return;
 }
 
-bool LIBMUSCLE_Instance_is_setting_a_character_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Instance_is_setting_a_character_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -3754,7 +3754,7 @@ bool LIBMUSCLE_Instance_is_setting_a_character_(std::intptr_t self, char * name,
     return false;
 }
 
-bool LIBMUSCLE_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -3800,7 +3800,7 @@ bool LIBMUSCLE_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std:
     return false;
 }
 
-bool LIBMUSCLE_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -3846,7 +3846,7 @@ bool LIBMUSCLE_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std
     return false;
 }
 
-bool LIBMUSCLE_Instance_is_setting_a_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Instance_is_setting_a_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -3892,7 +3892,7 @@ bool LIBMUSCLE_Instance_is_setting_a_logical_(std::intptr_t self, char * name, s
     return false;
 }
 
-bool LIBMUSCLE_Instance_is_setting_a_real8array_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Instance_is_setting_a_real8array_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -3938,7 +3938,7 @@ bool LIBMUSCLE_Instance_is_setting_a_real8array_(std::intptr_t self, char * name
     return false;
 }
 
-bool LIBMUSCLE_Instance_is_setting_a_real8array2_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Instance_is_setting_a_real8array2_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -3984,7 +3984,7 @@ bool LIBMUSCLE_Instance_is_setting_a_real8array2_(std::intptr_t self, char * nam
     return false;
 }
 
-void LIBMUSCLE_Instance_get_setting_as_character_(std::intptr_t self, char * name, std::size_t name_size, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Instance_get_setting_as_character_(std::intptr_t self, char * name, std::size_t name_size, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -4032,7 +4032,7 @@ void LIBMUSCLE_Instance_get_setting_as_character_(std::intptr_t self, char * nam
     }
 }
 
-int64_t LIBMUSCLE_Instance_get_setting_as_int8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+int64_t LIBMUSCLE_MPI_Instance_get_setting_as_int8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -4078,7 +4078,7 @@ int64_t LIBMUSCLE_Instance_get_setting_as_int8_(std::intptr_t self, char * name,
     return 0;
 }
 
-double LIBMUSCLE_Instance_get_setting_as_real8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+double LIBMUSCLE_MPI_Instance_get_setting_as_real8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -4124,7 +4124,7 @@ double LIBMUSCLE_Instance_get_setting_as_real8_(std::intptr_t self, char * name,
     return 0.0;
 }
 
-bool LIBMUSCLE_Instance_get_setting_as_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+bool LIBMUSCLE_MPI_Instance_get_setting_as_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -4170,7 +4170,7 @@ bool LIBMUSCLE_Instance_get_setting_as_logical_(std::intptr_t self, char * name,
     return false;
 }
 
-void LIBMUSCLE_Instance_get_setting_as_real8array_(std::intptr_t self, char * name, std::size_t name_size, double ** value, std::size_t * value_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Instance_get_setting_as_real8array_(std::intptr_t self, char * name, std::size_t name_size, double ** value, std::size_t * value_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -4218,7 +4218,7 @@ void LIBMUSCLE_Instance_get_setting_as_real8array_(std::intptr_t self, char * na
     }
 }
 
-void LIBMUSCLE_Instance_get_setting_as_real8array2_(std::intptr_t self, char * name, std::size_t name_size, double ** value, std::size_t * value_shape, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+void LIBMUSCLE_MPI_Instance_get_setting_as_real8array2_(std::intptr_t self, char * name, std::size_t name_size, double ** value, std::size_t * value_shape, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string name_s(name, name_size);
     try {
@@ -4276,48 +4276,48 @@ void LIBMUSCLE_Instance_get_setting_as_real8array2_(std::intptr_t self, char * n
     }
 }
 
-std::intptr_t LIBMUSCLE_Instance_list_ports_(std::intptr_t self) {
+std::intptr_t LIBMUSCLE_MPI_Instance_list_ports_(std::intptr_t self) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     PortsDescription * result = new PortsDescription(self_p->list_ports());
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-bool LIBMUSCLE_Instance_is_connected_(std::intptr_t self, char * port, std::size_t port_size) {
+bool LIBMUSCLE_MPI_Instance_is_connected_(std::intptr_t self, char * port, std::size_t port_size) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_s(port, port_size);
     bool result = self_p->is_connected(port_s);
     return result;
 }
 
-bool LIBMUSCLE_Instance_is_vector_port_(std::intptr_t self, char * port, std::size_t port_size) {
+bool LIBMUSCLE_MPI_Instance_is_vector_port_(std::intptr_t self, char * port, std::size_t port_size) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_s(port, port_size);
     bool result = self_p->is_vector_port(port_s);
     return result;
 }
 
-bool LIBMUSCLE_Instance_is_resizable_(std::intptr_t self, char * port, std::size_t port_size) {
+bool LIBMUSCLE_MPI_Instance_is_resizable_(std::intptr_t self, char * port, std::size_t port_size) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_s(port, port_size);
     bool result = self_p->is_resizable(port_s);
     return result;
 }
 
-int LIBMUSCLE_Instance_get_port_length_(std::intptr_t self, char * port, std::size_t port_size) {
+int LIBMUSCLE_MPI_Instance_get_port_length_(std::intptr_t self, char * port, std::size_t port_size) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_s(port, port_size);
     int result = self_p->get_port_length(port_s);
     return result;
 }
 
-void LIBMUSCLE_Instance_set_port_length_(std::intptr_t self, char * port, std::size_t port_size, int length) {
+void LIBMUSCLE_MPI_Instance_set_port_length_(std::intptr_t self, char * port, std::size_t port_size, int length) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_s(port, port_size);
     self_p->set_port_length(port_s, length);
     return;
 }
 
-void LIBMUSCLE_Instance_send_pm_(std::intptr_t self, char * port_name, std::size_t port_name_size, std::intptr_t message) {
+void LIBMUSCLE_MPI_Instance_send_pm_(std::intptr_t self, char * port_name, std::size_t port_name_size, std::intptr_t message) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     Message * message_p = reinterpret_cast<Message *>(message);
@@ -4325,7 +4325,7 @@ void LIBMUSCLE_Instance_send_pm_(std::intptr_t self, char * port_name, std::size
     return;
 }
 
-void LIBMUSCLE_Instance_send_pms_(std::intptr_t self, char * port_name, std::size_t port_name_size, std::intptr_t message, int slot) {
+void LIBMUSCLE_MPI_Instance_send_pms_(std::intptr_t self, char * port_name, std::size_t port_name_size, std::intptr_t message, int slot) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     Message * message_p = reinterpret_cast<Message *>(message);
@@ -4333,7 +4333,7 @@ void LIBMUSCLE_Instance_send_pms_(std::intptr_t self, char * port_name, std::siz
     return;
 }
 
-std::intptr_t LIBMUSCLE_Instance_receive_p_(std::intptr_t self, char * port_name, std::size_t port_name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Instance_receive_p_(std::intptr_t self, char * port_name, std::size_t port_name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     try {
@@ -4379,7 +4379,7 @@ std::intptr_t LIBMUSCLE_Instance_receive_p_(std::intptr_t self, char * port_name
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_Instance_receive_pd_(std::intptr_t self, char * port_name, std::size_t port_name_size, std::intptr_t default_msg, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Instance_receive_pd_(std::intptr_t self, char * port_name, std::size_t port_name_size, std::intptr_t default_msg, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     Message * default_msg_p = reinterpret_cast<Message *>(default_msg);
@@ -4426,7 +4426,7 @@ std::intptr_t LIBMUSCLE_Instance_receive_pd_(std::intptr_t self, char * port_nam
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_Instance_receive_ps_(std::intptr_t self, char * port_name, std::size_t port_name_size, int slot, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Instance_receive_ps_(std::intptr_t self, char * port_name, std::size_t port_name_size, int slot, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     try {
@@ -4472,7 +4472,7 @@ std::intptr_t LIBMUSCLE_Instance_receive_ps_(std::intptr_t self, char * port_nam
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_Instance_receive_psd_(std::intptr_t self, char * port_name, std::size_t port_name_size, int slot, std::intptr_t default_message, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Instance_receive_psd_(std::intptr_t self, char * port_name, std::size_t port_name_size, int slot, std::intptr_t default_message, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     Message * default_message_p = reinterpret_cast<Message *>(default_message);
@@ -4519,7 +4519,7 @@ std::intptr_t LIBMUSCLE_Instance_receive_psd_(std::intptr_t self, char * port_na
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_Instance_receive_with_settings_p_(std::intptr_t self, char * port_name, std::size_t port_name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Instance_receive_with_settings_p_(std::intptr_t self, char * port_name, std::size_t port_name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     try {
@@ -4565,7 +4565,7 @@ std::intptr_t LIBMUSCLE_Instance_receive_with_settings_p_(std::intptr_t self, ch
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_Instance_receive_with_settings_pd_(std::intptr_t self, char * port_name, std::size_t port_name_size, std::intptr_t default_msg, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Instance_receive_with_settings_pd_(std::intptr_t self, char * port_name, std::size_t port_name_size, std::intptr_t default_msg, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     Message * default_msg_p = reinterpret_cast<Message *>(default_msg);
@@ -4612,7 +4612,7 @@ std::intptr_t LIBMUSCLE_Instance_receive_with_settings_pd_(std::intptr_t self, c
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_Instance_receive_with_settings_ps_(std::intptr_t self, char * port_name, std::size_t port_name_size, int slot, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Instance_receive_with_settings_ps_(std::intptr_t self, char * port_name, std::size_t port_name_size, int slot, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     try {
@@ -4658,7 +4658,7 @@ std::intptr_t LIBMUSCLE_Instance_receive_with_settings_ps_(std::intptr_t self, c
     return 0;
 }
 
-std::intptr_t LIBMUSCLE_Instance_receive_with_settings_psd_(std::intptr_t self, char * port_name, std::size_t port_name_size, int slot, std::intptr_t default_msg, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
+std::intptr_t LIBMUSCLE_MPI_Instance_receive_with_settings_psd_(std::intptr_t self, char * port_name, std::size_t port_name_size, int slot, std::intptr_t default_msg, int * err_code, char ** err_msg, std::size_t * err_msg_len) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     std::string port_name_s(port_name, port_name_size);
     Message * default_msg_p = reinterpret_cast<Message *>(default_msg);
@@ -4705,62 +4705,62 @@ std::intptr_t LIBMUSCLE_Instance_receive_with_settings_psd_(std::intptr_t self,
     return 0;
 }
 
-bool LIBMUSCLE_Instance_resuming_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Instance_resuming_(std::intptr_t self) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     bool result = self_p->resuming();
     return result;
 }
 
-bool LIBMUSCLE_Instance_should_init_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Instance_should_init_(std::intptr_t self) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     bool result = self_p->should_init();
     return result;
 }
 
-std::intptr_t LIBMUSCLE_Instance_load_snapshot_(std::intptr_t self) {
+std::intptr_t LIBMUSCLE_MPI_Instance_load_snapshot_(std::intptr_t self) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     Message * result = new Message(self_p->load_snapshot());
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-bool LIBMUSCLE_Instance_should_save_snapshot_(std::intptr_t self, double timestamp) {
+bool LIBMUSCLE_MPI_Instance_should_save_snapshot_(std::intptr_t self, double timestamp) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     bool result = self_p->should_save_snapshot(timestamp);
     return result;
 }
 
-void LIBMUSCLE_Instance_save_snapshot_(std::intptr_t self, std::intptr_t message) {
+void LIBMUSCLE_MPI_Instance_save_snapshot_(std::intptr_t self, std::intptr_t message) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     Message * message_p = reinterpret_cast<Message *>(message);
     self_p->save_snapshot(*message_p);
     return;
 }
 
-bool LIBMUSCLE_Instance_should_save_final_snapshot_(std::intptr_t self) {
+bool LIBMUSCLE_MPI_Instance_should_save_final_snapshot_(std::intptr_t self) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     bool result = self_p->should_save_final_snapshot();
     return result;
 }
 
-void LIBMUSCLE_Instance_save_final_snapshot_(std::intptr_t self, std::intptr_t message) {
+void LIBMUSCLE_MPI_Instance_save_final_snapshot_(std::intptr_t self, std::intptr_t message) {
     Instance * self_p = reinterpret_cast<Instance *>(self);
     Message * message_p = reinterpret_cast<Message *>(message);
     self_p->save_final_snapshot(*message_p);
     return;
 }
 
-std::intptr_t LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_(int count) {
+std::intptr_t LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_create_(int count) {
     CmdLineArgs * result = new CmdLineArgs(count);
     return reinterpret_cast<std::intptr_t>(result);
 }
 
-void LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(std::intptr_t self) {
+void LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_free_(std::intptr_t self) {
     CmdLineArgs * self_p = reinterpret_cast<CmdLineArgs *>(self);
     delete self_p;
     return;
 }
 
-void LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_(std::intptr_t self, int i, char * arg, std::size_t arg_size) {
+void LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_set_arg_(std::intptr_t self, int i, char * arg, std::size_t arg_size) {
     CmdLineArgs * self_p = reinterpret_cast<CmdLineArgs *>(self);
     std::string arg_s(arg, arg_size);
     self_p->set_arg(i, arg_s);
diff --git a/libmuscle/cpp/src/libmuscle/checkpoint_triggers.cpp b/libmuscle/cpp/src/libmuscle/checkpoint_triggers.cpp
index 0c26e4e6..8442f25c 100644
--- a/libmuscle/cpp/src/libmuscle/checkpoint_triggers.cpp
+++ b/libmuscle/cpp/src/libmuscle/checkpoint_triggers.cpp
@@ -3,7 +3,7 @@
 #include <algorithm>
 #include <cmath>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 AtCheckpointTrigger::AtCheckpointTrigger(
         std::vector<double> & at) : at_(at) {
diff --git a/libmuscle/cpp/src/libmuscle/checkpoint_triggers.hpp b/libmuscle/cpp/src/libmuscle/checkpoint_triggers.hpp
index 12c6225f..ae816113 100644
--- a/libmuscle/cpp/src/libmuscle/checkpoint_triggers.hpp
+++ b/libmuscle/cpp/src/libmuscle/checkpoint_triggers.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/util.hpp>
 
 #include <chrono>
@@ -8,7 +9,7 @@
 #include <string>
 #include <vector>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Represents a trigger for creating snapshots
  */
diff --git a/libmuscle/cpp/src/libmuscle/close_port.cpp b/libmuscle/cpp/src/libmuscle/close_port.cpp
index ee0bebba..06516efe 100644
--- a/libmuscle/cpp/src/libmuscle/close_port.cpp
+++ b/libmuscle/cpp/src/libmuscle/close_port.cpp
@@ -3,10 +3,10 @@
 #include <libmuscle/mcp/ext_types.hpp>
 
 
-using libmuscle::impl::mcp::ExtTypeId;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::ExtTypeId;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 ClosePort::ClosePort()
     :  Data()
diff --git a/libmuscle/cpp/src/libmuscle/close_port.hpp b/libmuscle/cpp/src/libmuscle/close_port.hpp
index 0ded8783..fdc93e0f 100644
--- a/libmuscle/cpp/src/libmuscle/close_port.hpp
+++ b/libmuscle/cpp/src/libmuscle/close_port.hpp
@@ -1,9 +1,10 @@
 #pragma once
 
 #include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Represents a ClosePort message.
  *
diff --git a/libmuscle/cpp/src/libmuscle/communicator.cpp b/libmuscle/cpp/src/libmuscle/communicator.cpp
index 5555ac7b..7347106b 100644
--- a/libmuscle/cpp/src/libmuscle/communicator.cpp
+++ b/libmuscle/cpp/src/libmuscle/communicator.cpp
@@ -11,12 +11,12 @@
 #include <limits>
 
 
-using libmuscle::impl::ClosePort;
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::mcp::ExtTypeId;
-using libmuscle::impl::MPPClient;
-using libmuscle::impl::mcp::TcpTransportServer;
+using libmuscle::_MUSCLE_IMPL_NS::ClosePort;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::ExtTypeId;
+using libmuscle::_MUSCLE_IMPL_NS::MPPClient;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::TcpTransportServer;
 
 using ymmsl::Conduit;
 using ymmsl::Identifier;
@@ -25,7 +25,7 @@ using ymmsl::Reference;
 using ymmsl::Settings;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Communicator::Communicator(
         ymmsl::Reference const & kernel,
diff --git a/libmuscle/cpp/src/libmuscle/communicator.hpp b/libmuscle/cpp/src/libmuscle/communicator.hpp
index fd976fd5..cafcfe42 100644
--- a/libmuscle/cpp/src/libmuscle/communicator.hpp
+++ b/libmuscle/cpp/src/libmuscle/communicator.hpp
@@ -9,6 +9,7 @@
 #include <libmuscle/mcp/transport_server.hpp>
 #include <libmuscle/message.hpp>
 #include <libmuscle/mpp_client.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/peer_manager.hpp>
 #include <libmuscle/port.hpp>
 #include <libmuscle/ports_description.hpp>
@@ -23,7 +24,7 @@
 #include <vector>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Communication engine for MUSCLE3.
  *
diff --git a/libmuscle/cpp/src/libmuscle/data.cpp b/libmuscle/cpp/src/libmuscle/data.cpp
index 53b57694..26b39178 100644
--- a/libmuscle/cpp/src/libmuscle/data.cpp
+++ b/libmuscle/cpp/src/libmuscle/data.cpp
@@ -14,13 +14,13 @@
 #include "ymmsl/identity.hpp"
 #include "ymmsl/settings.hpp"
 
-using libmuscle::impl::mcp::ExtTypeId;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::ExtTypeId;
 using ymmsl::SettingValue;
 using ymmsl::Reference;
 using ymmsl::Settings;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 // helper functions
 
@@ -966,5 +966,5 @@ DataConstRef DataConstRef::grid_data_<bool>(
     }
 }
 
-} }  // namespace libmuscle::impl
+} }  // namespace libmuscle::_MUSCLE_IMPL_NS
 
diff --git a/libmuscle/cpp/src/libmuscle/data.hpp b/libmuscle/cpp/src/libmuscle/data.hpp
index 7c3ceacd..f9550789 100644
--- a/libmuscle/cpp/src/libmuscle/data.hpp
+++ b/libmuscle/cpp/src/libmuscle/data.hpp
@@ -1,5 +1,7 @@
 #pragma once
 
+#include <libmuscle/namespace.hpp>
+
 #include <cstddef>
 #include <memory>
 #include <stdexcept>
@@ -12,7 +14,7 @@
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 enum class StorageOrder {
     first_adjacent,
@@ -492,7 +494,7 @@ class DataConstRef {
 
         // see comment at Data::init_dict_'s implementation
         friend class Data;
-        friend bool ::libmuscle::impl::is_close_port(DataConstRef const &);
+        friend bool ::libmuscle::_MUSCLE_IMPL_NS::is_close_port(DataConstRef const &);
 
         bool is_a_grid_() const;
 
@@ -765,12 +767,12 @@ class Data : public DataConstRef {
 
         friend struct msgpack::adaptor::pack<Data>;
         friend struct msgpack::adaptor::object_with_zone<Data>;
-        friend Data libmuscle::impl::mcp::unpack_data(
+        friend Data libmuscle::_MUSCLE_IMPL_NS::mcp::unpack_data(
                 std::shared_ptr<msgpack::zone> const & zone,
                 char const * begin, std::size_t length);
 };
 
-} }   // namespace libmuscle::impl
+} }   // namespace libmuscle::_MUSCLE_IMPL_NS
 
 #include <libmuscle/data.tpp>
 
diff --git a/libmuscle/cpp/src/libmuscle/data.tpp b/libmuscle/cpp/src/libmuscle/data.tpp
index c2a4d5ec..2c59f98a 100644
--- a/libmuscle/cpp/src/libmuscle/data.tpp
+++ b/libmuscle/cpp/src/libmuscle/data.tpp
@@ -11,7 +11,7 @@
 #include <msgpack.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 template <>
 ymmsl::SettingValue DataConstRef::as<ymmsl::SettingValue>() const;
@@ -108,5 +108,5 @@ void Data::init_list_(uint32_t offset, Arg const & value,
     mp_obj_->via.array.ptr[offset] = msgpack::object(value, *mp_zones_->front());
 }
 
-} }   // namespace libmuscle::impl
+} }   // namespace libmuscle::_MUSCLE_IMPL_NS
 
diff --git a/libmuscle/cpp/src/libmuscle/endpoint.cpp b/libmuscle/cpp/src/libmuscle/endpoint.cpp
index 16c4d945..1c138156 100644
--- a/libmuscle/cpp/src/libmuscle/endpoint.cpp
+++ b/libmuscle/cpp/src/libmuscle/endpoint.cpp
@@ -5,7 +5,7 @@ using ymmsl::Identifier;
 using ymmsl::Reference;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Endpoint::Endpoint(
         Reference const & kernel,
diff --git a/libmuscle/cpp/src/libmuscle/endpoint.hpp b/libmuscle/cpp/src/libmuscle/endpoint.hpp
index 7bfdadbd..27bc024e 100644
--- a/libmuscle/cpp/src/libmuscle/endpoint.hpp
+++ b/libmuscle/cpp/src/libmuscle/endpoint.hpp
@@ -1,12 +1,14 @@
 #pragma once
 
+#include <libmuscle/namespace.hpp>
+
 #include <string>
 #include <vector>
 
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /* Place that a message is sent from and to.
  *
diff --git a/libmuscle/cpp/src/libmuscle/instance.cpp b/libmuscle/cpp/src/libmuscle/instance.cpp
index 7616ad27..b6da73e7 100644
--- a/libmuscle/cpp/src/libmuscle/instance.cpp
+++ b/libmuscle/cpp/src/libmuscle/instance.cpp
@@ -29,9 +29,9 @@ using ymmsl::Operator;
 using ymmsl::Reference;
 using ymmsl::Settings;
 
-using libmuscle::impl::LogLevel;
-using libmuscle::impl::ProfileEvent;
-using libmuscle::impl::ProfileEventType;
+using libmuscle::_MUSCLE_IMPL_NS::LogLevel;
+using libmuscle::_MUSCLE_IMPL_NS::ProfileEvent;
+using libmuscle::_MUSCLE_IMPL_NS::ProfileEventType;
 
 
 namespace {
@@ -64,7 +64,7 @@ LogLevel string_to_level(std::string const & log_level_str) {
 }
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 class Instance::Impl {
     public:
diff --git a/libmuscle/cpp/src/libmuscle/instance.hpp b/libmuscle/cpp/src/libmuscle/instance.hpp
index 95d885fc..c6c9bd96 100644
--- a/libmuscle/cpp/src/libmuscle/instance.hpp
+++ b/libmuscle/cpp/src/libmuscle/instance.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <libmuscle/message.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/ports_description.hpp>
 
 #ifdef MUSCLE_ENABLE_MPI
@@ -12,7 +13,7 @@
 #include <memory>
 #include <string>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Enumeration of properties that an instance may have.
  *
diff --git a/libmuscle/cpp/src/libmuscle/libmuscle.hpp b/libmuscle/cpp/src/libmuscle/libmuscle.hpp
index 335d4364..5abc5b61 100644
--- a/libmuscle/cpp/src/libmuscle/libmuscle.hpp
+++ b/libmuscle/cpp/src/libmuscle/libmuscle.hpp
@@ -1,3 +1,6 @@
+#pragma once
+
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/data.hpp>
 #include <libmuscle/instance.hpp>
 #include <libmuscle/mcp/data_pack.hpp>
@@ -6,13 +9,13 @@
 
 
 namespace libmuscle {
-    using impl::Data;
-    using impl::DataConstRef;
-    using impl::Instance;
+    using _MUSCLE_IMPL_NS::Data;
+    using _MUSCLE_IMPL_NS::DataConstRef;
+    using _MUSCLE_IMPL_NS::Instance;
     // Note: C++20 allows using enum, which introduces all enum members in this scope
-    using impl::InstanceFlags;
-    using impl::Message;
-    using impl::PortsDescription;
-    using impl::StorageOrder;
+    using _MUSCLE_IMPL_NS::InstanceFlags;
+    using _MUSCLE_IMPL_NS::Message;
+    using _MUSCLE_IMPL_NS::PortsDescription;
+    using _MUSCLE_IMPL_NS::StorageOrder;
 }
 
diff --git a/libmuscle/cpp/src/libmuscle/logger.cpp b/libmuscle/cpp/src/libmuscle/logger.cpp
index 0bad4810..eb27e6d9 100644
--- a/libmuscle/cpp/src/libmuscle/logger.cpp
+++ b/libmuscle/cpp/src/libmuscle/logger.cpp
@@ -2,7 +2,7 @@
 #include "libmuscle/util.hpp"
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Logger::Logger(std::string const & instance_id, std::string const & log_file, MMPClient & manager)
     : instance_id_(instance_id)
diff --git a/libmuscle/cpp/src/libmuscle/logger.hpp b/libmuscle/cpp/src/libmuscle/logger.hpp
index 2e48d064..e4ae305f 100644
--- a/libmuscle/cpp/src/libmuscle/logger.hpp
+++ b/libmuscle/cpp/src/libmuscle/logger.hpp
@@ -5,6 +5,7 @@
 #else
 
 #include <libmuscle/mmp_client.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/logging.hpp>
 
 #include <fstream>
@@ -12,7 +13,7 @@
 #include <string>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** A component that lets you log things to an MMPClient.
  */
diff --git a/libmuscle/cpp/src/libmuscle/logger.tpp b/libmuscle/cpp/src/libmuscle/logger.tpp
index d6e0ec8f..0d68a05d 100644
--- a/libmuscle/cpp/src/libmuscle/logger.tpp
+++ b/libmuscle/cpp/src/libmuscle/logger.tpp
@@ -2,7 +2,7 @@
 #include <ostream>
 #include <sstream>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 template <typename... Args>
 void Logger::log(LogLevel level, Args... args) {
diff --git a/libmuscle/cpp/src/libmuscle/logging.cpp b/libmuscle/cpp/src/libmuscle/logging.cpp
index 2c8777ee..6f74622c 100644
--- a/libmuscle/cpp/src/libmuscle/logging.cpp
+++ b/libmuscle/cpp/src/libmuscle/logging.cpp
@@ -3,7 +3,7 @@
 #include "logging.hpp"
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 std::ostream & operator<<(std::ostream & os, LogLevel level) {
     switch (level) {
diff --git a/libmuscle/cpp/src/libmuscle/logging.hpp b/libmuscle/cpp/src/libmuscle/logging.hpp
index 90e3a236..f9e8d8f1 100644
--- a/libmuscle/cpp/src/libmuscle/logging.hpp
+++ b/libmuscle/cpp/src/libmuscle/logging.hpp
@@ -1,12 +1,13 @@
 #pragma once
 
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/timestamp.hpp>
 
 #include <ostream>
 #include <string>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Log levels for MUSCLE3.
  *
diff --git a/libmuscle/cpp/src/libmuscle/mcp/data_pack.cpp b/libmuscle/cpp/src/libmuscle/mcp/data_pack.cpp
index 1c830d25..b5ac3df6 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/data_pack.cpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/data_pack.cpp
@@ -3,7 +3,7 @@
 #include <msgpack.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 namespace mcp {
 
@@ -16,5 +16,5 @@ Data unpack_data(std::shared_ptr<msgpack::zone> const & zone, char const * begin
 
 }   // namespace mcp
 
-} }   // namespace libmuscle::impl
+} }   // namespace libmuscle::_MUSCLE_IMPL_NS
 
diff --git a/libmuscle/cpp/src/libmuscle/mcp/data_pack.hpp b/libmuscle/cpp/src/libmuscle/mcp/data_pack.hpp
index b3541418..5ac408d9 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/data_pack.hpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/data_pack.hpp
@@ -1,13 +1,14 @@
 #pragma once
 
-#include "libmuscle/data.hpp"
+#include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <memory>
 
 #include <msgpack.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 namespace mcp {
 
@@ -28,7 +29,7 @@ Data unpack_data(
 
 }   // namespace mcp
 
-} }   // namespace libmuscle::impl
+} }   // namespace libmuscle::_MUSCLE_IMPL_NS
 
 #include "libmuscle/mcp/data_pack.tpp"
 
diff --git a/libmuscle/cpp/src/libmuscle/mcp/data_pack.tpp b/libmuscle/cpp/src/libmuscle/mcp/data_pack.tpp
index 2f99ba2c..3f880608 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/data_pack.tpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/data_pack.tpp
@@ -8,11 +8,11 @@ MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS) {
 namespace adaptor {
 
 template<>
-struct pack<::libmuscle::impl::DataConstRef> {
+struct pack<::libmuscle::_MUSCLE_IMPL_NS::DataConstRef> {
     template <typename Stream>
     packer<Stream>& operator()(
             msgpack::packer<Stream>& o,
-            ::libmuscle::impl::DataConstRef const& v) const
+            ::libmuscle::_MUSCLE_IMPL_NS::DataConstRef const& v) const
     {
         o.pack(*v.mp_obj_);
         return o;
@@ -20,11 +20,11 @@ struct pack<::libmuscle::impl::DataConstRef> {
 };
 
 template<>
-struct pack<::libmuscle::impl::Data> {
+struct pack<::libmuscle::_MUSCLE_IMPL_NS::Data> {
     template <typename Stream>
     packer<Stream>& operator()(
             msgpack::packer<Stream>& o,
-            ::libmuscle::impl::Data const& v) const
+            ::libmuscle::_MUSCLE_IMPL_NS::Data const& v) const
     {
         o.pack(*v.mp_obj_);
         return o;
@@ -32,10 +32,10 @@ struct pack<::libmuscle::impl::Data> {
 };
 
 template <>
-struct object_with_zone<::libmuscle::impl::DataConstRef> {
+struct object_with_zone<::libmuscle::_MUSCLE_IMPL_NS::DataConstRef> {
     void operator()(
             msgpack::object::with_zone & obj,
-            ::libmuscle::impl::DataConstRef const & d) const
+            ::libmuscle::_MUSCLE_IMPL_NS::DataConstRef const & d) const
     {
         obj.type = d.mp_obj_->type;
         obj.via = d.mp_obj_->via;
@@ -43,10 +43,10 @@ struct object_with_zone<::libmuscle::impl::DataConstRef> {
 };
 
 template <>
-struct object_with_zone<::libmuscle::impl::Data> {
+struct object_with_zone<::libmuscle::_MUSCLE_IMPL_NS::Data> {
     void operator()(
             msgpack::object::with_zone & obj,
-            ::libmuscle::impl::Data const & d) const
+            ::libmuscle::_MUSCLE_IMPL_NS::Data const & d) const
     {
         obj.type = d.mp_obj_->type;
         obj.via = d.mp_obj_->via;
diff --git a/libmuscle/cpp/src/libmuscle/mcp/ext_types.hpp b/libmuscle/cpp/src/libmuscle/mcp/ext_types.hpp
index 86ae586b..e1d06ef1 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/ext_types.hpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/ext_types.hpp
@@ -2,8 +2,10 @@
 
 #include <cstdint>
 
+#include <libmuscle/namespace.hpp>
 
-namespace libmuscle { namespace impl { namespace mcp {
+
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 enum class ExtTypeId : int8_t {
     close_port = 0,
diff --git a/libmuscle/cpp/src/libmuscle/mcp/protocol.hpp b/libmuscle/cpp/src/libmuscle/mcp/protocol.hpp
index 15ac48d2..c45df271 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/protocol.hpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/protocol.hpp
@@ -1,6 +1,8 @@
 #pragma once
 
-namespace libmuscle { namespace impl {
+#include <libmuscle/namespace.hpp>
+
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Request type for MMP requests
  *
diff --git a/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_client.cpp b/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_client.cpp
index 746e3a74..315cf44e 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_client.cpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_client.cpp
@@ -84,7 +84,7 @@ int connect(std::string const & address) {
 }
 
 
-namespace libmuscle { namespace impl { namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 bool TcpTransportClient::can_connect_to(std::string const & location) {
     return location.compare(0u, 4u, "tcp:") == 0;
diff --git a/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_client.hpp b/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_client.hpp
index e22f689f..b6e3c129 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_client.hpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_client.hpp
@@ -4,12 +4,13 @@
 #include LIBMUSCLE_MOCK_MCP_TCP_TRANSPORT_CLIENT
 #else
 
-#include "libmuscle/mcp/transport_client.hpp"
-#include "libmuscle/data.hpp"
+#include <libmuscle/mcp/transport_client.hpp>
+#include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <tuple>
 
-namespace libmuscle { namespace impl { namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 /** A client that connects to a TCPTransport server.
  */
diff --git a/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_server.cpp b/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_server.cpp
index f86c6ff1..914c4167 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_server.cpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_server.cpp
@@ -19,11 +19,11 @@
 
 using namespace std::string_literals;
 
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::mcp::recv_all;
-using libmuscle::impl::mcp::send_frame;
-using libmuscle::impl::mcp::recv_int64;
-using libmuscle::impl::mcp::RequestHandler;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::recv_all;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::send_frame;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::recv_int64;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::RequestHandler;
 
 
 namespace {
@@ -281,7 +281,7 @@ class TcpTransportServerWorker {
 }
 
 
-namespace libmuscle { namespace impl { namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 TcpTransportServer::TcpTransportServer(RequestHandler & handler)
     : TransportServer(handler)
diff --git a/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_server.hpp b/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_server.hpp
index 45a127d9..933077c6 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_server.hpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/tcp_transport_server.hpp
@@ -5,13 +5,14 @@
 #else
 
 #include <libmuscle/mcp/transport_server.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <condition_variable>
 #include <thread>
 #include <netdb.h>
 
 
-namespace libmuscle { namespace impl { namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 /** A server that accepts TCP connections.
  */
diff --git a/libmuscle/cpp/src/libmuscle/mcp/tcp_util.cpp b/libmuscle/cpp/src/libmuscle/mcp/tcp_util.cpp
index 4bafa5ad..193ffcb3 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/tcp_util.cpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/tcp_util.cpp
@@ -7,7 +7,7 @@
 #include <sys/socket.h>
 
 
-namespace libmuscle { namespace impl { namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 ssize_t send_all(int fd, char const * data, ssize_t length) {
     for (ssize_t sent = 0; sent < length; ) {
diff --git a/libmuscle/cpp/src/libmuscle/mcp/tcp_util.hpp b/libmuscle/cpp/src/libmuscle/mcp/tcp_util.hpp
index 2e9ef30d..421bf669 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/tcp_util.hpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/tcp_util.hpp
@@ -2,8 +2,10 @@
 
 #include <sys/types.h>
 
+#include <libmuscle/namespace.hpp>
 
-namespace libmuscle { namespace impl { namespace mcp {
+
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 /* Send a message on a socket.
  *
diff --git a/libmuscle/cpp/src/libmuscle/mcp/transport_client.cpp b/libmuscle/cpp/src/libmuscle/mcp/transport_client.cpp
index abd2de52..3ffbd62b 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/transport_client.cpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/transport_client.cpp
@@ -1,7 +1,7 @@
 #include <libmuscle/mcp/transport_client.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 namespace mcp {
 
@@ -13,5 +13,5 @@ TransportClient::~TransportClient() {}
 
 }   // namespace mcp
 
-} }   // namespace libmuscle::impl
+} }   // namespace libmuscle::_MUSCLE_IMPL_NS
 
diff --git a/libmuscle/cpp/src/libmuscle/mcp/transport_client.hpp b/libmuscle/cpp/src/libmuscle/mcp/transport_client.hpp
index 171afb50..c8fca9b9 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/transport_client.hpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/transport_client.hpp
@@ -1,7 +1,7 @@
 #pragma once
 
 #include <libmuscle/data.hpp>
-
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/profiling.hpp>
 
 #include <string>
@@ -9,7 +9,7 @@
 #include <vector>
 
 
-namespace libmuscle { namespace impl { namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 
 /** Timeline of a receive.
diff --git a/libmuscle/cpp/src/libmuscle/mcp/transport_server.cpp b/libmuscle/cpp/src/libmuscle/mcp/transport_server.cpp
index 56dfcf56..3337bad8 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/transport_server.cpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/transport_server.cpp
@@ -1,7 +1,7 @@
 #include <libmuscle/mcp/transport_server.hpp>
 
 
-namespace libmuscle { namespace impl {namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {namespace mcp {
 
 
 RequestHandler::~RequestHandler() {}
diff --git a/libmuscle/cpp/src/libmuscle/mcp/transport_server.hpp b/libmuscle/cpp/src/libmuscle/mcp/transport_server.hpp
index 38b612c0..d3f7f052 100644
--- a/libmuscle/cpp/src/libmuscle/mcp/transport_server.hpp
+++ b/libmuscle/cpp/src/libmuscle/mcp/transport_server.hpp
@@ -1,13 +1,14 @@
 #pragma once
 
-#include "libmuscle/data.hpp"
+#include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <memory>
 #include <string>
 #include <vector>
 
 
-namespace libmuscle { namespace impl { namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 /** Handles requests sent to a TransportServer.
  *
diff --git a/libmuscle/cpp/src/libmuscle/message.cpp b/libmuscle/cpp/src/libmuscle/message.cpp
index e5a648f9..3b72e61a 100644
--- a/libmuscle/cpp/src/libmuscle/message.cpp
+++ b/libmuscle/cpp/src/libmuscle/message.cpp
@@ -4,7 +4,7 @@
 using ymmsl::Settings;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Message::Message(
         double timestamp)
diff --git a/libmuscle/cpp/src/libmuscle/message.hpp b/libmuscle/cpp/src/libmuscle/message.hpp
index c73ad01e..085a33ff 100644
--- a/libmuscle/cpp/src/libmuscle/message.hpp
+++ b/libmuscle/cpp/src/libmuscle/message.hpp
@@ -1,12 +1,13 @@
 #pragma once
 
 #include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/util.hpp>
 
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** A message to be sent or received.
  *
diff --git a/libmuscle/cpp/src/libmuscle/mmp_client.cpp b/libmuscle/cpp/src/libmuscle/mmp_client.cpp
index ef59f9a2..793b0b09 100644
--- a/libmuscle/cpp/src/libmuscle/mmp_client.cpp
+++ b/libmuscle/cpp/src/libmuscle/mmp_client.cpp
@@ -20,12 +20,12 @@
 #include "ymmsl/ymmsl.hpp"
 
 
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::mcp::unpack_data;
-using libmuscle::impl::Optional;
-using libmuscle::impl::ProfileEvent;
-using libmuscle::impl::SnapshotMetadata;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::unpack_data;
+using libmuscle::_MUSCLE_IMPL_NS::Optional;
+using libmuscle::_MUSCLE_IMPL_NS::ProfileEvent;
+using libmuscle::_MUSCLE_IMPL_NS::SnapshotMetadata;
 using std::chrono::steady_clock;
 using ymmsl::Conduit;
 using ymmsl::Reference;
@@ -129,7 +129,7 @@ namespace {
     }
 }
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 MMPClient::MMPClient(
         Reference const & instance_id, std::string const & location)
diff --git a/libmuscle/cpp/src/libmuscle/mmp_client.hpp b/libmuscle/cpp/src/libmuscle/mmp_client.hpp
index c4a33767..0ba9245e 100644
--- a/libmuscle/cpp/src/libmuscle/mmp_client.hpp
+++ b/libmuscle/cpp/src/libmuscle/mmp_client.hpp
@@ -14,13 +14,14 @@
 #include <libmuscle/data.hpp>
 #include <libmuscle/logging.hpp>
 #include <libmuscle/mcp/tcp_transport_client.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/profiling.hpp>
 #include <libmuscle/snapshot.hpp>
 #include <libmuscle/util.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** The client for the MUSCLE Manager Protocol.
  *
diff --git a/libmuscle/cpp/src/libmuscle/mpi_tcp_barrier.cpp b/libmuscle/cpp/src/libmuscle/mpi_tcp_barrier.cpp
index 79c0e50a..7de169f3 100644
--- a/libmuscle/cpp/src/libmuscle/mpi_tcp_barrier.cpp
+++ b/libmuscle/cpp/src/libmuscle/mpi_tcp_barrier.cpp
@@ -12,11 +12,11 @@
 #include <string>
 
 
-using libmuscle::impl::mcp::TcpTransportClient;
-using libmuscle::impl::mcp::TcpTransportServer;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::TcpTransportClient;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::TcpTransportServer;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 
 MPITcpBarrier::MPITcpBarrier(MPI_Comm const & communicator, int root)
diff --git a/libmuscle/cpp/src/libmuscle/mpi_tcp_barrier.hpp b/libmuscle/cpp/src/libmuscle/mpi_tcp_barrier.hpp
index 26ea3c09..c8f038b7 100644
--- a/libmuscle/cpp/src/libmuscle/mpi_tcp_barrier.hpp
+++ b/libmuscle/cpp/src/libmuscle/mpi_tcp_barrier.hpp
@@ -8,10 +8,11 @@
 
 #include <libmuscle/mpp_client.hpp>
 #include <libmuscle/mcp/tcp_transport_server.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/post_office.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 
 /** A barrier for MPI processes that uses TCP to communicate.
diff --git a/libmuscle/cpp/src/libmuscle/mpp_client.cpp b/libmuscle/cpp/src/libmuscle/mpp_client.cpp
index 274cb421..b1919509 100644
--- a/libmuscle/cpp/src/libmuscle/mpp_client.cpp
+++ b/libmuscle/cpp/src/libmuscle/mpp_client.cpp
@@ -9,14 +9,14 @@
 #include <stdexcept>
 
 
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::mcp::ProfileData;
-using libmuscle::impl::mcp::TcpTransportClient;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::ProfileData;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::TcpTransportClient;
 using ymmsl::Reference;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 MPPClient::MPPClient(std::vector<std::string> const & locations) {
     try_connect_<TcpTransportClient>(locations);
diff --git a/libmuscle/cpp/src/libmuscle/mpp_client.hpp b/libmuscle/cpp/src/libmuscle/mpp_client.hpp
index 8e9be99e..16074ec0 100644
--- a/libmuscle/cpp/src/libmuscle/mpp_client.hpp
+++ b/libmuscle/cpp/src/libmuscle/mpp_client.hpp
@@ -4,8 +4,9 @@
 #include LIBMUSCLE_MOCK_MPP_CLIENT
 #else
 
-#include "libmuscle/data.hpp"
-#include "libmuscle/mcp/transport_client.hpp"
+#include <libmuscle/data.hpp>
+#include <libmuscle/mcp/transport_client.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <ymmsl/ymmsl.hpp>
 
@@ -15,7 +16,7 @@
 #include <vector>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** A client that connects to an MPP server.
  *
diff --git a/libmuscle/cpp/src/libmuscle/mpp_message.cpp b/libmuscle/cpp/src/libmuscle/mpp_message.cpp
index 344adb23..26a483f4 100644
--- a/libmuscle/cpp/src/libmuscle/mpp_message.cpp
+++ b/libmuscle/cpp/src/libmuscle/mpp_message.cpp
@@ -8,13 +8,13 @@
 #include <utility>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 MPPMessage::MPPMessage(
             ::ymmsl::Reference const & sender,
             ::ymmsl::Reference const & receiver,
-            ::libmuscle::impl::Optional<int> port_length,
-            double timestamp, ::libmuscle::impl::Optional<double> next_timestamp,
+            ::libmuscle::_MUSCLE_IMPL_NS::Optional<int> port_length,
+            double timestamp, ::libmuscle::_MUSCLE_IMPL_NS::Optional<double> next_timestamp,
             DataConstRef const & settings_overlay,
             int message_number, double saved_until,
             DataConstRef const & data
@@ -36,11 +36,11 @@ MPPMessage MPPMessage::from_bytes(DataConstRef const & data) {
     DataConstRef dict = mcp::unpack_data(zone, data.as_byte_array(), data.size());
 
     // create message
-    libmuscle::impl::Optional<int> port_length;
+    libmuscle::_MUSCLE_IMPL_NS::Optional<int> port_length;
     if (dict["port_length"].is_a<int>())
         port_length = dict["port_length"].as<int>();
 
-    libmuscle::impl::Optional<double> next_timestamp;
+    libmuscle::_MUSCLE_IMPL_NS::Optional<double> next_timestamp;
     if (dict["next_timestamp"].is_a<double>())
         next_timestamp = dict["next_timestamp"].as<double>();
 
diff --git a/libmuscle/cpp/src/libmuscle/mpp_message.hpp b/libmuscle/cpp/src/libmuscle/mpp_message.hpp
index 69f15645..7973f430 100644
--- a/libmuscle/cpp/src/libmuscle/mpp_message.hpp
+++ b/libmuscle/cpp/src/libmuscle/mpp_message.hpp
@@ -1,11 +1,12 @@
 #pragma once
 
 #include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/util.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** A MUSCLE Peer Protocol message.
  *
@@ -30,8 +31,8 @@ struct MPPMessage {
      */
     MPPMessage(
             ::ymmsl::Reference const & sender, ::ymmsl::Reference const & receiver,
-            ::libmuscle::impl::Optional<int> port_length,
-            double timestamp, ::libmuscle::impl::Optional<double> next_timestamp,
+            Optional<int> port_length,
+            double timestamp, Optional<double> next_timestamp,
             DataConstRef const & settings_overlay, int message_number,
             double saved_until, DataConstRef const & data);
 
@@ -49,9 +50,9 @@ struct MPPMessage {
 
     ::ymmsl::Reference sender;
     ::ymmsl::Reference receiver;
-    ::libmuscle::impl::Optional<int> port_length;
+    Optional<int> port_length;
     double timestamp;
-    ::libmuscle::impl::Optional<double> next_timestamp;
+    Optional<double> next_timestamp;
     DataConstRef settings_overlay;
     int message_number;
     double saved_until;
diff --git a/libmuscle/cpp/src/libmuscle/namespace.hpp b/libmuscle/cpp/src/libmuscle/namespace.hpp
new file mode 100644
index 00000000..e7bf789d
--- /dev/null
+++ b/libmuscle/cpp/src/libmuscle/namespace.hpp
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef MUSCLE_ENABLE_MPI
+#define _MUSCLE_IMPL_NS mpi_impl
+#else
+#define _MUSCLE_IMPL_NS impl
+#endif
diff --git a/libmuscle/cpp/src/libmuscle/outbox.cpp b/libmuscle/cpp/src/libmuscle/outbox.cpp
index 08a37530..cee6a9f9 100644
--- a/libmuscle/cpp/src/libmuscle/outbox.cpp
+++ b/libmuscle/cpp/src/libmuscle/outbox.cpp
@@ -6,7 +6,7 @@
 #include <unistd.h>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Outbox::Outbox()
     : notification_fd_(-1)
diff --git a/libmuscle/cpp/src/libmuscle/outbox.hpp b/libmuscle/cpp/src/libmuscle/outbox.hpp
index 84a786ca..1e643ef8 100644
--- a/libmuscle/cpp/src/libmuscle/outbox.hpp
+++ b/libmuscle/cpp/src/libmuscle/outbox.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <ymmsl/ymmsl.hpp>
 
@@ -9,7 +10,7 @@
 #include <mutex>
 #include <vector>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 
 /** Stores messages to be sent to a particular receiver.
diff --git a/libmuscle/cpp/src/libmuscle/peer_manager.cpp b/libmuscle/cpp/src/libmuscle/peer_manager.cpp
index d5e8923c..97ab41a4 100644
--- a/libmuscle/cpp/src/libmuscle/peer_manager.cpp
+++ b/libmuscle/cpp/src/libmuscle/peer_manager.cpp
@@ -7,7 +7,7 @@ using ymmsl::Identifier;
 using ymmsl::Reference;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 PeerManager::PeerManager(
         Reference const & kernel,
diff --git a/libmuscle/cpp/src/libmuscle/peer_manager.hpp b/libmuscle/cpp/src/libmuscle/peer_manager.hpp
index 024b40fa..e50dbf3c 100644
--- a/libmuscle/cpp/src/libmuscle/peer_manager.hpp
+++ b/libmuscle/cpp/src/libmuscle/peer_manager.hpp
@@ -7,13 +7,14 @@
 #include <ymmsl/ymmsl.hpp>
 
 #include <libmuscle/endpoint.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <string>
 #include <unordered_map>
 #include <vector>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 using PeerDims = std::unordered_map<ymmsl::Reference, std::vector<int>>;
 using PeerLocations = std::unordered_map<
diff --git a/libmuscle/cpp/src/libmuscle/port.cpp b/libmuscle/cpp/src/libmuscle/port.cpp
index 1dd32a44..7c8ab0dc 100644
--- a/libmuscle/cpp/src/libmuscle/port.cpp
+++ b/libmuscle/cpp/src/libmuscle/port.cpp
@@ -24,7 +24,7 @@ inline void extend_vector_to_size(
 }
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Port::Port(
         std::string const & name, Operator oper,
diff --git a/libmuscle/cpp/src/libmuscle/port.hpp b/libmuscle/cpp/src/libmuscle/port.hpp
index 908fb270..f3301a83 100644
--- a/libmuscle/cpp/src/libmuscle/port.hpp
+++ b/libmuscle/cpp/src/libmuscle/port.hpp
@@ -1,10 +1,11 @@
 #pragma once
 
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/util.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Represents a gateway to the outside world.
  *
diff --git a/libmuscle/cpp/src/libmuscle/ports_description.hpp b/libmuscle/cpp/src/libmuscle/ports_description.hpp
index dbbe764f..129d4755 100644
--- a/libmuscle/cpp/src/libmuscle/ports_description.hpp
+++ b/libmuscle/cpp/src/libmuscle/ports_description.hpp
@@ -1,3 +1,7 @@
+#pragma once
+
+#include <libmuscle/namespace.hpp>
+
 #include <string>
 #include <unordered_map>
 #include <vector>
@@ -5,7 +9,7 @@
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** A description of which ports a component has.
  *
diff --git a/libmuscle/cpp/src/libmuscle/post_office.cpp b/libmuscle/cpp/src/libmuscle/post_office.cpp
index da259fd6..3b877af2 100644
--- a/libmuscle/cpp/src/libmuscle/post_office.cpp
+++ b/libmuscle/cpp/src/libmuscle/post_office.cpp
@@ -15,7 +15,7 @@
 using ymmsl::Reference;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Pipe::Pipe() {
     int pipe_fds[2];
diff --git a/libmuscle/cpp/src/libmuscle/post_office.hpp b/libmuscle/cpp/src/libmuscle/post_office.hpp
index 5ce5c9ad..0d770394 100644
--- a/libmuscle/cpp/src/libmuscle/post_office.hpp
+++ b/libmuscle/cpp/src/libmuscle/post_office.hpp
@@ -6,6 +6,7 @@
 
 
 #include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/outbox.hpp>
 #include <libmuscle/mcp/transport_server.hpp>
 
@@ -17,7 +18,7 @@
 #include <mutex>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Helper class for managing pipes.
  *
diff --git a/libmuscle/cpp/src/libmuscle/profiler.cpp b/libmuscle/cpp/src/libmuscle/profiler.cpp
index 4b264ae7..50695021 100644
--- a/libmuscle/cpp/src/libmuscle/profiler.cpp
+++ b/libmuscle/cpp/src/libmuscle/profiler.cpp
@@ -3,7 +3,7 @@
 #include <libmuscle/profiling.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Profiler::Profiler(MMPClient & manager)
     : manager_(manager)
diff --git a/libmuscle/cpp/src/libmuscle/profiler.hpp b/libmuscle/cpp/src/libmuscle/profiler.hpp
index 1b155fa9..134b4df1 100644
--- a/libmuscle/cpp/src/libmuscle/profiler.hpp
+++ b/libmuscle/cpp/src/libmuscle/profiler.hpp
@@ -6,11 +6,12 @@
 
 
 #include <libmuscle/mmp_client.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/profiling.hpp>
 #include <libmuscle/timestamp.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Collects profiling events and sends them to the manager.
  */
diff --git a/libmuscle/cpp/src/libmuscle/profiling.cpp b/libmuscle/cpp/src/libmuscle/profiling.cpp
index 2160d105..12fbe279 100644
--- a/libmuscle/cpp/src/libmuscle/profiling.cpp
+++ b/libmuscle/cpp/src/libmuscle/profiling.cpp
@@ -24,7 +24,7 @@ namespace {
 }
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /* Note that this is not inlined, as translation units are compiled
  * separately and we don't use LTO. That should keep the compiler from
diff --git a/libmuscle/cpp/src/libmuscle/profiling.hpp b/libmuscle/cpp/src/libmuscle/profiling.hpp
index 8f937e81..cd421378 100644
--- a/libmuscle/cpp/src/libmuscle/profiling.hpp
+++ b/libmuscle/cpp/src/libmuscle/profiling.hpp
@@ -3,12 +3,13 @@
 #include <cstddef>
 #include <cstdint>
 
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/timestamp.hpp>
 #include <libmuscle/util.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Profiling event types for MUSCLE3.
  *
diff --git a/libmuscle/cpp/src/libmuscle/settings_manager.cpp b/libmuscle/cpp/src/libmuscle/settings_manager.cpp
index 5b07a145..2373ff7d 100644
--- a/libmuscle/cpp/src/libmuscle/settings_manager.cpp
+++ b/libmuscle/cpp/src/libmuscle/settings_manager.cpp
@@ -10,7 +10,7 @@ using ymmsl::Reference;
 using ymmsl::Settings;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 SettingValue const & SettingsManager::get_setting(
         Reference const & instance,
diff --git a/libmuscle/cpp/src/libmuscle/settings_manager.hpp b/libmuscle/cpp/src/libmuscle/settings_manager.hpp
index d883360d..70d133f1 100644
--- a/libmuscle/cpp/src/libmuscle/settings_manager.hpp
+++ b/libmuscle/cpp/src/libmuscle/settings_manager.hpp
@@ -1,9 +1,11 @@
 #pragma once
 
+#include <libmuscle/namespace.hpp>
+
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Manages the current settings for a component instance.
  */
diff --git a/libmuscle/cpp/src/libmuscle/snapshot.cpp b/libmuscle/cpp/src/libmuscle/snapshot.cpp
index 77e19c52..73e0b694 100644
--- a/libmuscle/cpp/src/libmuscle/snapshot.cpp
+++ b/libmuscle/cpp/src/libmuscle/snapshot.cpp
@@ -8,7 +8,7 @@
 #include <libmuscle/mpp_message.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Snapshot::Snapshot(
             std::vector<std::string> const & triggers,
diff --git a/libmuscle/cpp/src/libmuscle/snapshot.hpp b/libmuscle/cpp/src/libmuscle/snapshot.hpp
index d78fde59..c10b0d61 100644
--- a/libmuscle/cpp/src/libmuscle/snapshot.hpp
+++ b/libmuscle/cpp/src/libmuscle/snapshot.hpp
@@ -6,11 +6,12 @@
 
 #include <libmuscle/data.hpp>
 #include <libmuscle/message.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/util.hpp>
 
 #include <ymmsl/ymmsl.hpp>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Snapshot data structure.
  */
diff --git a/libmuscle/cpp/src/libmuscle/snapshot_manager.cpp b/libmuscle/cpp/src/libmuscle/snapshot_manager.cpp
index f403e4ea..e24c4a98 100644
--- a/libmuscle/cpp/src/libmuscle/snapshot_manager.cpp
+++ b/libmuscle/cpp/src/libmuscle/snapshot_manager.cpp
@@ -19,7 +19,7 @@
 
 using namespace std::string_literals;
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 SnapshotManager::SnapshotManager(
             ymmsl::Reference const & instance_id,
diff --git a/libmuscle/cpp/src/libmuscle/snapshot_manager.hpp b/libmuscle/cpp/src/libmuscle/snapshot_manager.hpp
index 01282072..a2676d09 100644
--- a/libmuscle/cpp/src/libmuscle/snapshot_manager.hpp
+++ b/libmuscle/cpp/src/libmuscle/snapshot_manager.hpp
@@ -6,12 +6,13 @@
 #include <libmuscle/communicator.hpp>
 #include <libmuscle/logger.hpp>
 #include <libmuscle/mmp_client.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/snapshot.hpp>
 #include <libmuscle/util.hpp>
 
 #include <ymmsl/ymmsl.hpp>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** Manages information on snapshots for the Instance
  *
diff --git a/libmuscle/cpp/src/libmuscle/timestamp.cpp b/libmuscle/cpp/src/libmuscle/timestamp.cpp
index e78b1671..29c4f145 100644
--- a/libmuscle/cpp/src/libmuscle/timestamp.cpp
+++ b/libmuscle/cpp/src/libmuscle/timestamp.cpp
@@ -8,7 +8,7 @@
 using wallclock = std::chrono::high_resolution_clock;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 Timestamp::Timestamp() {
     auto since_epoch = wallclock::now().time_since_epoch();
diff --git a/libmuscle/cpp/src/libmuscle/timestamp.hpp b/libmuscle/cpp/src/libmuscle/timestamp.hpp
index 8268e25e..d9e458e7 100644
--- a/libmuscle/cpp/src/libmuscle/timestamp.hpp
+++ b/libmuscle/cpp/src/libmuscle/timestamp.hpp
@@ -2,8 +2,10 @@
 
 #include <ostream>
 
+#include <libmuscle/namespace.hpp>
 
-namespace libmuscle { namespace impl {
+
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 /** A timestamp, as the number of seconds since the UNIX epoch.
  */
diff --git a/libmuscle/cpp/src/libmuscle/util.cpp b/libmuscle/cpp/src/libmuscle/util.cpp
index e6ac7415..ee4ebb22 100644
--- a/libmuscle/cpp/src/libmuscle/util.cpp
+++ b/libmuscle/cpp/src/libmuscle/util.cpp
@@ -5,7 +5,7 @@
 #include <sys/stat.h>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 std::string extract_log_file_location(
         int argc, char const * const argv[], std::string const & filename
diff --git a/libmuscle/cpp/src/libmuscle/util.hpp b/libmuscle/cpp/src/libmuscle/util.hpp
index 1dffe8ba..5be82a0b 100644
--- a/libmuscle/cpp/src/libmuscle/util.hpp
+++ b/libmuscle/cpp/src/libmuscle/util.hpp
@@ -4,8 +4,10 @@
 #include <ostream>
 #include <string>
 
+#include <libmuscle/namespace.hpp>
 
-namespace libmuscle { namespace impl {
+
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 
 /* Gets the log file location from the command line.
diff --git a/libmuscle/cpp/src/libmuscle/util.tpp b/libmuscle/cpp/src/libmuscle/util.tpp
index 1d0adbd2..9884c9f1 100644
--- a/libmuscle/cpp/src/libmuscle/util.tpp
+++ b/libmuscle/cpp/src/libmuscle/util.tpp
@@ -3,7 +3,7 @@
 #include <utility>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 template <typename T>
 Optional<T>::Optional()
diff --git a/libmuscle/fortran/src/libmuscle/libmuscle_mpi.f90 b/libmuscle/fortran/src/libmuscle/libmuscle_mpi.f90
index 3cd8e3bc..e79408c4 100644
--- a/libmuscle/fortran/src/libmuscle/libmuscle_mpi.f90
+++ b/libmuscle/fortran/src/libmuscle/libmuscle_mpi.f90
@@ -860,146 +860,146 @@ module libmuscle_mpi
 
     interface
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_nil_() &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_nil_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_nil_() &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_nil_")
 
             use iso_c_binding
-        end function LIBMUSCLE_DataConstRef_create_nil_
+        end function LIBMUSCLE_MPI_DataConstRef_create_nil_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_logical_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_logical_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_logical_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_logical_")
 
             use iso_c_binding
             logical (c_bool), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_logical_
+        end function LIBMUSCLE_MPI_DataConstRef_create_logical_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_character_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_character_( &
                 value, &
                 value_size) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_character_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_character_")
 
             use iso_c_binding
             character, intent(in) :: value
             integer (c_size_t), value, intent(in) :: value_size
-        end function LIBMUSCLE_DataConstRef_create_character_
+        end function LIBMUSCLE_MPI_DataConstRef_create_character_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int1_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_int1_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_int1_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_int1_")
 
             use iso_c_binding
             integer (c_int8_t), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_int1_
+        end function LIBMUSCLE_MPI_DataConstRef_create_int1_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int2_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_int2_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_int2_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_int2_")
 
             use iso_c_binding
             integer (c_short), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_int2_
+        end function LIBMUSCLE_MPI_DataConstRef_create_int2_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int4_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_int4_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_int4_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_int4_")
 
             use iso_c_binding
             integer (c_int32_t), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_int4_
+        end function LIBMUSCLE_MPI_DataConstRef_create_int4_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int8_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_int8_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_int8_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_int8_")
 
             use iso_c_binding
             integer (c_int64_t), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_int8_
+        end function LIBMUSCLE_MPI_DataConstRef_create_int8_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real4_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_real4_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_real4_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_real4_")
 
             use iso_c_binding
             real (c_float), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_real4_
+        end function LIBMUSCLE_MPI_DataConstRef_create_real4_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real8_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_real8_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_real8_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_real8_")
 
             use iso_c_binding
             real (c_double), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_real8_
+        end function LIBMUSCLE_MPI_DataConstRef_create_real8_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_settings_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_settings_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_settings_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_settings_
+        end function LIBMUSCLE_MPI_DataConstRef_create_settings_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_copy_(value) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_copy_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_copy_(value) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_copy_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: value
-        end function LIBMUSCLE_DataConstRef_create_copy_
+        end function LIBMUSCLE_MPI_DataConstRef_create_copy_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_logical_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_logical_a_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_")
 
             use iso_c_binding
             logical (c_bool), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_DataConstRef_create_grid_logical_a_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int4_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int4_a_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_")
 
             use iso_c_binding
             integer (c_int32_t), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_DataConstRef_create_grid_int4_a_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int8_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int8_a_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_")
 
             use iso_c_binding
             integer (c_int64_t), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_DataConstRef_create_grid_int8_a_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real4_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real4_a_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_")
 
             use iso_c_binding
             real (c_float), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_DataConstRef_create_grid_real4_a_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real8_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real8_a_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_")
 
             use iso_c_binding
             real (c_double), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_DataConstRef_create_grid_real8_a_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1017,7 +1017,7 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_logical_n_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_")
 
             use iso_c_binding
             logical (c_bool), dimension(*), intent(in) :: data_array
@@ -1037,9 +1037,9 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_DataConstRef_create_grid_logical_n_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1057,7 +1057,7 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int4_n_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_")
 
             use iso_c_binding
             integer (c_int32_t), dimension(*), intent(in) :: data_array
@@ -1077,9 +1077,9 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_DataConstRef_create_grid_int4_n_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1097,7 +1097,7 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int8_n_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_")
 
             use iso_c_binding
             integer (c_int64_t), dimension(*), intent(in) :: data_array
@@ -1117,9 +1117,9 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_DataConstRef_create_grid_int8_n_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1137,7 +1137,7 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real4_n_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_")
 
             use iso_c_binding
             real (c_float), dimension(*), intent(in) :: data_array
@@ -1157,9 +1157,9 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_DataConstRef_create_grid_real4_n_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1177,7 +1177,7 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real8_n_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_")
 
             use iso_c_binding
             real (c_double), dimension(*), intent(in) :: data_array
@@ -1197,177 +1197,177 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_DataConstRef_create_grid_real8_n_
+        end function LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_
 
-        subroutine LIBMUSCLE_DataConstRef_free_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_free_")
+        subroutine LIBMUSCLE_MPI_DataConstRef_free_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_free_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_DataConstRef_free_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_free_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_logical_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_logical_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_logical_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_logical_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_logical_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_character_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_character_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_character_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_character_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_character_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_int_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_int_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_int_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_int_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_int_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int1_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_int1_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_int1_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_int1_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_int1_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_int1_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int2_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_int2_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_int2_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_int2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_int2_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_int2_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int4_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_int4_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_int4_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_int4_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_int4_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int8_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_int8_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_int8_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_int8_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_int8_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_real4_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_real4_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_real4_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_real4_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_real4_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_real8_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_real8_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_real8_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_real8_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_real8_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_dict_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_dict_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_dict_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_dict_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_dict_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_dict_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_list_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_list_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_list_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_list_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_list_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_list_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_logical_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_logical_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_logical_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_grid_of_logical_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_logical_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_real4_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_real4_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real4_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_grid_of_real4_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real4_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_real8_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_real8_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real8_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_grid_of_real8_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real8_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_int4_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_int4_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int4_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_grid_of_int4_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int4_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_int8_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_int8_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int8_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_grid_of_int8_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int8_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_byte_array_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_byte_array_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_byte_array_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_byte_array_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_byte_array_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_byte_array_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_nil_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_nil_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_nil_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_nil_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_nil_
+        end function LIBMUSCLE_MPI_DataConstRef_is_nil_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_settings_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_is_a_settings_")
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_is_a_settings_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_is_a_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_is_a_settings_
+        end function LIBMUSCLE_MPI_DataConstRef_is_a_settings_
 
-        integer (c_size_t) function LIBMUSCLE_DataConstRef_size_(self) &
-                bind(C, name="LIBMUSCLE_DataConstRef_size_")
+        integer (c_size_t) function LIBMUSCLE_MPI_DataConstRef_size_(self) &
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_size_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_DataConstRef_size_
+        end function LIBMUSCLE_MPI_DataConstRef_size_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_as_logical_( &
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_as_logical_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_logical_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_logical_
+        end function LIBMUSCLE_MPI_DataConstRef_as_logical_
 
-        subroutine LIBMUSCLE_DataConstRef_as_character_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_as_character_( &
                 self, &
                 ret_val, &
                 ret_val_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_character_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1376,128 +1376,128 @@ subroutine LIBMUSCLE_DataConstRef_as_character_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_as_character_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_as_character_
 
-        integer (c_int) function LIBMUSCLE_DataConstRef_as_int_( &
+        integer (c_int) function LIBMUSCLE_MPI_DataConstRef_as_int_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_int_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_int_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_int_
+        end function LIBMUSCLE_MPI_DataConstRef_as_int_
 
-        integer (c_int8_t) function LIBMUSCLE_DataConstRef_as_int1_( &
+        integer (c_int8_t) function LIBMUSCLE_MPI_DataConstRef_as_int1_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_int1_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_int1_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_int1_
+        end function LIBMUSCLE_MPI_DataConstRef_as_int1_
 
-        integer (c_short) function LIBMUSCLE_DataConstRef_as_int2_( &
+        integer (c_short) function LIBMUSCLE_MPI_DataConstRef_as_int2_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_int2_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_int2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_int2_
+        end function LIBMUSCLE_MPI_DataConstRef_as_int2_
 
-        integer (c_int32_t) function LIBMUSCLE_DataConstRef_as_int4_( &
+        integer (c_int32_t) function LIBMUSCLE_MPI_DataConstRef_as_int4_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_int4_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_int4_
+        end function LIBMUSCLE_MPI_DataConstRef_as_int4_
 
-        integer (c_int64_t) function LIBMUSCLE_DataConstRef_as_int8_( &
+        integer (c_int64_t) function LIBMUSCLE_MPI_DataConstRef_as_int8_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_int8_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_int8_
+        end function LIBMUSCLE_MPI_DataConstRef_as_int8_
 
-        real (c_float) function LIBMUSCLE_DataConstRef_as_real4_( &
+        real (c_float) function LIBMUSCLE_MPI_DataConstRef_as_real4_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_real4_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_real4_
+        end function LIBMUSCLE_MPI_DataConstRef_as_real4_
 
-        real (c_double) function LIBMUSCLE_DataConstRef_as_real8_( &
+        real (c_double) function LIBMUSCLE_MPI_DataConstRef_as_real8_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_real8_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_real8_
+        end function LIBMUSCLE_MPI_DataConstRef_as_real8_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_as_settings_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_as_settings_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_settings_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_as_settings_
+        end function LIBMUSCLE_MPI_DataConstRef_as_settings_
 
-        subroutine LIBMUSCLE_DataConstRef_as_byte_array_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_as_byte_array_( &
                 self, &
                 ret_val, &
                 ret_val_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_as_byte_array_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_as_byte_array_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1506,16 +1506,16 @@ subroutine LIBMUSCLE_DataConstRef_as_byte_array_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_as_byte_array_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_as_byte_array_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_key_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_get_item_by_key_( &
                 self, &
                 key, &
                 key_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_get_item_by_key_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_get_item_by_key_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1524,15 +1524,15 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_key_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_get_item_by_key_
+        end function LIBMUSCLE_MPI_DataConstRef_get_item_by_key_
 
-        integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_index_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_DataConstRef_get_item_by_index_( &
                 self, &
                 i, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_get_item_by_index_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_get_item_by_index_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1540,30 +1540,30 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_index_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_get_item_by_index_
+        end function LIBMUSCLE_MPI_DataConstRef_get_item_by_index_
 
-        integer (c_size_t) function LIBMUSCLE_DataConstRef_num_dims_( &
+        integer (c_size_t) function LIBMUSCLE_MPI_DataConstRef_num_dims_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_num_dims_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_num_dims_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_num_dims_
+        end function LIBMUSCLE_MPI_DataConstRef_num_dims_
 
-        subroutine LIBMUSCLE_DataConstRef_shape_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_shape_( &
                 self, &
                 ret_val, &
                 ret_val_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_shape_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_shape_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1572,9 +1572,9 @@ subroutine LIBMUSCLE_DataConstRef_shape_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_shape_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_shape_
 
-        subroutine LIBMUSCLE_DataConstRef_elements_logical_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_elements_logical_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -1583,7 +1583,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_logical_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_elements_logical_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_elements_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1594,9 +1594,9 @@ subroutine LIBMUSCLE_DataConstRef_elements_logical_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_elements_logical_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_elements_logical_
 
-        subroutine LIBMUSCLE_DataConstRef_elements_int4_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_elements_int4_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -1605,7 +1605,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_int4_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_elements_int4_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_elements_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1616,9 +1616,9 @@ subroutine LIBMUSCLE_DataConstRef_elements_int4_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_elements_int4_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_elements_int4_
 
-        subroutine LIBMUSCLE_DataConstRef_elements_int8_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_elements_int8_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -1627,7 +1627,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_int8_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_elements_int8_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_elements_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1638,9 +1638,9 @@ subroutine LIBMUSCLE_DataConstRef_elements_int8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_elements_int8_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_elements_int8_
 
-        subroutine LIBMUSCLE_DataConstRef_elements_real4_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_elements_real4_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -1649,7 +1649,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_real4_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_elements_real4_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_elements_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1660,9 +1660,9 @@ subroutine LIBMUSCLE_DataConstRef_elements_real4_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_elements_real4_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_elements_real4_
 
-        subroutine LIBMUSCLE_DataConstRef_elements_real8_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_elements_real8_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -1671,7 +1671,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_real8_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_elements_real8_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_elements_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1682,23 +1682,23 @@ subroutine LIBMUSCLE_DataConstRef_elements_real8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_elements_real8_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_elements_real8_
 
-        logical (c_bool) function LIBMUSCLE_DataConstRef_has_indexes_( &
+        logical (c_bool) function LIBMUSCLE_MPI_DataConstRef_has_indexes_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_has_indexes_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_has_indexes_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_DataConstRef_has_indexes_
+        end function LIBMUSCLE_MPI_DataConstRef_has_indexes_
 
-        subroutine LIBMUSCLE_DataConstRef_index_( &
+        subroutine LIBMUSCLE_MPI_DataConstRef_index_( &
                 self, &
                 i, &
                 ret_val, &
@@ -1706,7 +1706,7 @@ subroutine LIBMUSCLE_DataConstRef_index_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_DataConstRef_index_")
+                bind(C, name="LIBMUSCLE_MPI_DataConstRef_index_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -1716,148 +1716,148 @@ subroutine LIBMUSCLE_DataConstRef_index_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_DataConstRef_index_
+        end subroutine LIBMUSCLE_MPI_DataConstRef_index_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_nil_() &
-                bind(C, name="LIBMUSCLE_Data_create_nil_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_nil_() &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_nil_")
 
             use iso_c_binding
-        end function LIBMUSCLE_Data_create_nil_
+        end function LIBMUSCLE_MPI_Data_create_nil_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_logical_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_logical_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_logical_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_logical_")
 
             use iso_c_binding
             logical (c_bool), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_logical_
+        end function LIBMUSCLE_MPI_Data_create_logical_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_character_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_character_( &
                 value, &
                 value_size) &
-                bind(C, name="LIBMUSCLE_Data_create_character_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_character_")
 
             use iso_c_binding
             character, intent(in) :: value
             integer (c_size_t), value, intent(in) :: value_size
-        end function LIBMUSCLE_Data_create_character_
+        end function LIBMUSCLE_MPI_Data_create_character_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_int1_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_int1_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_int1_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_int1_")
 
             use iso_c_binding
             integer (c_int8_t), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_int1_
+        end function LIBMUSCLE_MPI_Data_create_int1_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_int2_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_int2_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_int2_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_int2_")
 
             use iso_c_binding
             integer (c_short), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_int2_
+        end function LIBMUSCLE_MPI_Data_create_int2_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_int4_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_int4_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_int4_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_int4_")
 
             use iso_c_binding
             integer (c_int32_t), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_int4_
+        end function LIBMUSCLE_MPI_Data_create_int4_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_int8_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_int8_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_int8_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_int8_")
 
             use iso_c_binding
             integer (c_int64_t), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_int8_
+        end function LIBMUSCLE_MPI_Data_create_int8_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_real4_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_real4_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_real4_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_real4_")
 
             use iso_c_binding
             real (c_float), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_real4_
+        end function LIBMUSCLE_MPI_Data_create_real4_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_real8_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_real8_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_real8_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_real8_")
 
             use iso_c_binding
             real (c_double), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_real8_
+        end function LIBMUSCLE_MPI_Data_create_real8_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_settings_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_settings_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_settings_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_settings_
+        end function LIBMUSCLE_MPI_Data_create_settings_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_copy_(value) &
-                bind(C, name="LIBMUSCLE_Data_create_copy_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_copy_(value) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_copy_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: value
-        end function LIBMUSCLE_Data_create_copy_
+        end function LIBMUSCLE_MPI_Data_create_copy_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_logical_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_logical_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_logical_a_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_logical_a_")
 
             use iso_c_binding
             logical (c_bool), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_Data_create_grid_logical_a_
+        end function LIBMUSCLE_MPI_Data_create_grid_logical_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int4_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_int4_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_int4_a_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_int4_a_")
 
             use iso_c_binding
             integer (c_int32_t), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_Data_create_grid_int4_a_
+        end function LIBMUSCLE_MPI_Data_create_grid_int4_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int8_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_int8_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_int8_a_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_int8_a_")
 
             use iso_c_binding
             integer (c_int64_t), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_Data_create_grid_int8_a_
+        end function LIBMUSCLE_MPI_Data_create_grid_int8_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real4_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_real4_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_real4_a_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_real4_a_")
 
             use iso_c_binding
             real (c_float), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_Data_create_grid_real4_a_
+        end function LIBMUSCLE_MPI_Data_create_grid_real4_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real8_a_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_real8_a_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_real8_a_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_real8_a_")
 
             use iso_c_binding
             real (c_double), dimension(*), intent(in) :: data_array
             integer (c_size_t), dimension(1), intent(in) :: data_array_shape
             integer (c_size_t), value, intent(in) :: data_array_ndims
-        end function LIBMUSCLE_Data_create_grid_real8_a_
+        end function LIBMUSCLE_MPI_Data_create_grid_real8_a_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_logical_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_logical_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1875,7 +1875,7 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_logical_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_logical_n_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_logical_n_")
 
             use iso_c_binding
             logical (c_bool), dimension(*), intent(in) :: data_array
@@ -1895,9 +1895,9 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_logical_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_Data_create_grid_logical_n_
+        end function LIBMUSCLE_MPI_Data_create_grid_logical_n_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int4_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_int4_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1915,7 +1915,7 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int4_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_int4_n_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_int4_n_")
 
             use iso_c_binding
             integer (c_int32_t), dimension(*), intent(in) :: data_array
@@ -1935,9 +1935,9 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int4_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_Data_create_grid_int4_n_
+        end function LIBMUSCLE_MPI_Data_create_grid_int4_n_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int8_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_int8_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1955,7 +1955,7 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int8_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_int8_n_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_int8_n_")
 
             use iso_c_binding
             integer (c_int64_t), dimension(*), intent(in) :: data_array
@@ -1975,9 +1975,9 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int8_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_Data_create_grid_int8_n_
+        end function LIBMUSCLE_MPI_Data_create_grid_int8_n_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real4_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_real4_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -1995,7 +1995,7 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real4_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_real4_n_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_real4_n_")
 
             use iso_c_binding
             real (c_float), dimension(*), intent(in) :: data_array
@@ -2015,9 +2015,9 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real4_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_Data_create_grid_real4_n_
+        end function LIBMUSCLE_MPI_Data_create_grid_real4_n_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real8_n_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_grid_real8_n_( &
                 data_array, &
                 data_array_shape, &
                 data_array_ndims, &
@@ -2035,7 +2035,7 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real8_n_( &
                 index_name_6_size, &
                 index_name_7, &
                 index_name_7_size) &
-                bind(C, name="LIBMUSCLE_Data_create_grid_real8_n_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_grid_real8_n_")
 
             use iso_c_binding
             real (c_double), dimension(*), intent(in) :: data_array
@@ -2055,177 +2055,177 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real8_n_( &
             integer (c_size_t), value, intent(in) :: index_name_6_size
             character, intent(in) :: index_name_7
             integer (c_size_t), value, intent(in) :: index_name_7_size
-        end function LIBMUSCLE_Data_create_grid_real8_n_
+        end function LIBMUSCLE_MPI_Data_create_grid_real8_n_
 
-        subroutine LIBMUSCLE_Data_free_(self) &
-                bind(C, name="LIBMUSCLE_Data_free_")
+        subroutine LIBMUSCLE_MPI_Data_free_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_free_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_Data_free_
+        end subroutine LIBMUSCLE_MPI_Data_free_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_logical_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_logical_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_logical_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_logical_
+        end function LIBMUSCLE_MPI_Data_is_a_logical_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_character_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_character_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_character_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_character_
+        end function LIBMUSCLE_MPI_Data_is_a_character_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_int_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_int_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_int_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_int_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_int_
+        end function LIBMUSCLE_MPI_Data_is_a_int_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_int1_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_int1_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_int1_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_int1_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_int1_
+        end function LIBMUSCLE_MPI_Data_is_a_int1_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_int2_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_int2_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_int2_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_int2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_int2_
+        end function LIBMUSCLE_MPI_Data_is_a_int2_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_int4_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_int4_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_int4_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_int4_
+        end function LIBMUSCLE_MPI_Data_is_a_int4_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_int8_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_int8_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_int8_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_int8_
+        end function LIBMUSCLE_MPI_Data_is_a_int8_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_real4_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_real4_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_real4_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_real4_
+        end function LIBMUSCLE_MPI_Data_is_a_real4_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_real8_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_real8_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_real8_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_real8_
+        end function LIBMUSCLE_MPI_Data_is_a_real8_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_dict_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_dict_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_dict_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_dict_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_dict_
+        end function LIBMUSCLE_MPI_Data_is_a_dict_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_list_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_list_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_list_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_list_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_list_
+        end function LIBMUSCLE_MPI_Data_is_a_list_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_logical_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_grid_of_logical_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_grid_of_logical_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_grid_of_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_grid_of_logical_
+        end function LIBMUSCLE_MPI_Data_is_a_grid_of_logical_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_real4_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_grid_of_real4_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_grid_of_real4_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_grid_of_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_grid_of_real4_
+        end function LIBMUSCLE_MPI_Data_is_a_grid_of_real4_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_real8_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_grid_of_real8_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_grid_of_real8_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_grid_of_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_grid_of_real8_
+        end function LIBMUSCLE_MPI_Data_is_a_grid_of_real8_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_int4_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_grid_of_int4_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_grid_of_int4_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_grid_of_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_grid_of_int4_
+        end function LIBMUSCLE_MPI_Data_is_a_grid_of_int4_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_int8_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_grid_of_int8_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_grid_of_int8_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_grid_of_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_grid_of_int8_
+        end function LIBMUSCLE_MPI_Data_is_a_grid_of_int8_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_byte_array_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_byte_array_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_byte_array_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_byte_array_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_byte_array_
+        end function LIBMUSCLE_MPI_Data_is_a_byte_array_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_nil_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_nil_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_nil_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_nil_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_nil_
+        end function LIBMUSCLE_MPI_Data_is_nil_
 
-        logical (c_bool) function LIBMUSCLE_Data_is_a_settings_(self) &
-                bind(C, name="LIBMUSCLE_Data_is_a_settings_")
+        logical (c_bool) function LIBMUSCLE_MPI_Data_is_a_settings_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_is_a_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_is_a_settings_
+        end function LIBMUSCLE_MPI_Data_is_a_settings_
 
-        integer (c_size_t) function LIBMUSCLE_Data_size_(self) &
-                bind(C, name="LIBMUSCLE_Data_size_")
+        integer (c_size_t) function LIBMUSCLE_MPI_Data_size_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_size_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Data_size_
+        end function LIBMUSCLE_MPI_Data_size_
 
-        logical (c_bool) function LIBMUSCLE_Data_as_logical_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Data_as_logical_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_logical_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_logical_
+        end function LIBMUSCLE_MPI_Data_as_logical_
 
-        subroutine LIBMUSCLE_Data_as_character_( &
+        subroutine LIBMUSCLE_MPI_Data_as_character_( &
                 self, &
                 ret_val, &
                 ret_val_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_character_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2234,128 +2234,128 @@ subroutine LIBMUSCLE_Data_as_character_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_as_character_
+        end subroutine LIBMUSCLE_MPI_Data_as_character_
 
-        integer (c_int) function LIBMUSCLE_Data_as_int_( &
+        integer (c_int) function LIBMUSCLE_MPI_Data_as_int_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_int_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_int_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_int_
+        end function LIBMUSCLE_MPI_Data_as_int_
 
-        integer (c_int8_t) function LIBMUSCLE_Data_as_int1_( &
+        integer (c_int8_t) function LIBMUSCLE_MPI_Data_as_int1_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_int1_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_int1_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_int1_
+        end function LIBMUSCLE_MPI_Data_as_int1_
 
-        integer (c_short) function LIBMUSCLE_Data_as_int2_( &
+        integer (c_short) function LIBMUSCLE_MPI_Data_as_int2_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_int2_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_int2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_int2_
+        end function LIBMUSCLE_MPI_Data_as_int2_
 
-        integer (c_int32_t) function LIBMUSCLE_Data_as_int4_( &
+        integer (c_int32_t) function LIBMUSCLE_MPI_Data_as_int4_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_int4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_int4_
+        end function LIBMUSCLE_MPI_Data_as_int4_
 
-        integer (c_int64_t) function LIBMUSCLE_Data_as_int8_( &
+        integer (c_int64_t) function LIBMUSCLE_MPI_Data_as_int8_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_int8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_int8_
+        end function LIBMUSCLE_MPI_Data_as_int8_
 
-        real (c_float) function LIBMUSCLE_Data_as_real4_( &
+        real (c_float) function LIBMUSCLE_MPI_Data_as_real4_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_real4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_real4_
+        end function LIBMUSCLE_MPI_Data_as_real4_
 
-        real (c_double) function LIBMUSCLE_Data_as_real8_( &
+        real (c_double) function LIBMUSCLE_MPI_Data_as_real8_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_real8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_real8_
+        end function LIBMUSCLE_MPI_Data_as_real8_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_as_settings_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_as_settings_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_settings_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_as_settings_
+        end function LIBMUSCLE_MPI_Data_as_settings_
 
-        subroutine LIBMUSCLE_Data_as_byte_array_( &
+        subroutine LIBMUSCLE_MPI_Data_as_byte_array_( &
                 self, &
                 ret_val, &
                 ret_val_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_as_byte_array_")
+                bind(C, name="LIBMUSCLE_MPI_Data_as_byte_array_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2364,16 +2364,16 @@ subroutine LIBMUSCLE_Data_as_byte_array_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_as_byte_array_
+        end subroutine LIBMUSCLE_MPI_Data_as_byte_array_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_key_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_get_item_by_key_( &
                 self, &
                 key, &
                 key_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_get_item_by_key_")
+                bind(C, name="LIBMUSCLE_MPI_Data_get_item_by_key_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2382,15 +2382,15 @@ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_key_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_get_item_by_key_
+        end function LIBMUSCLE_MPI_Data_get_item_by_key_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_index_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_get_item_by_index_( &
                 self, &
                 i, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_get_item_by_index_")
+                bind(C, name="LIBMUSCLE_MPI_Data_get_item_by_index_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2398,30 +2398,30 @@ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_index_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_get_item_by_index_
+        end function LIBMUSCLE_MPI_Data_get_item_by_index_
 
-        integer (c_size_t) function LIBMUSCLE_Data_num_dims_( &
+        integer (c_size_t) function LIBMUSCLE_MPI_Data_num_dims_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_num_dims_")
+                bind(C, name="LIBMUSCLE_MPI_Data_num_dims_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_num_dims_
+        end function LIBMUSCLE_MPI_Data_num_dims_
 
-        subroutine LIBMUSCLE_Data_shape_( &
+        subroutine LIBMUSCLE_MPI_Data_shape_( &
                 self, &
                 ret_val, &
                 ret_val_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_shape_")
+                bind(C, name="LIBMUSCLE_MPI_Data_shape_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2430,9 +2430,9 @@ subroutine LIBMUSCLE_Data_shape_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_shape_
+        end subroutine LIBMUSCLE_MPI_Data_shape_
 
-        subroutine LIBMUSCLE_Data_elements_logical_( &
+        subroutine LIBMUSCLE_MPI_Data_elements_logical_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -2441,7 +2441,7 @@ subroutine LIBMUSCLE_Data_elements_logical_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_elements_logical_")
+                bind(C, name="LIBMUSCLE_MPI_Data_elements_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2452,9 +2452,9 @@ subroutine LIBMUSCLE_Data_elements_logical_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_elements_logical_
+        end subroutine LIBMUSCLE_MPI_Data_elements_logical_
 
-        subroutine LIBMUSCLE_Data_elements_int4_( &
+        subroutine LIBMUSCLE_MPI_Data_elements_int4_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -2463,7 +2463,7 @@ subroutine LIBMUSCLE_Data_elements_int4_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_elements_int4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_elements_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2474,9 +2474,9 @@ subroutine LIBMUSCLE_Data_elements_int4_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_elements_int4_
+        end subroutine LIBMUSCLE_MPI_Data_elements_int4_
 
-        subroutine LIBMUSCLE_Data_elements_int8_( &
+        subroutine LIBMUSCLE_MPI_Data_elements_int8_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -2485,7 +2485,7 @@ subroutine LIBMUSCLE_Data_elements_int8_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_elements_int8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_elements_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2496,9 +2496,9 @@ subroutine LIBMUSCLE_Data_elements_int8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_elements_int8_
+        end subroutine LIBMUSCLE_MPI_Data_elements_int8_
 
-        subroutine LIBMUSCLE_Data_elements_real4_( &
+        subroutine LIBMUSCLE_MPI_Data_elements_real4_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -2507,7 +2507,7 @@ subroutine LIBMUSCLE_Data_elements_real4_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_elements_real4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_elements_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2518,9 +2518,9 @@ subroutine LIBMUSCLE_Data_elements_real4_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_elements_real4_
+        end subroutine LIBMUSCLE_MPI_Data_elements_real4_
 
-        subroutine LIBMUSCLE_Data_elements_real8_( &
+        subroutine LIBMUSCLE_MPI_Data_elements_real8_( &
                 self, &
                 ndims, &
                 ret_val, &
@@ -2529,7 +2529,7 @@ subroutine LIBMUSCLE_Data_elements_real8_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_elements_real8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_elements_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2540,23 +2540,23 @@ subroutine LIBMUSCLE_Data_elements_real8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_elements_real8_
+        end subroutine LIBMUSCLE_MPI_Data_elements_real8_
 
-        logical (c_bool) function LIBMUSCLE_Data_has_indexes_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Data_has_indexes_( &
                 self, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_has_indexes_")
+                bind(C, name="LIBMUSCLE_MPI_Data_has_indexes_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_has_indexes_
+        end function LIBMUSCLE_MPI_Data_has_indexes_
 
-        subroutine LIBMUSCLE_Data_index_( &
+        subroutine LIBMUSCLE_MPI_Data_index_( &
                 self, &
                 i, &
                 ret_val, &
@@ -2564,7 +2564,7 @@ subroutine LIBMUSCLE_Data_index_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_index_")
+                bind(C, name="LIBMUSCLE_MPI_Data_index_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2574,144 +2574,144 @@ subroutine LIBMUSCLE_Data_index_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_index_
+        end subroutine LIBMUSCLE_MPI_Data_index_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_dict_() &
-                bind(C, name="LIBMUSCLE_Data_create_dict_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_dict_() &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_dict_")
 
             use iso_c_binding
-        end function LIBMUSCLE_Data_create_dict_
+        end function LIBMUSCLE_MPI_Data_create_dict_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_list_() &
-                bind(C, name="LIBMUSCLE_Data_create_list_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_list_() &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_list_")
 
             use iso_c_binding
-        end function LIBMUSCLE_Data_create_list_
+        end function LIBMUSCLE_MPI_Data_create_list_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_nils_(size) &
-                bind(C, name="LIBMUSCLE_Data_create_nils_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_nils_(size) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_nils_")
 
             use iso_c_binding
             integer (c_size_t), value, intent(in) :: size
-        end function LIBMUSCLE_Data_create_nils_
+        end function LIBMUSCLE_MPI_Data_create_nils_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_empty_(size) &
-                bind(C, name="LIBMUSCLE_Data_create_byte_array_empty_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_byte_array_empty_(size) &
+                bind(C, name="LIBMUSCLE_MPI_Data_create_byte_array_empty_")
 
             use iso_c_binding
             integer (c_size_t), value, intent(in) :: size
-        end function LIBMUSCLE_Data_create_byte_array_empty_
+        end function LIBMUSCLE_MPI_Data_create_byte_array_empty_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_from_buf_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_create_byte_array_from_buf_( &
                 buf, &
                 buf_size) &
-                bind(C, name="LIBMUSCLE_Data_create_byte_array_from_buf_")
+                bind(C, name="LIBMUSCLE_MPI_Data_create_byte_array_from_buf_")
 
             use iso_c_binding
             character(len=1), dimension(*), intent(in) :: buf
             integer (c_size_t), value, intent(in) :: buf_size
-        end function LIBMUSCLE_Data_create_byte_array_from_buf_
+        end function LIBMUSCLE_MPI_Data_create_byte_array_from_buf_
 
-        subroutine LIBMUSCLE_Data_set_logical_( &
+        subroutine LIBMUSCLE_MPI_Data_set_logical_( &
                 self, &
                 value) &
-                bind(C, name="LIBMUSCLE_Data_set_logical_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             logical (c_bool), value, intent(in) :: value
-        end subroutine LIBMUSCLE_Data_set_logical_
+        end subroutine LIBMUSCLE_MPI_Data_set_logical_
 
-        subroutine LIBMUSCLE_Data_set_character_( &
+        subroutine LIBMUSCLE_MPI_Data_set_character_( &
                 self, &
                 value, &
                 value_size) &
-                bind(C, name="LIBMUSCLE_Data_set_character_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             character, intent(in) :: value
             integer (c_size_t), value, intent(in) :: value_size
-        end subroutine LIBMUSCLE_Data_set_character_
+        end subroutine LIBMUSCLE_MPI_Data_set_character_
 
-        subroutine LIBMUSCLE_Data_set_int1_( &
+        subroutine LIBMUSCLE_MPI_Data_set_int1_( &
                 self, &
                 value) &
-                bind(C, name="LIBMUSCLE_Data_set_int1_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_int1_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int8_t), value, intent(in) :: value
-        end subroutine LIBMUSCLE_Data_set_int1_
+        end subroutine LIBMUSCLE_MPI_Data_set_int1_
 
-        subroutine LIBMUSCLE_Data_set_int2_( &
+        subroutine LIBMUSCLE_MPI_Data_set_int2_( &
                 self, &
                 value) &
-                bind(C, name="LIBMUSCLE_Data_set_int2_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_int2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_short), value, intent(in) :: value
-        end subroutine LIBMUSCLE_Data_set_int2_
+        end subroutine LIBMUSCLE_MPI_Data_set_int2_
 
-        subroutine LIBMUSCLE_Data_set_int4_( &
+        subroutine LIBMUSCLE_MPI_Data_set_int4_( &
                 self, &
                 value) &
-                bind(C, name="LIBMUSCLE_Data_set_int4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int32_t), value, intent(in) :: value
-        end subroutine LIBMUSCLE_Data_set_int4_
+        end subroutine LIBMUSCLE_MPI_Data_set_int4_
 
-        subroutine LIBMUSCLE_Data_set_int8_( &
+        subroutine LIBMUSCLE_MPI_Data_set_int8_( &
                 self, &
                 value) &
-                bind(C, name="LIBMUSCLE_Data_set_int8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int64_t), value, intent(in) :: value
-        end subroutine LIBMUSCLE_Data_set_int8_
+        end subroutine LIBMUSCLE_MPI_Data_set_int8_
 
-        subroutine LIBMUSCLE_Data_set_real4_( &
+        subroutine LIBMUSCLE_MPI_Data_set_real4_( &
                 self, &
                 value) &
-                bind(C, name="LIBMUSCLE_Data_set_real4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             real (c_float), value, intent(in) :: value
-        end subroutine LIBMUSCLE_Data_set_real4_
+        end subroutine LIBMUSCLE_MPI_Data_set_real4_
 
-        subroutine LIBMUSCLE_Data_set_real8_( &
+        subroutine LIBMUSCLE_MPI_Data_set_real8_( &
                 self, &
                 value) &
-                bind(C, name="LIBMUSCLE_Data_set_real8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             real (c_double), value, intent(in) :: value
-        end subroutine LIBMUSCLE_Data_set_real8_
+        end subroutine LIBMUSCLE_MPI_Data_set_real8_
 
-        subroutine LIBMUSCLE_Data_set_data_( &
+        subroutine LIBMUSCLE_MPI_Data_set_data_( &
                 self, &
                 value) &
-                bind(C, name="LIBMUSCLE_Data_set_data_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_data_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_intptr_t), value, intent(in) :: value
-        end subroutine LIBMUSCLE_Data_set_data_
+        end subroutine LIBMUSCLE_MPI_Data_set_data_
 
-        subroutine LIBMUSCLE_Data_set_nil_(self) &
-                bind(C, name="LIBMUSCLE_Data_set_nil_")
+        subroutine LIBMUSCLE_MPI_Data_set_nil_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Data_set_nil_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_Data_set_nil_
+        end subroutine LIBMUSCLE_MPI_Data_set_nil_
 
-        subroutine LIBMUSCLE_Data_set_item_key_logical_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_logical_( &
                 self, &
                 key, &
                 key_size, &
@@ -2719,7 +2719,7 @@ subroutine LIBMUSCLE_Data_set_item_key_logical_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_logical_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2729,9 +2729,9 @@ subroutine LIBMUSCLE_Data_set_item_key_logical_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_logical_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_logical_
 
-        subroutine LIBMUSCLE_Data_set_item_key_character_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_character_( &
                 self, &
                 key, &
                 key_size, &
@@ -2740,7 +2740,7 @@ subroutine LIBMUSCLE_Data_set_item_key_character_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_character_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2751,9 +2751,9 @@ subroutine LIBMUSCLE_Data_set_item_key_character_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_character_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_character_
 
-        subroutine LIBMUSCLE_Data_set_item_key_int1_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_int1_( &
                 self, &
                 key, &
                 key_size, &
@@ -2761,7 +2761,7 @@ subroutine LIBMUSCLE_Data_set_item_key_int1_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_int1_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_int1_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2771,9 +2771,9 @@ subroutine LIBMUSCLE_Data_set_item_key_int1_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_int1_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_int1_
 
-        subroutine LIBMUSCLE_Data_set_item_key_int2_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_int2_( &
                 self, &
                 key, &
                 key_size, &
@@ -2781,7 +2781,7 @@ subroutine LIBMUSCLE_Data_set_item_key_int2_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_int2_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_int2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2791,9 +2791,9 @@ subroutine LIBMUSCLE_Data_set_item_key_int2_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_int2_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_int2_
 
-        subroutine LIBMUSCLE_Data_set_item_key_int4_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_int4_( &
                 self, &
                 key, &
                 key_size, &
@@ -2801,7 +2801,7 @@ subroutine LIBMUSCLE_Data_set_item_key_int4_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_int4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2811,9 +2811,9 @@ subroutine LIBMUSCLE_Data_set_item_key_int4_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_int4_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_int4_
 
-        subroutine LIBMUSCLE_Data_set_item_key_int8_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_int8_( &
                 self, &
                 key, &
                 key_size, &
@@ -2821,7 +2821,7 @@ subroutine LIBMUSCLE_Data_set_item_key_int8_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_int8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2831,9 +2831,9 @@ subroutine LIBMUSCLE_Data_set_item_key_int8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_int8_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_int8_
 
-        subroutine LIBMUSCLE_Data_set_item_key_real4_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_real4_( &
                 self, &
                 key, &
                 key_size, &
@@ -2841,7 +2841,7 @@ subroutine LIBMUSCLE_Data_set_item_key_real4_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_real4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2851,9 +2851,9 @@ subroutine LIBMUSCLE_Data_set_item_key_real4_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_real4_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_real4_
 
-        subroutine LIBMUSCLE_Data_set_item_key_real8_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_real8_( &
                 self, &
                 key, &
                 key_size, &
@@ -2861,7 +2861,7 @@ subroutine LIBMUSCLE_Data_set_item_key_real8_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_real8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2871,9 +2871,9 @@ subroutine LIBMUSCLE_Data_set_item_key_real8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_real8_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_real8_
 
-        subroutine LIBMUSCLE_Data_set_item_key_data_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_key_data_( &
                 self, &
                 key, &
                 key_size, &
@@ -2881,7 +2881,7 @@ subroutine LIBMUSCLE_Data_set_item_key_data_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_key_data_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_key_data_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2891,16 +2891,16 @@ subroutine LIBMUSCLE_Data_set_item_key_data_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_key_data_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_key_data_
 
-        subroutine LIBMUSCLE_Data_set_item_index_logical_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_logical_( &
                 self, &
                 i, &
                 value, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_logical_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2909,9 +2909,9 @@ subroutine LIBMUSCLE_Data_set_item_index_logical_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_logical_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_logical_
 
-        subroutine LIBMUSCLE_Data_set_item_index_character_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_character_( &
                 self, &
                 i, &
                 value, &
@@ -2919,7 +2919,7 @@ subroutine LIBMUSCLE_Data_set_item_index_character_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_character_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2929,16 +2929,16 @@ subroutine LIBMUSCLE_Data_set_item_index_character_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_character_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_character_
 
-        subroutine LIBMUSCLE_Data_set_item_index_int1_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_int1_( &
                 self, &
                 i, &
                 value, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_int1_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_int1_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2947,16 +2947,16 @@ subroutine LIBMUSCLE_Data_set_item_index_int1_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_int1_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_int1_
 
-        subroutine LIBMUSCLE_Data_set_item_index_int2_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_int2_( &
                 self, &
                 i, &
                 value, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_int2_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_int2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2965,16 +2965,16 @@ subroutine LIBMUSCLE_Data_set_item_index_int2_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_int2_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_int2_
 
-        subroutine LIBMUSCLE_Data_set_item_index_int4_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_int4_( &
                 self, &
                 i, &
                 value, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_int4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_int4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -2983,16 +2983,16 @@ subroutine LIBMUSCLE_Data_set_item_index_int4_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_int4_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_int4_
 
-        subroutine LIBMUSCLE_Data_set_item_index_int8_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_int8_( &
                 self, &
                 i, &
                 value, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_int8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3001,16 +3001,16 @@ subroutine LIBMUSCLE_Data_set_item_index_int8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_int8_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_int8_
 
-        subroutine LIBMUSCLE_Data_set_item_index_real4_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_real4_( &
                 self, &
                 i, &
                 value, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_real4_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_real4_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3019,16 +3019,16 @@ subroutine LIBMUSCLE_Data_set_item_index_real4_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_real4_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_real4_
 
-        subroutine LIBMUSCLE_Data_set_item_index_real8_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_real8_( &
                 self, &
                 i, &
                 value, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_real8_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3037,16 +3037,16 @@ subroutine LIBMUSCLE_Data_set_item_index_real8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_real8_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_real8_
 
-        subroutine LIBMUSCLE_Data_set_item_index_data_( &
+        subroutine LIBMUSCLE_MPI_Data_set_item_index_data_( &
                 self, &
                 i, &
                 value, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_set_item_index_data_")
+                bind(C, name="LIBMUSCLE_MPI_Data_set_item_index_data_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3055,9 +3055,9 @@ subroutine LIBMUSCLE_Data_set_item_index_data_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_set_item_index_data_
+        end subroutine LIBMUSCLE_MPI_Data_set_item_index_data_
 
-        subroutine LIBMUSCLE_Data_key_( &
+        subroutine LIBMUSCLE_MPI_Data_key_( &
                 self, &
                 i, &
                 ret_val, &
@@ -3065,7 +3065,7 @@ subroutine LIBMUSCLE_Data_key_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_key_")
+                bind(C, name="LIBMUSCLE_MPI_Data_key_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3075,15 +3075,15 @@ subroutine LIBMUSCLE_Data_key_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Data_key_
+        end subroutine LIBMUSCLE_MPI_Data_key_
 
-        integer (c_intptr_t) function LIBMUSCLE_Data_value_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Data_value_( &
                 self, &
                 i, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Data_value_")
+                bind(C, name="LIBMUSCLE_MPI_Data_value_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3091,46 +3091,46 @@ integer (c_intptr_t) function LIBMUSCLE_Data_value_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Data_value_
+        end function LIBMUSCLE_MPI_Data_value_
 
-        integer (c_intptr_t) function LIBMUSCLE_PortsDescription_create_() &
-                bind(C, name="LIBMUSCLE_PortsDescription_create_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_PortsDescription_create_() &
+                bind(C, name="LIBMUSCLE_MPI_PortsDescription_create_")
 
             use iso_c_binding
-        end function LIBMUSCLE_PortsDescription_create_
+        end function LIBMUSCLE_MPI_PortsDescription_create_
 
-        subroutine LIBMUSCLE_PortsDescription_free_(self) &
-                bind(C, name="LIBMUSCLE_PortsDescription_free_")
+        subroutine LIBMUSCLE_MPI_PortsDescription_free_(self) &
+                bind(C, name="LIBMUSCLE_MPI_PortsDescription_free_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_PortsDescription_free_
+        end subroutine LIBMUSCLE_MPI_PortsDescription_free_
 
-        subroutine LIBMUSCLE_PortsDescription_add_( &
+        subroutine LIBMUSCLE_MPI_PortsDescription_add_( &
                 self, &
                 op, &
                 port, &
                 port_size) &
-                bind(C, name="LIBMUSCLE_PortsDescription_add_")
+                bind(C, name="LIBMUSCLE_MPI_PortsDescription_add_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), value, intent(in) :: op
             character, intent(in) :: port
             integer (c_size_t), value, intent(in) :: port_size
-        end subroutine LIBMUSCLE_PortsDescription_add_
+        end subroutine LIBMUSCLE_MPI_PortsDescription_add_
 
-        integer (c_size_t) function LIBMUSCLE_PortsDescription_num_ports_( &
+        integer (c_size_t) function LIBMUSCLE_MPI_PortsDescription_num_ports_( &
                 self, &
                 op) &
-                bind(C, name="LIBMUSCLE_PortsDescription_num_ports_")
+                bind(C, name="LIBMUSCLE_MPI_PortsDescription_num_ports_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), value, intent(in) :: op
-        end function LIBMUSCLE_PortsDescription_num_ports_
+        end function LIBMUSCLE_MPI_PortsDescription_num_ports_
 
-        subroutine LIBMUSCLE_PortsDescription_get_( &
+        subroutine LIBMUSCLE_MPI_PortsDescription_get_( &
                 self, &
                 op, &
                 i, &
@@ -3139,7 +3139,7 @@ subroutine LIBMUSCLE_PortsDescription_get_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_PortsDescription_get_")
+                bind(C, name="LIBMUSCLE_MPI_PortsDescription_get_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3150,183 +3150,183 @@ subroutine LIBMUSCLE_PortsDescription_get_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_PortsDescription_get_
+        end subroutine LIBMUSCLE_MPI_PortsDescription_get_
 
-        integer (c_intptr_t) function LIBMUSCLE_Message_create_t_(timestamp) &
-                bind(C, name="LIBMUSCLE_Message_create_t_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Message_create_t_(timestamp) &
+                bind(C, name="LIBMUSCLE_MPI_Message_create_t_")
 
             use iso_c_binding
             real (c_double), value, intent(in) :: timestamp
-        end function LIBMUSCLE_Message_create_t_
+        end function LIBMUSCLE_MPI_Message_create_t_
 
-        integer (c_intptr_t) function LIBMUSCLE_Message_create_td_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Message_create_td_( &
                 timestamp, &
                 data) &
-                bind(C, name="LIBMUSCLE_Message_create_td_")
+                bind(C, name="LIBMUSCLE_MPI_Message_create_td_")
 
             use iso_c_binding
             real (c_double), value, intent(in) :: timestamp
             integer (c_intptr_t), value, intent(in) :: data
-        end function LIBMUSCLE_Message_create_td_
+        end function LIBMUSCLE_MPI_Message_create_td_
 
-        integer (c_intptr_t) function LIBMUSCLE_Message_create_tnd_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Message_create_tnd_( &
                 timestamp, &
                 next_timestamp, &
                 data) &
-                bind(C, name="LIBMUSCLE_Message_create_tnd_")
+                bind(C, name="LIBMUSCLE_MPI_Message_create_tnd_")
 
             use iso_c_binding
             real (c_double), value, intent(in) :: timestamp
             real (c_double), value, intent(in) :: next_timestamp
             integer (c_intptr_t), value, intent(in) :: data
-        end function LIBMUSCLE_Message_create_tnd_
+        end function LIBMUSCLE_MPI_Message_create_tnd_
 
-        integer (c_intptr_t) function LIBMUSCLE_Message_create_tds_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Message_create_tds_( &
                 timestamp, &
                 data, &
                 settings) &
-                bind(C, name="LIBMUSCLE_Message_create_tds_")
+                bind(C, name="LIBMUSCLE_MPI_Message_create_tds_")
 
             use iso_c_binding
             real (c_double), value, intent(in) :: timestamp
             integer (c_intptr_t), value, intent(in) :: data
             integer (c_intptr_t), value, intent(in) :: settings
-        end function LIBMUSCLE_Message_create_tds_
+        end function LIBMUSCLE_MPI_Message_create_tds_
 
-        integer (c_intptr_t) function LIBMUSCLE_Message_create_tnds_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Message_create_tnds_( &
                 timestamp, &
                 next_timestamp, &
                 data, &
                 settings) &
-                bind(C, name="LIBMUSCLE_Message_create_tnds_")
+                bind(C, name="LIBMUSCLE_MPI_Message_create_tnds_")
 
             use iso_c_binding
             real (c_double), value, intent(in) :: timestamp
             real (c_double), value, intent(in) :: next_timestamp
             integer (c_intptr_t), value, intent(in) :: data
             integer (c_intptr_t), value, intent(in) :: settings
-        end function LIBMUSCLE_Message_create_tnds_
+        end function LIBMUSCLE_MPI_Message_create_tnds_
 
-        subroutine LIBMUSCLE_Message_free_(self) &
-                bind(C, name="LIBMUSCLE_Message_free_")
+        subroutine LIBMUSCLE_MPI_Message_free_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_free_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_Message_free_
+        end subroutine LIBMUSCLE_MPI_Message_free_
 
-        real (c_double) function LIBMUSCLE_Message_timestamp_(self) &
-                bind(C, name="LIBMUSCLE_Message_timestamp_")
+        real (c_double) function LIBMUSCLE_MPI_Message_timestamp_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_timestamp_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Message_timestamp_
+        end function LIBMUSCLE_MPI_Message_timestamp_
 
-        subroutine LIBMUSCLE_Message_set_timestamp_( &
+        subroutine LIBMUSCLE_MPI_Message_set_timestamp_( &
                 self, &
                 timestamp) &
-                bind(C, name="LIBMUSCLE_Message_set_timestamp_")
+                bind(C, name="LIBMUSCLE_MPI_Message_set_timestamp_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             real (c_double), value, intent(in) :: timestamp
-        end subroutine LIBMUSCLE_Message_set_timestamp_
+        end subroutine LIBMUSCLE_MPI_Message_set_timestamp_
 
-        logical (c_bool) function LIBMUSCLE_Message_has_next_timestamp_(self) &
-                bind(C, name="LIBMUSCLE_Message_has_next_timestamp_")
+        logical (c_bool) function LIBMUSCLE_MPI_Message_has_next_timestamp_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_has_next_timestamp_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Message_has_next_timestamp_
+        end function LIBMUSCLE_MPI_Message_has_next_timestamp_
 
-        real (c_double) function LIBMUSCLE_Message_next_timestamp_(self) &
-                bind(C, name="LIBMUSCLE_Message_next_timestamp_")
+        real (c_double) function LIBMUSCLE_MPI_Message_next_timestamp_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_next_timestamp_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Message_next_timestamp_
+        end function LIBMUSCLE_MPI_Message_next_timestamp_
 
-        subroutine LIBMUSCLE_Message_set_next_timestamp_( &
+        subroutine LIBMUSCLE_MPI_Message_set_next_timestamp_( &
                 self, &
                 next_timestamp) &
-                bind(C, name="LIBMUSCLE_Message_set_next_timestamp_")
+                bind(C, name="LIBMUSCLE_MPI_Message_set_next_timestamp_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             real (c_double), value, intent(in) :: next_timestamp
-        end subroutine LIBMUSCLE_Message_set_next_timestamp_
+        end subroutine LIBMUSCLE_MPI_Message_set_next_timestamp_
 
-        subroutine LIBMUSCLE_Message_unset_next_timestamp_(self) &
-                bind(C, name="LIBMUSCLE_Message_unset_next_timestamp_")
+        subroutine LIBMUSCLE_MPI_Message_unset_next_timestamp_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_unset_next_timestamp_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_Message_unset_next_timestamp_
+        end subroutine LIBMUSCLE_MPI_Message_unset_next_timestamp_
 
-        integer (c_intptr_t) function LIBMUSCLE_Message_get_data_(self) &
-                bind(C, name="LIBMUSCLE_Message_get_data_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Message_get_data_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_get_data_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Message_get_data_
+        end function LIBMUSCLE_MPI_Message_get_data_
 
-        subroutine LIBMUSCLE_Message_set_data_d_( &
+        subroutine LIBMUSCLE_MPI_Message_set_data_d_( &
                 self, &
                 data) &
-                bind(C, name="LIBMUSCLE_Message_set_data_d_")
+                bind(C, name="LIBMUSCLE_MPI_Message_set_data_d_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_intptr_t), value, intent(in) :: data
-        end subroutine LIBMUSCLE_Message_set_data_d_
+        end subroutine LIBMUSCLE_MPI_Message_set_data_d_
 
-        subroutine LIBMUSCLE_Message_set_data_dcr_( &
+        subroutine LIBMUSCLE_MPI_Message_set_data_dcr_( &
                 self, &
                 data) &
-                bind(C, name="LIBMUSCLE_Message_set_data_dcr_")
+                bind(C, name="LIBMUSCLE_MPI_Message_set_data_dcr_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_intptr_t), value, intent(in) :: data
-        end subroutine LIBMUSCLE_Message_set_data_dcr_
+        end subroutine LIBMUSCLE_MPI_Message_set_data_dcr_
 
-        logical (c_bool) function LIBMUSCLE_Message_has_settings_(self) &
-                bind(C, name="LIBMUSCLE_Message_has_settings_")
+        logical (c_bool) function LIBMUSCLE_MPI_Message_has_settings_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_has_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Message_has_settings_
+        end function LIBMUSCLE_MPI_Message_has_settings_
 
-        integer (c_intptr_t) function LIBMUSCLE_Message_get_settings_(self) &
-                bind(C, name="LIBMUSCLE_Message_get_settings_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Message_get_settings_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_get_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Message_get_settings_
+        end function LIBMUSCLE_MPI_Message_get_settings_
 
-        subroutine LIBMUSCLE_Message_set_settings_( &
+        subroutine LIBMUSCLE_MPI_Message_set_settings_( &
                 self, &
                 settings) &
-                bind(C, name="LIBMUSCLE_Message_set_settings_")
+                bind(C, name="LIBMUSCLE_MPI_Message_set_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_intptr_t), value, intent(in) :: settings
-        end subroutine LIBMUSCLE_Message_set_settings_
+        end subroutine LIBMUSCLE_MPI_Message_set_settings_
 
-        subroutine LIBMUSCLE_Message_unset_settings_(self) &
-                bind(C, name="LIBMUSCLE_Message_unset_settings_")
+        subroutine LIBMUSCLE_MPI_Message_unset_settings_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Message_unset_settings_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_Message_unset_settings_
+        end subroutine LIBMUSCLE_MPI_Message_unset_settings_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_create_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_create_( &
                 cla, &
                 ports, &
                 flags, &
                 communicator, &
                 root) &
-                bind(C, name="LIBMUSCLE_Instance_create_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_create_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: cla
@@ -3334,42 +3334,42 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_create_( &
             integer (c_int), value, intent(in) :: flags
             integer (c_int), value, intent(in) :: communicator
             integer (c_int), value, intent(in) :: root
-        end function LIBMUSCLE_Instance_create_
+        end function LIBMUSCLE_MPI_Instance_create_
 
-        subroutine LIBMUSCLE_Instance_free_(self) &
-                bind(C, name="LIBMUSCLE_Instance_free_")
+        subroutine LIBMUSCLE_MPI_Instance_free_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Instance_free_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_Instance_free_
+        end subroutine LIBMUSCLE_MPI_Instance_free_
 
-        logical (c_bool) function LIBMUSCLE_Instance_reuse_instance_(self) &
-                bind(C, name="LIBMUSCLE_Instance_reuse_instance_")
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_reuse_instance_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Instance_reuse_instance_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Instance_reuse_instance_
+        end function LIBMUSCLE_MPI_Instance_reuse_instance_
 
-        subroutine LIBMUSCLE_Instance_error_shutdown_( &
+        subroutine LIBMUSCLE_MPI_Instance_error_shutdown_( &
                 self, &
                 message, &
                 message_size) &
-                bind(C, name="LIBMUSCLE_Instance_error_shutdown_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_error_shutdown_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             character, intent(in) :: message
             integer (c_size_t), value, intent(in) :: message_size
-        end subroutine LIBMUSCLE_Instance_error_shutdown_
+        end subroutine LIBMUSCLE_MPI_Instance_error_shutdown_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_character_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_setting_a_character_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_is_setting_a_character_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_setting_a_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3378,16 +3378,16 @@ logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_character_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_is_setting_a_character_
+        end function LIBMUSCLE_MPI_Instance_is_setting_a_character_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_int8_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_setting_a_int8_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_is_setting_a_int8_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_setting_a_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3396,16 +3396,16 @@ logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_int8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_is_setting_a_int8_
+        end function LIBMUSCLE_MPI_Instance_is_setting_a_int8_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_setting_a_real8_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_setting_a_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3414,16 +3414,16 @@ logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_is_setting_a_real8_
+        end function LIBMUSCLE_MPI_Instance_is_setting_a_real8_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_logical_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_setting_a_logical_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_is_setting_a_logical_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_setting_a_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3432,16 +3432,16 @@ logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_logical_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_is_setting_a_logical_
+        end function LIBMUSCLE_MPI_Instance_is_setting_a_logical_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8array_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_setting_a_real8array_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8array_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_setting_a_real8array_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3450,16 +3450,16 @@ logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8array_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_is_setting_a_real8array_
+        end function LIBMUSCLE_MPI_Instance_is_setting_a_real8array_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8array2_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_setting_a_real8array2_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8array2_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_setting_a_real8array2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3468,9 +3468,9 @@ logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8array2_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_is_setting_a_real8array2_
+        end function LIBMUSCLE_MPI_Instance_is_setting_a_real8array2_
 
-        subroutine LIBMUSCLE_Instance_get_setting_as_character_( &
+        subroutine LIBMUSCLE_MPI_Instance_get_setting_as_character_( &
                 self, &
                 name, &
                 name_size, &
@@ -3479,7 +3479,7 @@ subroutine LIBMUSCLE_Instance_get_setting_as_character_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_get_setting_as_character_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_get_setting_as_character_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3490,16 +3490,16 @@ subroutine LIBMUSCLE_Instance_get_setting_as_character_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Instance_get_setting_as_character_
+        end subroutine LIBMUSCLE_MPI_Instance_get_setting_as_character_
 
-        integer (c_int64_t) function LIBMUSCLE_Instance_get_setting_as_int8_( &
+        integer (c_int64_t) function LIBMUSCLE_MPI_Instance_get_setting_as_int8_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_get_setting_as_int8_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_get_setting_as_int8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3508,16 +3508,16 @@ integer (c_int64_t) function LIBMUSCLE_Instance_get_setting_as_int8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_get_setting_as_int8_
+        end function LIBMUSCLE_MPI_Instance_get_setting_as_int8_
 
-        real (c_double) function LIBMUSCLE_Instance_get_setting_as_real8_( &
+        real (c_double) function LIBMUSCLE_MPI_Instance_get_setting_as_real8_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_get_setting_as_real8_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3526,16 +3526,16 @@ real (c_double) function LIBMUSCLE_Instance_get_setting_as_real8_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_get_setting_as_real8_
+        end function LIBMUSCLE_MPI_Instance_get_setting_as_real8_
 
-        logical (c_bool) function LIBMUSCLE_Instance_get_setting_as_logical_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_get_setting_as_logical_( &
                 self, &
                 name, &
                 name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_get_setting_as_logical_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_get_setting_as_logical_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3544,9 +3544,9 @@ logical (c_bool) function LIBMUSCLE_Instance_get_setting_as_logical_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_get_setting_as_logical_
+        end function LIBMUSCLE_MPI_Instance_get_setting_as_logical_
 
-        subroutine LIBMUSCLE_Instance_get_setting_as_real8array_( &
+        subroutine LIBMUSCLE_MPI_Instance_get_setting_as_real8array_( &
                 self, &
                 name, &
                 name_size, &
@@ -3555,7 +3555,7 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8array_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_get_setting_as_real8array_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3566,9 +3566,9 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Instance_get_setting_as_real8array_
+        end subroutine LIBMUSCLE_MPI_Instance_get_setting_as_real8array_
 
-        subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_( &
+        subroutine LIBMUSCLE_MPI_Instance_get_setting_as_real8array2_( &
                 self, &
                 name, &
                 name_size, &
@@ -3577,7 +3577,7 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8array2_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_get_setting_as_real8array2_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3588,98 +3588,98 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_
+        end subroutine LIBMUSCLE_MPI_Instance_get_setting_as_real8array2_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_list_ports_(self) &
-                bind(C, name="LIBMUSCLE_Instance_list_ports_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_list_ports_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Instance_list_ports_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Instance_list_ports_
+        end function LIBMUSCLE_MPI_Instance_list_ports_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_connected_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_connected_( &
                 self, &
                 port, &
                 port_size) &
-                bind(C, name="LIBMUSCLE_Instance_is_connected_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_connected_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             character, intent(in) :: port
             integer (c_size_t), value, intent(in) :: port_size
-        end function LIBMUSCLE_Instance_is_connected_
+        end function LIBMUSCLE_MPI_Instance_is_connected_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_vector_port_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_vector_port_( &
                 self, &
                 port, &
                 port_size) &
-                bind(C, name="LIBMUSCLE_Instance_is_vector_port_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_vector_port_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             character, intent(in) :: port
             integer (c_size_t), value, intent(in) :: port_size
-        end function LIBMUSCLE_Instance_is_vector_port_
+        end function LIBMUSCLE_MPI_Instance_is_vector_port_
 
-        logical (c_bool) function LIBMUSCLE_Instance_is_resizable_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_is_resizable_( &
                 self, &
                 port, &
                 port_size) &
-                bind(C, name="LIBMUSCLE_Instance_is_resizable_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_is_resizable_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             character, intent(in) :: port
             integer (c_size_t), value, intent(in) :: port_size
-        end function LIBMUSCLE_Instance_is_resizable_
+        end function LIBMUSCLE_MPI_Instance_is_resizable_
 
-        integer (c_int) function LIBMUSCLE_Instance_get_port_length_( &
+        integer (c_int) function LIBMUSCLE_MPI_Instance_get_port_length_( &
                 self, &
                 port, &
                 port_size) &
-                bind(C, name="LIBMUSCLE_Instance_get_port_length_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_get_port_length_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             character, intent(in) :: port
             integer (c_size_t), value, intent(in) :: port_size
-        end function LIBMUSCLE_Instance_get_port_length_
+        end function LIBMUSCLE_MPI_Instance_get_port_length_
 
-        subroutine LIBMUSCLE_Instance_set_port_length_( &
+        subroutine LIBMUSCLE_MPI_Instance_set_port_length_( &
                 self, &
                 port, &
                 port_size, &
                 length) &
-                bind(C, name="LIBMUSCLE_Instance_set_port_length_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_set_port_length_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             character, intent(in) :: port
             integer (c_size_t), value, intent(in) :: port_size
             integer (c_int), value, intent(in) :: length
-        end subroutine LIBMUSCLE_Instance_set_port_length_
+        end subroutine LIBMUSCLE_MPI_Instance_set_port_length_
 
-        subroutine LIBMUSCLE_Instance_send_pm_( &
+        subroutine LIBMUSCLE_MPI_Instance_send_pm_( &
                 self, &
                 port_name, &
                 port_name_size, &
                 message) &
-                bind(C, name="LIBMUSCLE_Instance_send_pm_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_send_pm_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             character, intent(in) :: port_name
             integer (c_size_t), value, intent(in) :: port_name_size
             integer (c_intptr_t), value, intent(in) :: message
-        end subroutine LIBMUSCLE_Instance_send_pm_
+        end subroutine LIBMUSCLE_MPI_Instance_send_pm_
 
-        subroutine LIBMUSCLE_Instance_send_pms_( &
+        subroutine LIBMUSCLE_MPI_Instance_send_pms_( &
                 self, &
                 port_name, &
                 port_name_size, &
                 message, &
                 slot) &
-                bind(C, name="LIBMUSCLE_Instance_send_pms_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_send_pms_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3687,16 +3687,16 @@ subroutine LIBMUSCLE_Instance_send_pms_( &
             integer (c_size_t), value, intent(in) :: port_name_size
             integer (c_intptr_t), value, intent(in) :: message
             integer (c_int), value, intent(in) :: slot
-        end subroutine LIBMUSCLE_Instance_send_pms_
+        end subroutine LIBMUSCLE_MPI_Instance_send_pms_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_receive_p_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_receive_p_( &
                 self, &
                 port_name, &
                 port_name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_receive_p_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_receive_p_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3705,9 +3705,9 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_p_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_receive_p_
+        end function LIBMUSCLE_MPI_Instance_receive_p_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_receive_pd_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_receive_pd_( &
                 self, &
                 port_name, &
                 port_name_size, &
@@ -3715,7 +3715,7 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_pd_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_receive_pd_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_receive_pd_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3725,9 +3725,9 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_pd_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_receive_pd_
+        end function LIBMUSCLE_MPI_Instance_receive_pd_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_receive_ps_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_receive_ps_( &
                 self, &
                 port_name, &
                 port_name_size, &
@@ -3735,7 +3735,7 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_ps_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_receive_ps_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_receive_ps_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3745,9 +3745,9 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_ps_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_receive_ps_
+        end function LIBMUSCLE_MPI_Instance_receive_ps_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_receive_psd_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_receive_psd_( &
                 self, &
                 port_name, &
                 port_name_size, &
@@ -3756,7 +3756,7 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_psd_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_receive_psd_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_receive_psd_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3767,16 +3767,16 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_psd_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_receive_psd_
+        end function LIBMUSCLE_MPI_Instance_receive_psd_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_p_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_receive_with_settings_p_( &
                 self, &
                 port_name, &
                 port_name_size, &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_receive_with_settings_p_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_receive_with_settings_p_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3785,9 +3785,9 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_p_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_receive_with_settings_p_
+        end function LIBMUSCLE_MPI_Instance_receive_with_settings_p_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_pd_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_receive_with_settings_pd_( &
                 self, &
                 port_name, &
                 port_name_size, &
@@ -3795,7 +3795,7 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_pd_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_receive_with_settings_pd_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_receive_with_settings_pd_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3805,9 +3805,9 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_pd_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_receive_with_settings_pd_
+        end function LIBMUSCLE_MPI_Instance_receive_with_settings_pd_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_ps_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_receive_with_settings_ps_( &
                 self, &
                 port_name, &
                 port_name_size, &
@@ -3815,7 +3815,7 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_ps_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_receive_with_settings_ps_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_receive_with_settings_ps_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3825,9 +3825,9 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_ps_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_receive_with_settings_ps_
+        end function LIBMUSCLE_MPI_Instance_receive_with_settings_ps_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_psd_( &
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_receive_with_settings_psd_( &
                 self, &
                 port_name, &
                 port_name_size, &
@@ -3836,7 +3836,7 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_psd_( &
                 err_code, &
                 err_msg, &
                 err_msg_len) &
-                bind(C, name="LIBMUSCLE_Instance_receive_with_settings_psd_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_receive_with_settings_psd_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
@@ -3847,65 +3847,65 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_psd_( &
             integer (c_int), intent(out) :: err_code
             type (c_ptr), intent(out) :: err_msg
             integer (c_size_t), intent(out) :: err_msg_len
-        end function LIBMUSCLE_Instance_receive_with_settings_psd_
+        end function LIBMUSCLE_MPI_Instance_receive_with_settings_psd_
 
-        logical (c_bool) function LIBMUSCLE_Instance_resuming_(self) &
-                bind(C, name="LIBMUSCLE_Instance_resuming_")
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_resuming_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Instance_resuming_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Instance_resuming_
+        end function LIBMUSCLE_MPI_Instance_resuming_
 
-        logical (c_bool) function LIBMUSCLE_Instance_should_init_(self) &
-                bind(C, name="LIBMUSCLE_Instance_should_init_")
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_should_init_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Instance_should_init_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Instance_should_init_
+        end function LIBMUSCLE_MPI_Instance_should_init_
 
-        integer (c_intptr_t) function LIBMUSCLE_Instance_load_snapshot_(self) &
-                bind(C, name="LIBMUSCLE_Instance_load_snapshot_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_Instance_load_snapshot_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Instance_load_snapshot_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Instance_load_snapshot_
+        end function LIBMUSCLE_MPI_Instance_load_snapshot_
 
-        logical (c_bool) function LIBMUSCLE_Instance_should_save_snapshot_( &
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_should_save_snapshot_( &
                 self, &
                 timestamp) &
-                bind(C, name="LIBMUSCLE_Instance_should_save_snapshot_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_should_save_snapshot_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             real (c_double), value, intent(in) :: timestamp
-        end function LIBMUSCLE_Instance_should_save_snapshot_
+        end function LIBMUSCLE_MPI_Instance_should_save_snapshot_
 
-        subroutine LIBMUSCLE_Instance_save_snapshot_( &
+        subroutine LIBMUSCLE_MPI_Instance_save_snapshot_( &
                 self, &
                 message) &
-                bind(C, name="LIBMUSCLE_Instance_save_snapshot_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_save_snapshot_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_intptr_t), value, intent(in) :: message
-        end subroutine LIBMUSCLE_Instance_save_snapshot_
+        end subroutine LIBMUSCLE_MPI_Instance_save_snapshot_
 
-        logical (c_bool) function LIBMUSCLE_Instance_should_save_final_snapshot_(self) &
-                bind(C, name="LIBMUSCLE_Instance_should_save_final_snapshot_")
+        logical (c_bool) function LIBMUSCLE_MPI_Instance_should_save_final_snapshot_(self) &
+                bind(C, name="LIBMUSCLE_MPI_Instance_should_save_final_snapshot_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end function LIBMUSCLE_Instance_should_save_final_snapshot_
+        end function LIBMUSCLE_MPI_Instance_should_save_final_snapshot_
 
-        subroutine LIBMUSCLE_Instance_save_final_snapshot_( &
+        subroutine LIBMUSCLE_MPI_Instance_save_final_snapshot_( &
                 self, &
                 message) &
-                bind(C, name="LIBMUSCLE_Instance_save_final_snapshot_")
+                bind(C, name="LIBMUSCLE_MPI_Instance_save_final_snapshot_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_intptr_t), value, intent(in) :: message
-        end subroutine LIBMUSCLE_Instance_save_final_snapshot_
+        end subroutine LIBMUSCLE_MPI_Instance_save_final_snapshot_
 
     end interface
 
@@ -4313,33 +4313,33 @@ end subroutine LIBMUSCLE_Instance_save_final_snapshot_
 
     interface
 
-        integer (c_intptr_t) function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_(count) &
-                bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_")
+        integer (c_intptr_t) function LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_create_(count) &
+                bind(C, name="LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_create_")
 
             use iso_c_binding
             integer (c_int), value, intent(in) :: count
-        end function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_
+        end function LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_create_
 
-        subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(self) &
-                bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_")
+        subroutine LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_free_(self) &
+                bind(C, name="LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_free_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
-        end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_
+        end subroutine LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_free_
 
-        subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_( &
+        subroutine LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_set_arg_( &
                 self, &
                 i, &
                 arg, &
                 arg_size) &
-                bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_")
+                bind(C, name="LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_set_arg_")
 
             use iso_c_binding
             integer (c_intptr_t), value, intent(in) :: self
             integer (c_int), value, intent(in) :: i
             character, intent(in) :: arg
             integer (c_size_t), value, intent(in) :: arg_size
-        end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_
+        end subroutine LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_set_arg_
 
     end interface
 
@@ -4358,7 +4358,7 @@ function LIBMUSCLE_DataConstRef_create_nil( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_nil_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_nil_( &
     )
 
         LIBMUSCLE_DataConstRef_create_nil%ptr = ret_val
@@ -4372,7 +4372,7 @@ function LIBMUSCLE_DataConstRef_create_logical( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_logical_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_logical_( &
             logical(value, c_bool))
 
         LIBMUSCLE_DataConstRef_create_logical%ptr = ret_val
@@ -4386,7 +4386,7 @@ function LIBMUSCLE_DataConstRef_create_character( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_character_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_character_( &
             value, int(len(value), c_size_t))
 
         LIBMUSCLE_DataConstRef_create_character%ptr = ret_val
@@ -4400,7 +4400,7 @@ function LIBMUSCLE_DataConstRef_create_int1( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_int1_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_int1_( &
             value)
 
         LIBMUSCLE_DataConstRef_create_int1%ptr = ret_val
@@ -4414,7 +4414,7 @@ function LIBMUSCLE_DataConstRef_create_int2( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_int2_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_int2_( &
             value)
 
         LIBMUSCLE_DataConstRef_create_int2%ptr = ret_val
@@ -4428,7 +4428,7 @@ function LIBMUSCLE_DataConstRef_create_int4( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_int4_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_int4_( &
             value)
 
         LIBMUSCLE_DataConstRef_create_int4%ptr = ret_val
@@ -4442,7 +4442,7 @@ function LIBMUSCLE_DataConstRef_create_int8( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_int8_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_int8_( &
             value)
 
         LIBMUSCLE_DataConstRef_create_int8%ptr = ret_val
@@ -4456,7 +4456,7 @@ function LIBMUSCLE_DataConstRef_create_real4( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_real4_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_real4_( &
             value)
 
         LIBMUSCLE_DataConstRef_create_real4%ptr = ret_val
@@ -4470,7 +4470,7 @@ function LIBMUSCLE_DataConstRef_create_real8( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_real8_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_real8_( &
             value)
 
         LIBMUSCLE_DataConstRef_create_real8%ptr = ret_val
@@ -4484,7 +4484,7 @@ function LIBMUSCLE_DataConstRef_create_settings( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_settings_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_settings_( &
             value%ptr)
 
         LIBMUSCLE_DataConstRef_create_settings%ptr = ret_val
@@ -4498,7 +4498,7 @@ function LIBMUSCLE_DataConstRef_create_copy( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_copy_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_copy_( &
             value%ptr)
 
         LIBMUSCLE_DataConstRef_create_copy%ptr = ret_val
@@ -4512,7 +4512,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_1_logical_a%ptr = ret_val
@@ -4526,7 +4526,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_2_logical_a%ptr = ret_val
@@ -4540,7 +4540,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_3_logical_a%ptr = ret_val
@@ -4554,7 +4554,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_4_logical_a%ptr = ret_val
@@ -4568,7 +4568,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_5_logical_a%ptr = ret_val
@@ -4582,7 +4582,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_6_logical_a%ptr = ret_val
@@ -4596,7 +4596,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_7_logical_a%ptr = ret_val
@@ -4610,7 +4610,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_1_int4_a%ptr = ret_val
@@ -4624,7 +4624,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_2_int4_a%ptr = ret_val
@@ -4638,7 +4638,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_3_int4_a%ptr = ret_val
@@ -4652,7 +4652,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_4_int4_a%ptr = ret_val
@@ -4666,7 +4666,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_5_int4_a%ptr = ret_val
@@ -4680,7 +4680,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_6_int4_a%ptr = ret_val
@@ -4694,7 +4694,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_7_int4_a%ptr = ret_val
@@ -4708,7 +4708,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_1_int8_a%ptr = ret_val
@@ -4722,7 +4722,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_2_int8_a%ptr = ret_val
@@ -4736,7 +4736,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_3_int8_a%ptr = ret_val
@@ -4750,7 +4750,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_4_int8_a%ptr = ret_val
@@ -4764,7 +4764,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_5_int8_a%ptr = ret_val
@@ -4778,7 +4778,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_6_int8_a%ptr = ret_val
@@ -4792,7 +4792,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_7_int8_a%ptr = ret_val
@@ -4806,7 +4806,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_1_real4_a%ptr = ret_val
@@ -4820,7 +4820,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_2_real4_a%ptr = ret_val
@@ -4834,7 +4834,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_3_real4_a%ptr = ret_val
@@ -4848,7 +4848,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_4_real4_a%ptr = ret_val
@@ -4862,7 +4862,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_5_real4_a%ptr = ret_val
@@ -4876,7 +4876,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_6_real4_a%ptr = ret_val
@@ -4890,7 +4890,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_7_real4_a%ptr = ret_val
@@ -4904,7 +4904,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_1_real8_a%ptr = ret_val
@@ -4918,7 +4918,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_2_real8_a%ptr = ret_val
@@ -4932,7 +4932,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_3_real8_a%ptr = ret_val
@@ -4946,7 +4946,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_4_real8_a%ptr = ret_val
@@ -4960,7 +4960,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_5_real8_a%ptr = ret_val
@@ -4974,7 +4974,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_6_real8_a%ptr = ret_val
@@ -4988,7 +4988,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_DataConstRef_create_grid_7_real8_a%ptr = ret_val
@@ -5005,7 +5005,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -5034,7 +5034,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -5065,7 +5065,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -5098,7 +5098,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -5133,7 +5133,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -5170,7 +5170,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -5209,7 +5209,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -5236,7 +5236,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -5265,7 +5265,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -5296,7 +5296,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -5329,7 +5329,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -5364,7 +5364,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -5401,7 +5401,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -5440,7 +5440,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -5467,7 +5467,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -5496,7 +5496,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -5527,7 +5527,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -5560,7 +5560,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -5595,7 +5595,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -5632,7 +5632,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -5671,7 +5671,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -5698,7 +5698,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -5727,7 +5727,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -5758,7 +5758,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -5791,7 +5791,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -5826,7 +5826,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -5863,7 +5863,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -5902,7 +5902,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -5929,7 +5929,7 @@ function LIBMUSCLE_DataConstRef_create_grid_1_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -5958,7 +5958,7 @@ function LIBMUSCLE_DataConstRef_create_grid_2_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -5989,7 +5989,7 @@ function LIBMUSCLE_DataConstRef_create_grid_3_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -6022,7 +6022,7 @@ function LIBMUSCLE_DataConstRef_create_grid_4_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -6057,7 +6057,7 @@ function LIBMUSCLE_DataConstRef_create_grid_5_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -6094,7 +6094,7 @@ function LIBMUSCLE_DataConstRef_create_grid_6_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -6133,7 +6133,7 @@ function LIBMUSCLE_DataConstRef_create_grid_7_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -6153,7 +6153,7 @@ subroutine LIBMUSCLE_DataConstRef_free(self)
         implicit none
         type(LIBMUSCLE_DataConstRef), intent(inout) :: self
 
-        call LIBMUSCLE_DataConstRef_free_(self%ptr)
+        call LIBMUSCLE_MPI_DataConstRef_free_(self%ptr)
         self%ptr = 0
     end subroutine LIBMUSCLE_DataConstRef_free
 
@@ -6165,7 +6165,7 @@ function LIBMUSCLE_DataConstRef_is_a_logical( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_logical_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_logical_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_logical = ret_val
@@ -6179,7 +6179,7 @@ function LIBMUSCLE_DataConstRef_is_a_character( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_character_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_character_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_character = ret_val
@@ -6193,7 +6193,7 @@ function LIBMUSCLE_DataConstRef_is_a_int( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_int_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_int_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_int = ret_val
@@ -6207,7 +6207,7 @@ function LIBMUSCLE_DataConstRef_is_a_int1( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_int1_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_int1_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_int1 = ret_val
@@ -6221,7 +6221,7 @@ function LIBMUSCLE_DataConstRef_is_a_int2( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_int2_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_int2_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_int2 = ret_val
@@ -6235,7 +6235,7 @@ function LIBMUSCLE_DataConstRef_is_a_int4( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_int4_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_int4_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_int4 = ret_val
@@ -6249,7 +6249,7 @@ function LIBMUSCLE_DataConstRef_is_a_int8( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_int8_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_int8_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_int8 = ret_val
@@ -6263,7 +6263,7 @@ function LIBMUSCLE_DataConstRef_is_a_real4( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_real4_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_real4_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_real4 = ret_val
@@ -6277,7 +6277,7 @@ function LIBMUSCLE_DataConstRef_is_a_real8( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_real8_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_real8_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_real8 = ret_val
@@ -6291,7 +6291,7 @@ function LIBMUSCLE_DataConstRef_is_a_dict( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_dict_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_dict_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_dict = ret_val
@@ -6305,7 +6305,7 @@ function LIBMUSCLE_DataConstRef_is_a_list( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_list_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_list_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_list = ret_val
@@ -6319,7 +6319,7 @@ function LIBMUSCLE_DataConstRef_is_a_grid_of_logical( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_logical_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_logical_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_grid_of_logical = ret_val
@@ -6333,7 +6333,7 @@ function LIBMUSCLE_DataConstRef_is_a_grid_of_real4( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_real4_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real4_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_grid_of_real4 = ret_val
@@ -6347,7 +6347,7 @@ function LIBMUSCLE_DataConstRef_is_a_grid_of_real8( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_real8_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_real8_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_grid_of_real8 = ret_val
@@ -6361,7 +6361,7 @@ function LIBMUSCLE_DataConstRef_is_a_grid_of_int4( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_int4_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int4_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_grid_of_int4 = ret_val
@@ -6375,7 +6375,7 @@ function LIBMUSCLE_DataConstRef_is_a_grid_of_int8( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_int8_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_grid_of_int8_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_grid_of_int8 = ret_val
@@ -6389,7 +6389,7 @@ function LIBMUSCLE_DataConstRef_is_a_byte_array( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_byte_array_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_byte_array_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_byte_array = ret_val
@@ -6403,7 +6403,7 @@ function LIBMUSCLE_DataConstRef_is_nil( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_nil_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_nil_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_nil = ret_val
@@ -6417,7 +6417,7 @@ function LIBMUSCLE_DataConstRef_is_a_settings( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_is_a_settings_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_is_a_settings_( &
             self%ptr)
 
         LIBMUSCLE_DataConstRef_is_a_settings = ret_val
@@ -6431,7 +6431,7 @@ function LIBMUSCLE_DataConstRef_size( &
 
         integer (c_size_t) :: ret_val
 
-        ret_val = LIBMUSCLE_DataConstRef_size_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_size_( &
             self%ptr)
         LIBMUSCLE_DataConstRef_size = ret_val
     end function LIBMUSCLE_DataConstRef_size
@@ -6454,7 +6454,7 @@ function LIBMUSCLE_DataConstRef_as_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_logical_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_logical_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -6511,7 +6511,7 @@ function LIBMUSCLE_DataConstRef_as_character( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_as_character_( &
+        call LIBMUSCLE_MPI_DataConstRef_as_character_( &
             self%ptr, &
             ret_val, &
             ret_val_size, &
@@ -6572,7 +6572,7 @@ function LIBMUSCLE_DataConstRef_as_int( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_int_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_int_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -6625,7 +6625,7 @@ function LIBMUSCLE_DataConstRef_as_int1( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_int1_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_int1_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -6678,7 +6678,7 @@ function LIBMUSCLE_DataConstRef_as_int2( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_int2_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_int2_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -6731,7 +6731,7 @@ function LIBMUSCLE_DataConstRef_as_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_int4_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_int4_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -6784,7 +6784,7 @@ function LIBMUSCLE_DataConstRef_as_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_int8_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_int8_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -6837,7 +6837,7 @@ function LIBMUSCLE_DataConstRef_as_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_real4_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_real4_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -6890,7 +6890,7 @@ function LIBMUSCLE_DataConstRef_as_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_real8_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_real8_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -6943,7 +6943,7 @@ function LIBMUSCLE_DataConstRef_as_settings( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_as_settings_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_as_settings_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -7000,7 +7000,7 @@ subroutine LIBMUSCLE_DataConstRef_as_byte_array( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_as_byte_array_( &
+        call LIBMUSCLE_MPI_DataConstRef_as_byte_array_( &
             self%ptr, &
             ret_val, &
             ret_val_size, &
@@ -7059,7 +7059,7 @@ function LIBMUSCLE_DataConstRef_get_item_by_key( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_get_item_by_key_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_get_item_by_key_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             err_code_v, &
@@ -7116,7 +7116,7 @@ function LIBMUSCLE_DataConstRef_get_item_by_index( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_get_item_by_index_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_get_item_by_index_( &
             self%ptr, &
             i, &
             err_code_v, &
@@ -7171,7 +7171,7 @@ function LIBMUSCLE_DataConstRef_num_dims( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_num_dims_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_num_dims_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -7227,7 +7227,7 @@ subroutine LIBMUSCLE_DataConstRef_shape( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_shape_( &
+        call LIBMUSCLE_MPI_DataConstRef_shape_( &
             self%ptr, &
             ret_val, &
             ret_val_size, &
@@ -7290,7 +7290,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_1_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_logical_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_logical_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -7359,7 +7359,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_2_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_logical_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_logical_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -7428,7 +7428,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_3_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_logical_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_logical_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -7497,7 +7497,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_4_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_logical_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_logical_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -7566,7 +7566,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_5_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_logical_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_logical_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -7635,7 +7635,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_6_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_logical_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_logical_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -7704,7 +7704,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_7_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_logical_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_logical_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -7773,7 +7773,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_1_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int4_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -7842,7 +7842,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_2_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int4_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -7911,7 +7911,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_3_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int4_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -7980,7 +7980,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_4_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int4_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -8049,7 +8049,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_5_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int4_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -8118,7 +8118,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_6_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int4_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -8187,7 +8187,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_7_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int4_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -8256,7 +8256,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_1_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int8_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -8325,7 +8325,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_2_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int8_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -8394,7 +8394,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_3_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int8_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -8463,7 +8463,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_4_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int8_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -8532,7 +8532,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_5_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int8_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -8601,7 +8601,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_6_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int8_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -8670,7 +8670,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_7_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_int8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_int8_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -8739,7 +8739,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_1_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real4_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -8808,7 +8808,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_2_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real4_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -8877,7 +8877,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_3_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real4_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -8946,7 +8946,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_4_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real4_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -9015,7 +9015,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_5_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real4_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -9084,7 +9084,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_6_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real4_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -9153,7 +9153,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_7_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real4_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real4_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -9222,7 +9222,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_1_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real8_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -9291,7 +9291,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_2_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real8_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -9360,7 +9360,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_3_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real8_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -9429,7 +9429,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_4_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real8_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -9498,7 +9498,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_5_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real8_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -9567,7 +9567,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_6_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real8_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -9636,7 +9636,7 @@ subroutine LIBMUSCLE_DataConstRef_elements_7_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_elements_real8_( &
+        call LIBMUSCLE_MPI_DataConstRef_elements_real8_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -9699,7 +9699,7 @@ function LIBMUSCLE_DataConstRef_has_indexes( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_DataConstRef_has_indexes_( &
+        ret_val = LIBMUSCLE_MPI_DataConstRef_has_indexes_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -9758,7 +9758,7 @@ function LIBMUSCLE_DataConstRef_index( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_DataConstRef_index_( &
+        call LIBMUSCLE_MPI_DataConstRef_index_( &
             self%ptr, &
             i, &
             ret_val, &
@@ -9809,7 +9809,7 @@ function LIBMUSCLE_Data_create_nil( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_nil_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_nil_( &
     )
 
         LIBMUSCLE_Data_create_nil%ptr = ret_val
@@ -9823,7 +9823,7 @@ function LIBMUSCLE_Data_create_logical( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_logical_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_logical_( &
             logical(value, c_bool))
 
         LIBMUSCLE_Data_create_logical%ptr = ret_val
@@ -9837,7 +9837,7 @@ function LIBMUSCLE_Data_create_character( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_character_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_character_( &
             value, int(len(value), c_size_t))
 
         LIBMUSCLE_Data_create_character%ptr = ret_val
@@ -9851,7 +9851,7 @@ function LIBMUSCLE_Data_create_int1( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_int1_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_int1_( &
             value)
 
         LIBMUSCLE_Data_create_int1%ptr = ret_val
@@ -9865,7 +9865,7 @@ function LIBMUSCLE_Data_create_int2( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_int2_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_int2_( &
             value)
 
         LIBMUSCLE_Data_create_int2%ptr = ret_val
@@ -9879,7 +9879,7 @@ function LIBMUSCLE_Data_create_int4( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_int4_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_int4_( &
             value)
 
         LIBMUSCLE_Data_create_int4%ptr = ret_val
@@ -9893,7 +9893,7 @@ function LIBMUSCLE_Data_create_int8( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_int8_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_int8_( &
             value)
 
         LIBMUSCLE_Data_create_int8%ptr = ret_val
@@ -9907,7 +9907,7 @@ function LIBMUSCLE_Data_create_real4( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_real4_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_real4_( &
             value)
 
         LIBMUSCLE_Data_create_real4%ptr = ret_val
@@ -9921,7 +9921,7 @@ function LIBMUSCLE_Data_create_real8( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_real8_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_real8_( &
             value)
 
         LIBMUSCLE_Data_create_real8%ptr = ret_val
@@ -9935,7 +9935,7 @@ function LIBMUSCLE_Data_create_settings( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_settings_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_settings_( &
             value%ptr)
 
         LIBMUSCLE_Data_create_settings%ptr = ret_val
@@ -9949,7 +9949,7 @@ function LIBMUSCLE_Data_create_copy( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_copy_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_copy_( &
             value%ptr)
 
         LIBMUSCLE_Data_create_copy%ptr = ret_val
@@ -9963,7 +9963,7 @@ function LIBMUSCLE_Data_create_grid_1_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_1_logical_a%ptr = ret_val
@@ -9977,7 +9977,7 @@ function LIBMUSCLE_Data_create_grid_2_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_2_logical_a%ptr = ret_val
@@ -9991,7 +9991,7 @@ function LIBMUSCLE_Data_create_grid_3_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_3_logical_a%ptr = ret_val
@@ -10005,7 +10005,7 @@ function LIBMUSCLE_Data_create_grid_4_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_4_logical_a%ptr = ret_val
@@ -10019,7 +10019,7 @@ function LIBMUSCLE_Data_create_grid_5_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_5_logical_a%ptr = ret_val
@@ -10033,7 +10033,7 @@ function LIBMUSCLE_Data_create_grid_6_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_6_logical_a%ptr = ret_val
@@ -10047,7 +10047,7 @@ function LIBMUSCLE_Data_create_grid_7_logical_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_a_( &
             logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_7_logical_a%ptr = ret_val
@@ -10061,7 +10061,7 @@ function LIBMUSCLE_Data_create_grid_1_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_1_int4_a%ptr = ret_val
@@ -10075,7 +10075,7 @@ function LIBMUSCLE_Data_create_grid_2_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_2_int4_a%ptr = ret_val
@@ -10089,7 +10089,7 @@ function LIBMUSCLE_Data_create_grid_3_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_3_int4_a%ptr = ret_val
@@ -10103,7 +10103,7 @@ function LIBMUSCLE_Data_create_grid_4_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_4_int4_a%ptr = ret_val
@@ -10117,7 +10117,7 @@ function LIBMUSCLE_Data_create_grid_5_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_5_int4_a%ptr = ret_val
@@ -10131,7 +10131,7 @@ function LIBMUSCLE_Data_create_grid_6_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_6_int4_a%ptr = ret_val
@@ -10145,7 +10145,7 @@ function LIBMUSCLE_Data_create_grid_7_int4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_a_( &
             data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_7_int4_a%ptr = ret_val
@@ -10159,7 +10159,7 @@ function LIBMUSCLE_Data_create_grid_1_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_1_int8_a%ptr = ret_val
@@ -10173,7 +10173,7 @@ function LIBMUSCLE_Data_create_grid_2_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_2_int8_a%ptr = ret_val
@@ -10187,7 +10187,7 @@ function LIBMUSCLE_Data_create_grid_3_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_3_int8_a%ptr = ret_val
@@ -10201,7 +10201,7 @@ function LIBMUSCLE_Data_create_grid_4_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_4_int8_a%ptr = ret_val
@@ -10215,7 +10215,7 @@ function LIBMUSCLE_Data_create_grid_5_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_5_int8_a%ptr = ret_val
@@ -10229,7 +10229,7 @@ function LIBMUSCLE_Data_create_grid_6_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_6_int8_a%ptr = ret_val
@@ -10243,7 +10243,7 @@ function LIBMUSCLE_Data_create_grid_7_int8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_a_( &
             data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_7_int8_a%ptr = ret_val
@@ -10257,7 +10257,7 @@ function LIBMUSCLE_Data_create_grid_1_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_1_real4_a%ptr = ret_val
@@ -10271,7 +10271,7 @@ function LIBMUSCLE_Data_create_grid_2_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_2_real4_a%ptr = ret_val
@@ -10285,7 +10285,7 @@ function LIBMUSCLE_Data_create_grid_3_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_3_real4_a%ptr = ret_val
@@ -10299,7 +10299,7 @@ function LIBMUSCLE_Data_create_grid_4_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_4_real4_a%ptr = ret_val
@@ -10313,7 +10313,7 @@ function LIBMUSCLE_Data_create_grid_5_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_5_real4_a%ptr = ret_val
@@ -10327,7 +10327,7 @@ function LIBMUSCLE_Data_create_grid_6_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_6_real4_a%ptr = ret_val
@@ -10341,7 +10341,7 @@ function LIBMUSCLE_Data_create_grid_7_real4_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_a_( &
             data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_7_real4_a%ptr = ret_val
@@ -10355,7 +10355,7 @@ function LIBMUSCLE_Data_create_grid_1_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_1_real8_a%ptr = ret_val
@@ -10369,7 +10369,7 @@ function LIBMUSCLE_Data_create_grid_2_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_2_real8_a%ptr = ret_val
@@ -10383,7 +10383,7 @@ function LIBMUSCLE_Data_create_grid_3_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_3_real8_a%ptr = ret_val
@@ -10397,7 +10397,7 @@ function LIBMUSCLE_Data_create_grid_4_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_4_real8_a%ptr = ret_val
@@ -10411,7 +10411,7 @@ function LIBMUSCLE_Data_create_grid_5_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_5_real8_a%ptr = ret_val
@@ -10425,7 +10425,7 @@ function LIBMUSCLE_Data_create_grid_6_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_6_real8_a%ptr = ret_val
@@ -10439,7 +10439,7 @@ function LIBMUSCLE_Data_create_grid_7_real8_a( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_a_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_a_( &
             data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size)
 
         LIBMUSCLE_Data_create_grid_7_real8_a%ptr = ret_val
@@ -10456,7 +10456,7 @@ function LIBMUSCLE_Data_create_grid_1_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -10485,7 +10485,7 @@ function LIBMUSCLE_Data_create_grid_2_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -10516,7 +10516,7 @@ function LIBMUSCLE_Data_create_grid_3_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -10549,7 +10549,7 @@ function LIBMUSCLE_Data_create_grid_4_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -10584,7 +10584,7 @@ function LIBMUSCLE_Data_create_grid_5_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -10621,7 +10621,7 @@ function LIBMUSCLE_Data_create_grid_6_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -10660,7 +10660,7 @@ function LIBMUSCLE_Data_create_grid_7_logical_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_logical_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_logical_n_( &
                 logical(data_array, c_bool), &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -10687,7 +10687,7 @@ function LIBMUSCLE_Data_create_grid_1_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -10716,7 +10716,7 @@ function LIBMUSCLE_Data_create_grid_2_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -10747,7 +10747,7 @@ function LIBMUSCLE_Data_create_grid_3_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -10780,7 +10780,7 @@ function LIBMUSCLE_Data_create_grid_4_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -10815,7 +10815,7 @@ function LIBMUSCLE_Data_create_grid_5_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -10852,7 +10852,7 @@ function LIBMUSCLE_Data_create_grid_6_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -10891,7 +10891,7 @@ function LIBMUSCLE_Data_create_grid_7_int4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -10918,7 +10918,7 @@ function LIBMUSCLE_Data_create_grid_1_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -10947,7 +10947,7 @@ function LIBMUSCLE_Data_create_grid_2_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -10978,7 +10978,7 @@ function LIBMUSCLE_Data_create_grid_3_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -11011,7 +11011,7 @@ function LIBMUSCLE_Data_create_grid_4_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -11046,7 +11046,7 @@ function LIBMUSCLE_Data_create_grid_5_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -11083,7 +11083,7 @@ function LIBMUSCLE_Data_create_grid_6_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -11122,7 +11122,7 @@ function LIBMUSCLE_Data_create_grid_7_int8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_int8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_int8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -11149,7 +11149,7 @@ function LIBMUSCLE_Data_create_grid_1_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -11178,7 +11178,7 @@ function LIBMUSCLE_Data_create_grid_2_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -11209,7 +11209,7 @@ function LIBMUSCLE_Data_create_grid_3_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -11242,7 +11242,7 @@ function LIBMUSCLE_Data_create_grid_4_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -11277,7 +11277,7 @@ function LIBMUSCLE_Data_create_grid_5_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -11314,7 +11314,7 @@ function LIBMUSCLE_Data_create_grid_6_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -11353,7 +11353,7 @@ function LIBMUSCLE_Data_create_grid_7_real4_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real4_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real4_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -11380,7 +11380,7 @@ function LIBMUSCLE_Data_create_grid_1_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 1_LIBMUSCLE_size, &
@@ -11409,7 +11409,7 @@ function LIBMUSCLE_Data_create_grid_2_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 2_LIBMUSCLE_size, &
@@ -11440,7 +11440,7 @@ function LIBMUSCLE_Data_create_grid_3_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 3_LIBMUSCLE_size, &
@@ -11473,7 +11473,7 @@ function LIBMUSCLE_Data_create_grid_4_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 4_LIBMUSCLE_size, &
@@ -11508,7 +11508,7 @@ function LIBMUSCLE_Data_create_grid_5_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 5_LIBMUSCLE_size, &
@@ -11545,7 +11545,7 @@ function LIBMUSCLE_Data_create_grid_6_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 6_LIBMUSCLE_size, &
@@ -11584,7 +11584,7 @@ function LIBMUSCLE_Data_create_grid_7_real8_n( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_grid_real8_n_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_grid_real8_n_( &
                 data_array, &
                 int(shape(data_array), c_size_t), &
                 7_LIBMUSCLE_size, &
@@ -11604,7 +11604,7 @@ subroutine LIBMUSCLE_Data_free(self)
         implicit none
         type(LIBMUSCLE_Data), intent(inout) :: self
 
-        call LIBMUSCLE_Data_free_(self%ptr)
+        call LIBMUSCLE_MPI_Data_free_(self%ptr)
         self%ptr = 0
     end subroutine LIBMUSCLE_Data_free
 
@@ -11616,7 +11616,7 @@ function LIBMUSCLE_Data_is_a_logical( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_logical_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_logical_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_logical = ret_val
@@ -11630,7 +11630,7 @@ function LIBMUSCLE_Data_is_a_character( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_character_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_character_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_character = ret_val
@@ -11644,7 +11644,7 @@ function LIBMUSCLE_Data_is_a_int( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_int_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_int_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_int = ret_val
@@ -11658,7 +11658,7 @@ function LIBMUSCLE_Data_is_a_int1( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_int1_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_int1_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_int1 = ret_val
@@ -11672,7 +11672,7 @@ function LIBMUSCLE_Data_is_a_int2( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_int2_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_int2_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_int2 = ret_val
@@ -11686,7 +11686,7 @@ function LIBMUSCLE_Data_is_a_int4( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_int4_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_int4_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_int4 = ret_val
@@ -11700,7 +11700,7 @@ function LIBMUSCLE_Data_is_a_int8( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_int8_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_int8_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_int8 = ret_val
@@ -11714,7 +11714,7 @@ function LIBMUSCLE_Data_is_a_real4( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_real4_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_real4_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_real4 = ret_val
@@ -11728,7 +11728,7 @@ function LIBMUSCLE_Data_is_a_real8( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_real8_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_real8_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_real8 = ret_val
@@ -11742,7 +11742,7 @@ function LIBMUSCLE_Data_is_a_dict( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_dict_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_dict_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_dict = ret_val
@@ -11756,7 +11756,7 @@ function LIBMUSCLE_Data_is_a_list( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_list_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_list_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_list = ret_val
@@ -11770,7 +11770,7 @@ function LIBMUSCLE_Data_is_a_grid_of_logical( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_grid_of_logical_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_grid_of_logical_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_grid_of_logical = ret_val
@@ -11784,7 +11784,7 @@ function LIBMUSCLE_Data_is_a_grid_of_real4( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_grid_of_real4_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_grid_of_real4_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_grid_of_real4 = ret_val
@@ -11798,7 +11798,7 @@ function LIBMUSCLE_Data_is_a_grid_of_real8( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_grid_of_real8_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_grid_of_real8_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_grid_of_real8 = ret_val
@@ -11812,7 +11812,7 @@ function LIBMUSCLE_Data_is_a_grid_of_int4( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_grid_of_int4_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_grid_of_int4_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_grid_of_int4 = ret_val
@@ -11826,7 +11826,7 @@ function LIBMUSCLE_Data_is_a_grid_of_int8( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_grid_of_int8_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_grid_of_int8_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_grid_of_int8 = ret_val
@@ -11840,7 +11840,7 @@ function LIBMUSCLE_Data_is_a_byte_array( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_byte_array_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_byte_array_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_byte_array = ret_val
@@ -11854,7 +11854,7 @@ function LIBMUSCLE_Data_is_nil( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_nil_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_nil_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_nil = ret_val
@@ -11868,7 +11868,7 @@ function LIBMUSCLE_Data_is_a_settings( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_is_a_settings_( &
+        ret_val = LIBMUSCLE_MPI_Data_is_a_settings_( &
             self%ptr)
 
         LIBMUSCLE_Data_is_a_settings = ret_val
@@ -11882,7 +11882,7 @@ function LIBMUSCLE_Data_size( &
 
         integer (c_size_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_size_( &
+        ret_val = LIBMUSCLE_MPI_Data_size_( &
             self%ptr)
         LIBMUSCLE_Data_size = ret_val
     end function LIBMUSCLE_Data_size
@@ -11905,7 +11905,7 @@ function LIBMUSCLE_Data_as_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_logical_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_logical_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -11962,7 +11962,7 @@ function LIBMUSCLE_Data_as_character( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_as_character_( &
+        call LIBMUSCLE_MPI_Data_as_character_( &
             self%ptr, &
             ret_val, &
             ret_val_size, &
@@ -12023,7 +12023,7 @@ function LIBMUSCLE_Data_as_int( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_int_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_int_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12076,7 +12076,7 @@ function LIBMUSCLE_Data_as_int1( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_int1_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_int1_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12129,7 +12129,7 @@ function LIBMUSCLE_Data_as_int2( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_int2_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_int2_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12182,7 +12182,7 @@ function LIBMUSCLE_Data_as_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_int4_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_int4_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12235,7 +12235,7 @@ function LIBMUSCLE_Data_as_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_int8_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_int8_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12288,7 +12288,7 @@ function LIBMUSCLE_Data_as_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_real4_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_real4_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12341,7 +12341,7 @@ function LIBMUSCLE_Data_as_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_real8_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_real8_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12394,7 +12394,7 @@ function LIBMUSCLE_Data_as_settings( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_as_settings_( &
+        ret_val = LIBMUSCLE_MPI_Data_as_settings_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12451,7 +12451,7 @@ subroutine LIBMUSCLE_Data_as_byte_array( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_as_byte_array_( &
+        call LIBMUSCLE_MPI_Data_as_byte_array_( &
             self%ptr, &
             ret_val, &
             ret_val_size, &
@@ -12510,7 +12510,7 @@ function LIBMUSCLE_Data_get_item_by_key( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_get_item_by_key_( &
+        ret_val = LIBMUSCLE_MPI_Data_get_item_by_key_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             err_code_v, &
@@ -12567,7 +12567,7 @@ function LIBMUSCLE_Data_get_item_by_index( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_get_item_by_index_( &
+        ret_val = LIBMUSCLE_MPI_Data_get_item_by_index_( &
             self%ptr, &
             i, &
             err_code_v, &
@@ -12622,7 +12622,7 @@ function LIBMUSCLE_Data_num_dims( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_num_dims_( &
+        ret_val = LIBMUSCLE_MPI_Data_num_dims_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -12678,7 +12678,7 @@ subroutine LIBMUSCLE_Data_shape( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_shape_( &
+        call LIBMUSCLE_MPI_Data_shape_( &
             self%ptr, &
             ret_val, &
             ret_val_size, &
@@ -12741,7 +12741,7 @@ subroutine LIBMUSCLE_Data_elements_1_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_logical_( &
+        call LIBMUSCLE_MPI_Data_elements_logical_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -12810,7 +12810,7 @@ subroutine LIBMUSCLE_Data_elements_2_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_logical_( &
+        call LIBMUSCLE_MPI_Data_elements_logical_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -12879,7 +12879,7 @@ subroutine LIBMUSCLE_Data_elements_3_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_logical_( &
+        call LIBMUSCLE_MPI_Data_elements_logical_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -12948,7 +12948,7 @@ subroutine LIBMUSCLE_Data_elements_4_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_logical_( &
+        call LIBMUSCLE_MPI_Data_elements_logical_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -13017,7 +13017,7 @@ subroutine LIBMUSCLE_Data_elements_5_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_logical_( &
+        call LIBMUSCLE_MPI_Data_elements_logical_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -13086,7 +13086,7 @@ subroutine LIBMUSCLE_Data_elements_6_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_logical_( &
+        call LIBMUSCLE_MPI_Data_elements_logical_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -13155,7 +13155,7 @@ subroutine LIBMUSCLE_Data_elements_7_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_logical_( &
+        call LIBMUSCLE_MPI_Data_elements_logical_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -13224,7 +13224,7 @@ subroutine LIBMUSCLE_Data_elements_1_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int4_( &
+        call LIBMUSCLE_MPI_Data_elements_int4_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -13293,7 +13293,7 @@ subroutine LIBMUSCLE_Data_elements_2_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int4_( &
+        call LIBMUSCLE_MPI_Data_elements_int4_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -13362,7 +13362,7 @@ subroutine LIBMUSCLE_Data_elements_3_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int4_( &
+        call LIBMUSCLE_MPI_Data_elements_int4_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -13431,7 +13431,7 @@ subroutine LIBMUSCLE_Data_elements_4_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int4_( &
+        call LIBMUSCLE_MPI_Data_elements_int4_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -13500,7 +13500,7 @@ subroutine LIBMUSCLE_Data_elements_5_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int4_( &
+        call LIBMUSCLE_MPI_Data_elements_int4_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -13569,7 +13569,7 @@ subroutine LIBMUSCLE_Data_elements_6_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int4_( &
+        call LIBMUSCLE_MPI_Data_elements_int4_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -13638,7 +13638,7 @@ subroutine LIBMUSCLE_Data_elements_7_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int4_( &
+        call LIBMUSCLE_MPI_Data_elements_int4_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -13707,7 +13707,7 @@ subroutine LIBMUSCLE_Data_elements_1_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int8_( &
+        call LIBMUSCLE_MPI_Data_elements_int8_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -13776,7 +13776,7 @@ subroutine LIBMUSCLE_Data_elements_2_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int8_( &
+        call LIBMUSCLE_MPI_Data_elements_int8_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -13845,7 +13845,7 @@ subroutine LIBMUSCLE_Data_elements_3_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int8_( &
+        call LIBMUSCLE_MPI_Data_elements_int8_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -13914,7 +13914,7 @@ subroutine LIBMUSCLE_Data_elements_4_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int8_( &
+        call LIBMUSCLE_MPI_Data_elements_int8_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -13983,7 +13983,7 @@ subroutine LIBMUSCLE_Data_elements_5_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int8_( &
+        call LIBMUSCLE_MPI_Data_elements_int8_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -14052,7 +14052,7 @@ subroutine LIBMUSCLE_Data_elements_6_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int8_( &
+        call LIBMUSCLE_MPI_Data_elements_int8_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -14121,7 +14121,7 @@ subroutine LIBMUSCLE_Data_elements_7_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_int8_( &
+        call LIBMUSCLE_MPI_Data_elements_int8_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -14190,7 +14190,7 @@ subroutine LIBMUSCLE_Data_elements_1_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real4_( &
+        call LIBMUSCLE_MPI_Data_elements_real4_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -14259,7 +14259,7 @@ subroutine LIBMUSCLE_Data_elements_2_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real4_( &
+        call LIBMUSCLE_MPI_Data_elements_real4_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -14328,7 +14328,7 @@ subroutine LIBMUSCLE_Data_elements_3_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real4_( &
+        call LIBMUSCLE_MPI_Data_elements_real4_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -14397,7 +14397,7 @@ subroutine LIBMUSCLE_Data_elements_4_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real4_( &
+        call LIBMUSCLE_MPI_Data_elements_real4_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -14466,7 +14466,7 @@ subroutine LIBMUSCLE_Data_elements_5_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real4_( &
+        call LIBMUSCLE_MPI_Data_elements_real4_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -14535,7 +14535,7 @@ subroutine LIBMUSCLE_Data_elements_6_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real4_( &
+        call LIBMUSCLE_MPI_Data_elements_real4_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -14604,7 +14604,7 @@ subroutine LIBMUSCLE_Data_elements_7_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real4_( &
+        call LIBMUSCLE_MPI_Data_elements_real4_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -14673,7 +14673,7 @@ subroutine LIBMUSCLE_Data_elements_1_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real8_( &
+        call LIBMUSCLE_MPI_Data_elements_real8_( &
             self%ptr, &
             1_LIBMUSCLE_size, &
             ret_val, &
@@ -14742,7 +14742,7 @@ subroutine LIBMUSCLE_Data_elements_2_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real8_( &
+        call LIBMUSCLE_MPI_Data_elements_real8_( &
             self%ptr, &
             2_LIBMUSCLE_size, &
             ret_val, &
@@ -14811,7 +14811,7 @@ subroutine LIBMUSCLE_Data_elements_3_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real8_( &
+        call LIBMUSCLE_MPI_Data_elements_real8_( &
             self%ptr, &
             3_LIBMUSCLE_size, &
             ret_val, &
@@ -14880,7 +14880,7 @@ subroutine LIBMUSCLE_Data_elements_4_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real8_( &
+        call LIBMUSCLE_MPI_Data_elements_real8_( &
             self%ptr, &
             4_LIBMUSCLE_size, &
             ret_val, &
@@ -14949,7 +14949,7 @@ subroutine LIBMUSCLE_Data_elements_5_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real8_( &
+        call LIBMUSCLE_MPI_Data_elements_real8_( &
             self%ptr, &
             5_LIBMUSCLE_size, &
             ret_val, &
@@ -15018,7 +15018,7 @@ subroutine LIBMUSCLE_Data_elements_6_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real8_( &
+        call LIBMUSCLE_MPI_Data_elements_real8_( &
             self%ptr, &
             6_LIBMUSCLE_size, &
             ret_val, &
@@ -15087,7 +15087,7 @@ subroutine LIBMUSCLE_Data_elements_7_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_elements_real8_( &
+        call LIBMUSCLE_MPI_Data_elements_real8_( &
             self%ptr, &
             7_LIBMUSCLE_size, &
             ret_val, &
@@ -15150,7 +15150,7 @@ function LIBMUSCLE_Data_has_indexes( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_has_indexes_( &
+        ret_val = LIBMUSCLE_MPI_Data_has_indexes_( &
             self%ptr, &
             err_code_v, &
             err_msg_v, &
@@ -15209,7 +15209,7 @@ function LIBMUSCLE_Data_index( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_index_( &
+        call LIBMUSCLE_MPI_Data_index_( &
             self%ptr, &
             i, &
             ret_val, &
@@ -15260,7 +15260,7 @@ function LIBMUSCLE_Data_create_dict( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_dict_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_dict_( &
     )
 
         LIBMUSCLE_Data_create_dict%ptr = ret_val
@@ -15273,7 +15273,7 @@ function LIBMUSCLE_Data_create_list( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_list_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_list_( &
     )
 
         LIBMUSCLE_Data_create_list%ptr = ret_val
@@ -15287,7 +15287,7 @@ function LIBMUSCLE_Data_create_nils( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_nils_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_nils_( &
             size)
 
         LIBMUSCLE_Data_create_nils%ptr = ret_val
@@ -15301,7 +15301,7 @@ function LIBMUSCLE_Data_create_byte_array_empty( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_byte_array_empty_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_byte_array_empty_( &
             size)
 
         LIBMUSCLE_Data_create_byte_array_empty%ptr = ret_val
@@ -15315,7 +15315,7 @@ function LIBMUSCLE_Data_create_byte_array_from_buf( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Data_create_byte_array_from_buf_( &
+        ret_val = LIBMUSCLE_MPI_Data_create_byte_array_from_buf_( &
             buf, int(size(buf), c_size_t))
 
         LIBMUSCLE_Data_create_byte_array_from_buf%ptr = ret_val
@@ -15328,7 +15328,7 @@ subroutine LIBMUSCLE_Data_set_logical( &
         class(LIBMUSCLE_Data), intent(in) :: self
         logical, intent(in) :: value
 
-        call LIBMUSCLE_Data_set_logical_( &
+        call LIBMUSCLE_MPI_Data_set_logical_( &
             self%ptr, &
             logical(value, c_bool))
     end subroutine LIBMUSCLE_Data_set_logical
@@ -15340,7 +15340,7 @@ subroutine LIBMUSCLE_Data_set_character( &
         class(LIBMUSCLE_Data), intent(in) :: self
         character (len=*), intent(in) :: value
 
-        call LIBMUSCLE_Data_set_character_( &
+        call LIBMUSCLE_MPI_Data_set_character_( &
             self%ptr, &
             value, int(len(value), c_size_t))
     end subroutine LIBMUSCLE_Data_set_character
@@ -15352,7 +15352,7 @@ subroutine LIBMUSCLE_Data_set_int1( &
         class(LIBMUSCLE_Data), intent(in) :: self
         integer (LIBMUSCLE_int1), intent(in) :: value
 
-        call LIBMUSCLE_Data_set_int1_( &
+        call LIBMUSCLE_MPI_Data_set_int1_( &
             self%ptr, &
             value)
     end subroutine LIBMUSCLE_Data_set_int1
@@ -15364,7 +15364,7 @@ subroutine LIBMUSCLE_Data_set_int2( &
         class(LIBMUSCLE_Data), intent(in) :: self
         integer (selected_int_kind(4)), intent(in) :: value
 
-        call LIBMUSCLE_Data_set_int2_( &
+        call LIBMUSCLE_MPI_Data_set_int2_( &
             self%ptr, &
             value)
     end subroutine LIBMUSCLE_Data_set_int2
@@ -15376,7 +15376,7 @@ subroutine LIBMUSCLE_Data_set_int4( &
         class(LIBMUSCLE_Data), intent(in) :: self
         integer (LIBMUSCLE_int4), intent(in) :: value
 
-        call LIBMUSCLE_Data_set_int4_( &
+        call LIBMUSCLE_MPI_Data_set_int4_( &
             self%ptr, &
             value)
     end subroutine LIBMUSCLE_Data_set_int4
@@ -15388,7 +15388,7 @@ subroutine LIBMUSCLE_Data_set_int8( &
         class(LIBMUSCLE_Data), intent(in) :: self
         integer (selected_int_kind(18)), intent(in) :: value
 
-        call LIBMUSCLE_Data_set_int8_( &
+        call LIBMUSCLE_MPI_Data_set_int8_( &
             self%ptr, &
             value)
     end subroutine LIBMUSCLE_Data_set_int8
@@ -15400,7 +15400,7 @@ subroutine LIBMUSCLE_Data_set_real4( &
         class(LIBMUSCLE_Data), intent(in) :: self
         real (LIBMUSCLE_real4), intent(in) :: value
 
-        call LIBMUSCLE_Data_set_real4_( &
+        call LIBMUSCLE_MPI_Data_set_real4_( &
             self%ptr, &
             value)
     end subroutine LIBMUSCLE_Data_set_real4
@@ -15412,7 +15412,7 @@ subroutine LIBMUSCLE_Data_set_real8( &
         class(LIBMUSCLE_Data), intent(in) :: self
         real (LIBMUSCLE_real8), intent(in) :: value
 
-        call LIBMUSCLE_Data_set_real8_( &
+        call LIBMUSCLE_MPI_Data_set_real8_( &
             self%ptr, &
             value)
     end subroutine LIBMUSCLE_Data_set_real8
@@ -15424,7 +15424,7 @@ subroutine LIBMUSCLE_Data_set_data( &
         class(LIBMUSCLE_Data), intent(in) :: self
         class(LIBMUSCLE_Data), intent(in) :: value
 
-        call LIBMUSCLE_Data_set_data_( &
+        call LIBMUSCLE_MPI_Data_set_data_( &
             self%ptr, &
             value%ptr)
     end subroutine LIBMUSCLE_Data_set_data
@@ -15434,7 +15434,7 @@ subroutine LIBMUSCLE_Data_set_nil( &
         implicit none
         class(LIBMUSCLE_Data), intent(in) :: self
 
-        call LIBMUSCLE_Data_set_nil_( &
+        call LIBMUSCLE_MPI_Data_set_nil_( &
             self%ptr)
     end subroutine LIBMUSCLE_Data_set_nil
 
@@ -15458,7 +15458,7 @@ subroutine LIBMUSCLE_Data_set_item_key_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_logical_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_logical_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             logical(value, c_bool), &
@@ -15514,7 +15514,7 @@ subroutine LIBMUSCLE_Data_set_item_key_character( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_character_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_character_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             value, int(len(value), c_size_t), &
@@ -15570,7 +15570,7 @@ subroutine LIBMUSCLE_Data_set_item_key_int1( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_int1_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_int1_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             value, &
@@ -15626,7 +15626,7 @@ subroutine LIBMUSCLE_Data_set_item_key_int2( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_int2_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_int2_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             value, &
@@ -15682,7 +15682,7 @@ subroutine LIBMUSCLE_Data_set_item_key_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_int4_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_int4_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             value, &
@@ -15738,7 +15738,7 @@ subroutine LIBMUSCLE_Data_set_item_key_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_int8_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_int8_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             value, &
@@ -15794,7 +15794,7 @@ subroutine LIBMUSCLE_Data_set_item_key_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_real4_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_real4_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             value, &
@@ -15850,7 +15850,7 @@ subroutine LIBMUSCLE_Data_set_item_key_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_real8_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_real8_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             value, &
@@ -15906,7 +15906,7 @@ subroutine LIBMUSCLE_Data_set_item_key_data( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_key_data_( &
+        call LIBMUSCLE_MPI_Data_set_item_key_data_( &
             self%ptr, &
             key, int(len(key), c_size_t), &
             value%ptr, &
@@ -15962,7 +15962,7 @@ subroutine LIBMUSCLE_Data_set_item_index_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_logical_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_logical_( &
             self%ptr, &
             i, &
             logical(value, c_bool), &
@@ -16018,7 +16018,7 @@ subroutine LIBMUSCLE_Data_set_item_index_character( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_character_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_character_( &
             self%ptr, &
             i, &
             value, int(len(value), c_size_t), &
@@ -16074,7 +16074,7 @@ subroutine LIBMUSCLE_Data_set_item_index_int1( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_int1_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_int1_( &
             self%ptr, &
             i, &
             value, &
@@ -16130,7 +16130,7 @@ subroutine LIBMUSCLE_Data_set_item_index_int2( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_int2_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_int2_( &
             self%ptr, &
             i, &
             value, &
@@ -16186,7 +16186,7 @@ subroutine LIBMUSCLE_Data_set_item_index_int4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_int4_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_int4_( &
             self%ptr, &
             i, &
             value, &
@@ -16242,7 +16242,7 @@ subroutine LIBMUSCLE_Data_set_item_index_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_int8_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_int8_( &
             self%ptr, &
             i, &
             value, &
@@ -16298,7 +16298,7 @@ subroutine LIBMUSCLE_Data_set_item_index_real4( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_real4_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_real4_( &
             self%ptr, &
             i, &
             value, &
@@ -16354,7 +16354,7 @@ subroutine LIBMUSCLE_Data_set_item_index_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_real8_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_real8_( &
             self%ptr, &
             i, &
             value, &
@@ -16410,7 +16410,7 @@ subroutine LIBMUSCLE_Data_set_item_index_data( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_set_item_index_data_( &
+        call LIBMUSCLE_MPI_Data_set_item_index_data_( &
             self%ptr, &
             i, &
             value%ptr, &
@@ -16469,7 +16469,7 @@ function LIBMUSCLE_Data_key( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Data_key_( &
+        call LIBMUSCLE_MPI_Data_key_( &
             self%ptr, &
             i, &
             ret_val, &
@@ -16533,7 +16533,7 @@ function LIBMUSCLE_Data_value( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Data_value_( &
+        ret_val = LIBMUSCLE_MPI_Data_value_( &
             self%ptr, &
             i, &
             err_code_v, &
@@ -16577,7 +16577,7 @@ function LIBMUSCLE_PortsDescription_create( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_PortsDescription_create_( &
+        ret_val = LIBMUSCLE_MPI_PortsDescription_create_( &
     )
 
         LIBMUSCLE_PortsDescription_create%ptr = ret_val
@@ -16587,7 +16587,7 @@ subroutine LIBMUSCLE_PortsDescription_free(self)
         implicit none
         type(LIBMUSCLE_PortsDescription), intent(inout) :: self
 
-        call LIBMUSCLE_PortsDescription_free_(self%ptr)
+        call LIBMUSCLE_MPI_PortsDescription_free_(self%ptr)
         self%ptr = 0
     end subroutine LIBMUSCLE_PortsDescription_free
 
@@ -16600,7 +16600,7 @@ subroutine LIBMUSCLE_PortsDescription_add( &
         integer(YMMSL_Operator), intent(in) :: op
         character (len=*), intent(in) :: port
 
-        call LIBMUSCLE_PortsDescription_add_( &
+        call LIBMUSCLE_MPI_PortsDescription_add_( &
             self%ptr, &
             op, &
             port, int(len(port), c_size_t))
@@ -16616,7 +16616,7 @@ function LIBMUSCLE_PortsDescription_num_ports( &
 
         integer (c_size_t) :: ret_val
 
-        ret_val = LIBMUSCLE_PortsDescription_num_ports_( &
+        ret_val = LIBMUSCLE_MPI_PortsDescription_num_ports_( &
             self%ptr, &
             op)
         LIBMUSCLE_PortsDescription_num_ports = ret_val
@@ -16647,7 +16647,7 @@ function LIBMUSCLE_PortsDescription_get( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_PortsDescription_get_( &
+        call LIBMUSCLE_MPI_PortsDescription_get_( &
             self%ptr, &
             op, &
             i, &
@@ -16700,7 +16700,7 @@ function LIBMUSCLE_Message_create_t( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_create_t_( &
+        ret_val = LIBMUSCLE_MPI_Message_create_t_( &
             timestamp)
 
         LIBMUSCLE_Message_create_t%ptr = ret_val
@@ -16716,7 +16716,7 @@ function LIBMUSCLE_Message_create_td( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_create_td_( &
+        ret_val = LIBMUSCLE_MPI_Message_create_td_( &
             timestamp, &
             data%ptr)
 
@@ -16735,7 +16735,7 @@ function LIBMUSCLE_Message_create_tnd( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_create_tnd_( &
+        ret_val = LIBMUSCLE_MPI_Message_create_tnd_( &
             timestamp, &
             next_timestamp, &
             data%ptr)
@@ -16755,7 +16755,7 @@ function LIBMUSCLE_Message_create_tds( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_create_tds_( &
+        ret_val = LIBMUSCLE_MPI_Message_create_tds_( &
             timestamp, &
             data%ptr, &
             settings%ptr)
@@ -16777,7 +16777,7 @@ function LIBMUSCLE_Message_create_tnds( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_create_tnds_( &
+        ret_val = LIBMUSCLE_MPI_Message_create_tnds_( &
             timestamp, &
             next_timestamp, &
             data%ptr, &
@@ -16790,7 +16790,7 @@ subroutine LIBMUSCLE_Message_free(self)
         implicit none
         type(LIBMUSCLE_Message), intent(inout) :: self
 
-        call LIBMUSCLE_Message_free_(self%ptr)
+        call LIBMUSCLE_MPI_Message_free_(self%ptr)
         self%ptr = 0
     end subroutine LIBMUSCLE_Message_free
 
@@ -16802,7 +16802,7 @@ function LIBMUSCLE_Message_timestamp( &
 
         real (c_double) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_timestamp_( &
+        ret_val = LIBMUSCLE_MPI_Message_timestamp_( &
             self%ptr)
         LIBMUSCLE_Message_timestamp = ret_val
     end function LIBMUSCLE_Message_timestamp
@@ -16814,7 +16814,7 @@ subroutine LIBMUSCLE_Message_set_timestamp( &
         class(LIBMUSCLE_Message), intent(in) :: self
         real (LIBMUSCLE_real8), intent(in) :: timestamp
 
-        call LIBMUSCLE_Message_set_timestamp_( &
+        call LIBMUSCLE_MPI_Message_set_timestamp_( &
             self%ptr, &
             timestamp)
     end subroutine LIBMUSCLE_Message_set_timestamp
@@ -16827,7 +16827,7 @@ function LIBMUSCLE_Message_has_next_timestamp( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_has_next_timestamp_( &
+        ret_val = LIBMUSCLE_MPI_Message_has_next_timestamp_( &
             self%ptr)
 
         LIBMUSCLE_Message_has_next_timestamp = ret_val
@@ -16841,7 +16841,7 @@ function LIBMUSCLE_Message_next_timestamp( &
 
         real (c_double) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_next_timestamp_( &
+        ret_val = LIBMUSCLE_MPI_Message_next_timestamp_( &
             self%ptr)
         LIBMUSCLE_Message_next_timestamp = ret_val
     end function LIBMUSCLE_Message_next_timestamp
@@ -16853,7 +16853,7 @@ subroutine LIBMUSCLE_Message_set_next_timestamp( &
         class(LIBMUSCLE_Message), intent(in) :: self
         real (LIBMUSCLE_real8), intent(in) :: next_timestamp
 
-        call LIBMUSCLE_Message_set_next_timestamp_( &
+        call LIBMUSCLE_MPI_Message_set_next_timestamp_( &
             self%ptr, &
             next_timestamp)
     end subroutine LIBMUSCLE_Message_set_next_timestamp
@@ -16863,7 +16863,7 @@ subroutine LIBMUSCLE_Message_unset_next_timestamp( &
         implicit none
         class(LIBMUSCLE_Message), intent(in) :: self
 
-        call LIBMUSCLE_Message_unset_next_timestamp_( &
+        call LIBMUSCLE_MPI_Message_unset_next_timestamp_( &
             self%ptr)
     end subroutine LIBMUSCLE_Message_unset_next_timestamp
 
@@ -16875,7 +16875,7 @@ function LIBMUSCLE_Message_get_data( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_get_data_( &
+        ret_val = LIBMUSCLE_MPI_Message_get_data_( &
             self%ptr)
 
         LIBMUSCLE_Message_get_data%ptr = ret_val
@@ -16888,7 +16888,7 @@ subroutine LIBMUSCLE_Message_set_data_d( &
         class(LIBMUSCLE_Message), intent(in) :: self
         class(LIBMUSCLE_Data), intent(in) :: data
 
-        call LIBMUSCLE_Message_set_data_d_( &
+        call LIBMUSCLE_MPI_Message_set_data_d_( &
             self%ptr, &
             data%ptr)
     end subroutine LIBMUSCLE_Message_set_data_d
@@ -16900,7 +16900,7 @@ subroutine LIBMUSCLE_Message_set_data_dcr( &
         class(LIBMUSCLE_Message), intent(in) :: self
         class(LIBMUSCLE_DataConstRef), intent(in) :: data
 
-        call LIBMUSCLE_Message_set_data_dcr_( &
+        call LIBMUSCLE_MPI_Message_set_data_dcr_( &
             self%ptr, &
             data%ptr)
     end subroutine LIBMUSCLE_Message_set_data_dcr
@@ -16913,7 +16913,7 @@ function LIBMUSCLE_Message_has_settings( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_has_settings_( &
+        ret_val = LIBMUSCLE_MPI_Message_has_settings_( &
             self%ptr)
 
         LIBMUSCLE_Message_has_settings = ret_val
@@ -16927,7 +16927,7 @@ function LIBMUSCLE_Message_get_settings( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Message_get_settings_( &
+        ret_val = LIBMUSCLE_MPI_Message_get_settings_( &
             self%ptr)
 
         LIBMUSCLE_Message_get_settings%ptr = ret_val
@@ -16940,7 +16940,7 @@ subroutine LIBMUSCLE_Message_set_settings( &
         class(LIBMUSCLE_Message), intent(in) :: self
         class(YMMSL_Settings), intent(in) :: settings
 
-        call LIBMUSCLE_Message_set_settings_( &
+        call LIBMUSCLE_MPI_Message_set_settings_( &
             self%ptr, &
             settings%ptr)
     end subroutine LIBMUSCLE_Message_set_settings
@@ -16950,7 +16950,7 @@ subroutine LIBMUSCLE_Message_unset_settings( &
         implicit none
         class(LIBMUSCLE_Message), intent(in) :: self
 
-        call LIBMUSCLE_Message_unset_settings_( &
+        call LIBMUSCLE_MPI_Message_unset_settings_( &
             self%ptr)
     end subroutine LIBMUSCLE_Message_unset_settings
 
@@ -16967,13 +16967,13 @@ type(LIBMUSCLE_Instance) function LIBMUSCLE_Instance_create( &
         character (kind=c_char, len=:), allocatable :: cur_arg
 
         num_args = command_argument_count()
-        cla = LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_(num_args + 1)
+        cla = LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_create_(num_args + 1)
         do i = 0, num_args
             call get_command_argument(i, length=arg_len)
             allocate (character(arg_len+1) :: cur_arg)
             call get_command_argument(i, value=cur_arg)
             cur_arg(arg_len+1:arg_len+1) = c_null_char
-            call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_( &
+            call LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_set_arg_( &
                    cla, i, cur_arg, int(len(cur_arg), c_size_t))
             deallocate(cur_arg)
         end do
@@ -16986,15 +16986,15 @@ type(LIBMUSCLE_Instance) function LIBMUSCLE_Instance_create( &
         aroot = 0
         if (present(root)) aroot = root
         LIBMUSCLE_Instance_create%ptr = &
-            LIBMUSCLE_Instance_create_(cla, ports_ptr, iflags, acommunicator, aroot)
-        call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(cla)
+            LIBMUSCLE_MPI_Instance_create_(cla, ports_ptr, iflags, acommunicator, aroot)
+        call LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_free_(cla)
     end function LIBMUSCLE_Instance_create
 
     subroutine LIBMUSCLE_Instance_free(self)
         implicit none
         type(LIBMUSCLE_Instance), intent(inout) :: self
 
-        call LIBMUSCLE_Instance_free_(self%ptr)
+        call LIBMUSCLE_MPI_Instance_free_(self%ptr)
         self%ptr = 0
     end subroutine LIBMUSCLE_Instance_free
 
@@ -17006,7 +17006,7 @@ function LIBMUSCLE_Instance_reuse_instance( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_reuse_instance_( &
+        ret_val = LIBMUSCLE_MPI_Instance_reuse_instance_( &
             self%ptr)
 
         LIBMUSCLE_Instance_reuse_instance = ret_val
@@ -17019,7 +17019,7 @@ subroutine LIBMUSCLE_Instance_error_shutdown( &
         class(LIBMUSCLE_Instance), intent(in) :: self
         character (len=*), intent(in) :: message
 
-        call LIBMUSCLE_Instance_error_shutdown_( &
+        call LIBMUSCLE_MPI_Instance_error_shutdown_( &
             self%ptr, &
             message, int(len(message), c_size_t))
     end subroutine LIBMUSCLE_Instance_error_shutdown
@@ -17044,7 +17044,7 @@ function LIBMUSCLE_Instance_is_setting_a_character( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_is_setting_a_character_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_setting_a_character_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17101,7 +17101,7 @@ function LIBMUSCLE_Instance_is_setting_a_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_is_setting_a_int8_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_setting_a_int8_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17158,7 +17158,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_is_setting_a_real8_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_setting_a_real8_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17215,7 +17215,7 @@ function LIBMUSCLE_Instance_is_setting_a_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_is_setting_a_logical_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_setting_a_logical_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17272,7 +17272,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8array( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_is_setting_a_real8array_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_setting_a_real8array_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17329,7 +17329,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8array2( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_is_setting_a_real8array2_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_setting_a_real8array2_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17389,7 +17389,7 @@ function LIBMUSCLE_Instance_get_setting_as_character( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Instance_get_setting_as_character_( &
+        call LIBMUSCLE_MPI_Instance_get_setting_as_character_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             ret_val, &
@@ -17453,7 +17453,7 @@ function LIBMUSCLE_Instance_get_setting_as_int8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_get_setting_as_int8_( &
+        ret_val = LIBMUSCLE_MPI_Instance_get_setting_as_int8_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17509,7 +17509,7 @@ function LIBMUSCLE_Instance_get_setting_as_real8( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_get_setting_as_real8_( &
+        ret_val = LIBMUSCLE_MPI_Instance_get_setting_as_real8_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17565,7 +17565,7 @@ function LIBMUSCLE_Instance_get_setting_as_logical( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_get_setting_as_logical_( &
+        ret_val = LIBMUSCLE_MPI_Instance_get_setting_as_logical_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             err_code_v, &
@@ -17625,7 +17625,7 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Instance_get_setting_as_real8array_( &
+        call LIBMUSCLE_MPI_Instance_get_setting_as_real8array_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             ret_val, &
@@ -17688,7 +17688,7 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        call LIBMUSCLE_Instance_get_setting_as_real8array2_( &
+        call LIBMUSCLE_MPI_Instance_get_setting_as_real8array2_( &
             self%ptr, &
             name, int(len(name), c_size_t), &
             ret_val, &
@@ -17736,7 +17736,7 @@ function LIBMUSCLE_Instance_list_ports( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_list_ports_( &
+        ret_val = LIBMUSCLE_MPI_Instance_list_ports_( &
             self%ptr)
 
         LIBMUSCLE_Instance_list_ports%ptr = ret_val
@@ -17752,7 +17752,7 @@ function LIBMUSCLE_Instance_is_connected( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_is_connected_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_connected_( &
             self%ptr, &
             port, int(len(port), c_size_t))
 
@@ -17769,7 +17769,7 @@ function LIBMUSCLE_Instance_is_vector_port( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_is_vector_port_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_vector_port_( &
             self%ptr, &
             port, int(len(port), c_size_t))
 
@@ -17786,7 +17786,7 @@ function LIBMUSCLE_Instance_is_resizable( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_is_resizable_( &
+        ret_val = LIBMUSCLE_MPI_Instance_is_resizable_( &
             self%ptr, &
             port, int(len(port), c_size_t))
 
@@ -17803,7 +17803,7 @@ function LIBMUSCLE_Instance_get_port_length( &
 
         integer (c_int) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_get_port_length_( &
+        ret_val = LIBMUSCLE_MPI_Instance_get_port_length_( &
             self%ptr, &
             port, int(len(port), c_size_t))
         LIBMUSCLE_Instance_get_port_length = ret_val
@@ -17818,7 +17818,7 @@ subroutine LIBMUSCLE_Instance_set_port_length( &
         character (len=*), intent(in) :: port
         integer, intent(in) :: length
 
-        call LIBMUSCLE_Instance_set_port_length_( &
+        call LIBMUSCLE_MPI_Instance_set_port_length_( &
             self%ptr, &
             port, int(len(port), c_size_t), &
             length)
@@ -17833,7 +17833,7 @@ subroutine LIBMUSCLE_Instance_send_pm( &
         character (len=*), intent(in) :: port_name
         class(LIBMUSCLE_Message), intent(in) :: message
 
-        call LIBMUSCLE_Instance_send_pm_( &
+        call LIBMUSCLE_MPI_Instance_send_pm_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             message%ptr)
@@ -17850,7 +17850,7 @@ subroutine LIBMUSCLE_Instance_send_pms( &
         class(LIBMUSCLE_Message), intent(in) :: message
         integer, intent(in) :: slot
 
-        call LIBMUSCLE_Instance_send_pms_( &
+        call LIBMUSCLE_MPI_Instance_send_pms_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             message%ptr, &
@@ -17877,7 +17877,7 @@ function LIBMUSCLE_Instance_receive_p( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_receive_p_( &
+        ret_val = LIBMUSCLE_MPI_Instance_receive_p_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             err_code_v, &
@@ -17936,7 +17936,7 @@ function LIBMUSCLE_Instance_receive_pd( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_receive_pd_( &
+        ret_val = LIBMUSCLE_MPI_Instance_receive_pd_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             default_msg%ptr, &
@@ -17996,7 +17996,7 @@ function LIBMUSCLE_Instance_receive_ps( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_receive_ps_( &
+        ret_val = LIBMUSCLE_MPI_Instance_receive_ps_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             slot, &
@@ -18058,7 +18058,7 @@ function LIBMUSCLE_Instance_receive_psd( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_receive_psd_( &
+        ret_val = LIBMUSCLE_MPI_Instance_receive_psd_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             slot, &
@@ -18117,7 +18117,7 @@ function LIBMUSCLE_Instance_receive_with_settings_p( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_receive_with_settings_p_( &
+        ret_val = LIBMUSCLE_MPI_Instance_receive_with_settings_p_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             err_code_v, &
@@ -18176,7 +18176,7 @@ function LIBMUSCLE_Instance_receive_with_settings_pd( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_receive_with_settings_pd_( &
+        ret_val = LIBMUSCLE_MPI_Instance_receive_with_settings_pd_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             default_msg%ptr, &
@@ -18236,7 +18236,7 @@ function LIBMUSCLE_Instance_receive_with_settings_ps( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_receive_with_settings_ps_( &
+        ret_val = LIBMUSCLE_MPI_Instance_receive_with_settings_ps_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             slot, &
@@ -18298,7 +18298,7 @@ function LIBMUSCLE_Instance_receive_with_settings_psd( &
         character(:), allocatable :: err_msg_p
         integer (c_size_t) :: err_msg_i
 
-        ret_val = LIBMUSCLE_Instance_receive_with_settings_psd_( &
+        ret_val = LIBMUSCLE_MPI_Instance_receive_with_settings_psd_( &
             self%ptr, &
             port_name, int(len(port_name), c_size_t), &
             slot, &
@@ -18345,7 +18345,7 @@ function LIBMUSCLE_Instance_resuming( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_resuming_( &
+        ret_val = LIBMUSCLE_MPI_Instance_resuming_( &
             self%ptr)
 
         LIBMUSCLE_Instance_resuming = ret_val
@@ -18359,7 +18359,7 @@ function LIBMUSCLE_Instance_should_init( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_should_init_( &
+        ret_val = LIBMUSCLE_MPI_Instance_should_init_( &
             self%ptr)
 
         LIBMUSCLE_Instance_should_init = ret_val
@@ -18373,7 +18373,7 @@ function LIBMUSCLE_Instance_load_snapshot( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_load_snapshot_( &
+        ret_val = LIBMUSCLE_MPI_Instance_load_snapshot_( &
             self%ptr)
 
         LIBMUSCLE_Instance_load_snapshot%ptr = ret_val
@@ -18389,7 +18389,7 @@ function LIBMUSCLE_Instance_should_save_snapshot( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_should_save_snapshot_( &
+        ret_val = LIBMUSCLE_MPI_Instance_should_save_snapshot_( &
             self%ptr, &
             timestamp)
 
@@ -18403,7 +18403,7 @@ subroutine LIBMUSCLE_Instance_save_snapshot( &
         class(LIBMUSCLE_Instance), intent(in) :: self
         class(LIBMUSCLE_Message), intent(in) :: message
 
-        call LIBMUSCLE_Instance_save_snapshot_( &
+        call LIBMUSCLE_MPI_Instance_save_snapshot_( &
             self%ptr, &
             message%ptr)
     end subroutine LIBMUSCLE_Instance_save_snapshot
@@ -18416,7 +18416,7 @@ function LIBMUSCLE_Instance_should_save_final_snapshot( &
 
         logical (c_bool) :: ret_val
 
-        ret_val = LIBMUSCLE_Instance_should_save_final_snapshot_( &
+        ret_val = LIBMUSCLE_MPI_Instance_should_save_final_snapshot_( &
             self%ptr)
 
         LIBMUSCLE_Instance_should_save_final_snapshot = ret_val
@@ -18429,7 +18429,7 @@ subroutine LIBMUSCLE_Instance_save_final_snapshot( &
         class(LIBMUSCLE_Instance), intent(in) :: self
         class(LIBMUSCLE_Message), intent(in) :: message
 
-        call LIBMUSCLE_Instance_save_final_snapshot_( &
+        call LIBMUSCLE_MPI_Instance_save_final_snapshot_( &
             self%ptr, &
             message%ptr)
     end subroutine LIBMUSCLE_Instance_save_final_snapshot
@@ -18456,7 +18456,7 @@ function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create( &
 
         integer (c_intptr_t) :: ret_val
 
-        ret_val = LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_( &
+        ret_val = LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_create_( &
             count)
 
         LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create%ptr = ret_val
@@ -18466,7 +18466,7 @@ subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free(self)
         implicit none
         type(LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs), intent(inout) :: self
 
-        call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(self%ptr)
+        call LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_free_(self%ptr)
         self%ptr = 0
     end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free
 
@@ -18479,7 +18479,7 @@ subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg( &
         integer, intent(in) :: i
         character (len=*), intent(in) :: arg
 
-        call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_( &
+        call LIBMUSCLE_MPI_IMPL_BINDINGS_CmdLineArgs_set_arg_( &
             self%ptr, &
             i, &
             arg, int(len(arg), c_size_t))
diff --git a/scripts/api_generator.py b/scripts/api_generator.py
index 4fdaf00c..10490f0a 100644
--- a/scripts/api_generator.py
+++ b/scripts/api_generator.py
@@ -91,15 +91,20 @@ def __init__(self, name: str = 'ret_val') -> None:
         self.name = name
         self.class_name = ""
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str], ns: str) -> None:
+    def set_ns_prefix(
+            self, ns_for_name: Dict[str, Tuple[str, str]], c_ns: str, f_ns: str
+            ) -> None:
         """Sets the namespace prefix correctly for all members.
 
         Args:
             ns_for_name: A map from type names to namespace names.
-            ns: Name of the namespace that this parameter's member function's
+            c_ns: Name of the C namespace that this parameter's member function's
+                    class is in.
+            f_ns: Name of the Fortran namespace that this parameter's meember function's
                     class is in.
         """
-        self.ns_prefix = ns
+        self.c_prefix = c_ns
+        self.f_prefix = f_ns
 
     @abc.abstractmethod
     def tname(self) -> str:
@@ -338,16 +343,16 @@ def fc_cpp_type(self) -> str:
 
     def f_type(self) -> List[Tuple[str, str]]:
         return self._regular_type(
-                'real ({}_real8), dimension(:)'.format(self.ns_prefix))
+                'real ({}_real8), dimension(:)'.format(self.f_prefix))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return False, self._regular_type(
-                [('real ({}_real8), dimension(:)'.format(self.ns_prefix),
+                [('real ({}_real8), dimension(:)'.format(self.f_prefix),
                   self.name)])
 
     def f_aux_variables(self) -> List[Tuple[str, str]]:
         return [(
-            'real ({}_real8), pointer, dimension(:)'.format(self.ns_prefix),
+            'real ({}_real8), pointer, dimension(:)'.format(self.f_prefix),
             'f_ret_ptr')]
 
     def f_chain_arg(self) -> str:
@@ -407,16 +412,16 @@ def fc_cpp_type(self) -> str:
 
     def f_type(self) -> List[Tuple[str, str]]:
         return self._regular_type(
-                'real ({}_real8), dimension(:,:)'.format(self.ns_prefix))
+                'real ({}_real8), dimension(:,:)'.format(self.f_prefix))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return False, self._regular_type(
-                [('real ({}_real8), dimension(:,:)'.format(self.ns_prefix),
+                [('real ({}_real8), dimension(:,:)'.format(self.f_prefix),
                   self.name)])
 
     def f_aux_variables(self) -> List[Tuple[str, str]]:
         return [('real ({}_real8), pointer, dimension(:,:)'.format(
-                self.ns_prefix), 'f_ret_ptr')]
+                self.f_prefix), 'f_ret_ptr')]
 
     def f_chain_arg(self) -> str:
         return '{}, int(shape({}), c_size_t)'.format(self.name, self.name)
@@ -497,16 +502,16 @@ def fc_cpp_type(self) -> str:
 
     def f_type(self) -> List[Tuple[str, str]]:
         return self._regular_type(
-                'integer ({}_size), dimension(:)'.format(self.ns_prefix))
+                'integer ({}_size), dimension(:)'.format(self.f_prefix))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return False, self._regular_type(
-                [('integer ({}_size), dimension(:)'.format(self.ns_prefix),
+                [('integer ({}_size), dimension(:)'.format(self.f_prefix),
                   self.name)])
 
     def f_aux_variables(self) -> List[Tuple[str, str]]:
         return [(
-            'integer ({}_size), pointer, dimension(:)'.format(self.ns_prefix),
+            'integer ({}_size), pointer, dimension(:)'.format(self.f_prefix),
             'f_ret_ptr')]
 
     def f_chain_arg(self) -> str:
@@ -576,16 +581,12 @@ def __init__(
         super().__init__(name)
         self.ndims = ndims
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str], ns: str) -> None:
-        """Sets the namespace prefix correctly for all members.
-
-        Args:
-            ns_for_name: A map from type names to namespace names.
-            ns: Name of the namespace that this parameter's member function's
-                    class is in.
-        """
-        self.ns_prefix = ns
-        self.elem_type.set_ns_prefix(ns_for_name, ns)
+    def set_ns_prefix(
+            self, ns_for_name: Dict[str, Tuple[str, str]], c_ns: str, f_ns: str
+            ) -> None:
+        self.c_prefix = c_ns
+        self.f_prefix = f_ns
+        self.elem_type.set_ns_prefix(ns_for_name, c_ns, f_ns)
 
     def tname(self) -> str:
         return '{}array{}'.format(self.elem_type.tname(), self.ndims)
@@ -612,7 +613,7 @@ def f_aux_variables(self) -> List[Tuple[str, str]]:
 
     def f_chain_arg(self) -> str:
         return '{0}, int(shape({0}), c_size_t), {1}_{2}_size'.format(
-                self.elem_type.f_chain_arg(), self.ndims, self.ns_prefix)
+                self.elem_type.f_chain_arg(), self.ndims, self.f_prefix)
 
     def f_call_c(self, result_name: str, call: str) -> str:
         return '    call {}\n\n'.format(call)
@@ -779,8 +780,10 @@ def __init__(self, class_name: str, name: str = '') -> None:
 
         self.class_name = class_name
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str], ns: str) -> None:
-        self.ns_prefix = ns_for_name[self.class_name]
+    def set_ns_prefix(
+            self, ns_for_name: Dict[str, Tuple[str, str]], c_ns: str, f_ns: str
+            ) -> None:
+        self.c_prefix, self.f_prefix = ns_for_name[self.class_name]
 
     def tname(self) -> str:
         return self.name.lower()
@@ -790,11 +793,11 @@ def fc_cpp_type(self) -> str:
 
     def f_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('class({}_{})'.format(
-            self.ns_prefix, self.class_name))
+            self.f_prefix, self.class_name))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return True, self._regular_type('type({}_{})'.format(
-            self.ns_prefix, self.class_name))
+            self.f_prefix, self.class_name))
 
     def fi_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('integer (c_intptr_t), value')
@@ -892,8 +895,10 @@ def __init__(self, class_name: str, name: str = '') -> None:
 
         self.class_name = class_name
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str], ns: str) -> None:
-        self.ns_prefix = ns_for_name[self.class_name]
+    def set_ns_prefix(
+            self, ns_for_name: Dict[str, Tuple[str, str]], c_ns: str, f_ns: str
+            ) -> None:
+        self.c_prefix, self.f_prefix = ns_for_name[self.class_name]
 
     def tname(self) -> str:
         return self.class_name.lower()
@@ -903,11 +908,11 @@ def fc_cpp_type(self) -> str:
 
     def f_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('integer({}_{})'.format(
-            self.ns_prefix, self.class_name))
+            self.f_prefix, self.class_name))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return True, self._regular_type('integer({}_{})'.format(
-            self.ns_prefix, self.class_name))
+            self.f_prefix, self.class_name))
 
     def fi_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('integer (c_int), value')
@@ -988,11 +993,11 @@ def fc_cpp_type(self) -> str:
         return 'char'
 
     def f_type(self) -> List[Tuple[str, str]]:
-        return self._regular_type('integer ({}_int1)'.format(self.ns_prefix))
+        return self._regular_type('integer ({}_int1)'.format(self.f_prefix))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return True, self._regular_type('integer ({}_int1)'.format(
-                self.ns_prefix))
+                self.f_prefix))
 
     def fi_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('integer (c_int8_t), value')
@@ -1069,11 +1074,11 @@ def fc_cpp_type(self) -> str:
         return 'int32_t'
 
     def f_type(self) -> List[Tuple[str, str]]:
-        return self._regular_type('integer ({}_int4)'.format(self.ns_prefix))
+        return self._regular_type('integer ({}_int4)'.format(self.f_prefix))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return True, self._regular_type('integer ({}_int4)'.format(
-                self.ns_prefix))
+                self.f_prefix))
 
     def fi_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('integer (c_int32_t), value')
@@ -1150,11 +1155,11 @@ def fc_cpp_type(self) -> str:
         return 'std::size_t'
 
     def f_type(self) -> List[Tuple[str, str]]:
-        return self._regular_type('integer ({}_size)'.format(self.ns_prefix))
+        return self._regular_type('integer ({}_size)'.format(self.f_prefix))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return True, self._regular_type('integer ({}_size)'.format(
-                self.ns_prefix))
+                self.f_prefix))
 
     def fi_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('integer (c_size_t), value')
@@ -1191,11 +1196,11 @@ def fc_cpp_type(self) -> str:
         return 'float'
 
     def f_type(self) -> List[Tuple[str, str]]:
-        return self._regular_type('real ({}_real4)'.format(self.ns_prefix))
+        return self._regular_type('real ({}_real4)'.format(self.f_prefix))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return True, self._regular_type('real ({}_real4)'.format(
-                self.ns_prefix))
+                self.f_prefix))
 
     def fi_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('real (c_float), value')
@@ -1232,11 +1237,11 @@ def fc_cpp_type(self) -> str:
         return 'double'
 
     def f_type(self) -> List[Tuple[str, str]]:
-        return self._regular_type('real ({}_real8)'.format(self.ns_prefix))
+        return self._regular_type('real ({}_real8)'.format(self.f_prefix))
 
     def f_ret_type(self) -> Tuple[bool, List[Tuple[str, str]]]:
         return True, self._regular_type('real ({}_real8)'.format(
-                self.ns_prefix))
+                self.f_prefix))
 
     def fi_type(self) -> List[Tuple[str, str]]:
         return self._regular_type('real (c_double), value')
@@ -1302,8 +1307,8 @@ def fc_return(self) -> str:
 
 class Member(abc.ABC):
     def __init__(self, name: str) -> None:
+        self.c_prefix = self.f_prefix = ""
         self.name = name
-        self.ns_prefix = ""
         self.public: Optional[bool] = None
         self.class_name = ""
 
@@ -1313,8 +1318,8 @@ def set_class_name(self, class_name: str) -> None:
     def reset_class_name(self, class_name: str) -> None:
         self.class_name = class_name
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str]) -> None:
-        self.ns_prefix = ns_for_name[self.class_name]
+    def set_ns_prefix(self, ns_for_name: Dict[str, Tuple[str, str]]) -> None:
+        self.c_prefix, self.f_prefix = ns_for_name[self.class_name]
 
     def set_public(self, public: Optional[bool]) -> None:
         self.public = public
@@ -1397,7 +1402,8 @@ def __init__(self,
     def __copy__(self) -> 'MemFun':
         result = MemFun(
                 self.ret_type, self.name, copy(self.params), self.may_throw)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.class_name = self.class_name
         result.cpp_chain_call = self.cpp_chain_call
@@ -1417,22 +1423,23 @@ def reset_class_name(self, class_name: str) -> None:
             if self.params[0].name == 'self':
                 self.params[0] = Obj(class_name, 'self')
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str]) -> None:
+    def set_ns_prefix(self, ns_for_name: Dict[str, Tuple[str, str]]) -> None:
         """Sets the namespace prefix correctly for all members.
 
         Args:
             ns_for_name: A map from type names to namespace names.
         """
-        self.ns_prefix = ns_for_name[self.class_name]
-        self.ret_type.set_ns_prefix(ns_for_name, self.ns_prefix)
+        self.c_prefix, self.f_prefix = ns_for_name[self.class_name]
+        self.ret_type.set_ns_prefix(ns_for_name, self.c_prefix, self.f_prefix)
         for param in self.params:
-            param.set_ns_prefix(ns_for_name, self.ns_prefix)
+            param.set_ns_prefix(ns_for_name, self.c_prefix, self.f_prefix)
 
     def fortran_c_wrapper(self) -> str:
         """Create a C wrapper for calling by Fortran.
         """
         if self.fc_override is not None:
-            return self.fc_override.replace('$CLASSNAME$', self.class_name)
+            return self.fc_override.replace('$CLASSNAME$', self.class_name).replace(
+                    "$C_PREFIX$", self.c_prefix).replace("$F_PREFIX$", self.f_prefix)
 
         result = ''
 
@@ -1445,7 +1452,7 @@ def fortran_c_wrapper(self) -> str:
             out_parameters.append('std::size_t * err_msg_len')
 
         func_name = '{}_{}_{}_'.format(
-                self.ns_prefix, self.class_name, self.name)
+                self.c_prefix, self.class_name, self.name)
 
         par_str = ', '.join(in_parameters + out_parameters)
         result += '{} {}({}) {{\n'.format(return_type, func_name, par_str)
@@ -1487,7 +1494,7 @@ def fortran_interface(self) -> str:
             return result
 
         func_name = '{}_{}_{}_'.format(
-                self.ns_prefix, self.class_name, self.name)
+                self.c_prefix, self.class_name, self.name)
 
         # declaration
         in_parameters = self._fi_in_parameters()
@@ -1531,14 +1538,16 @@ def fortran_function(self) -> str:
         """
         if self.f_override is not None:
             return indent(
-                    self.f_override.replace('$CLASSNAME$', self.class_name),
+                    self.f_override.replace('$CLASSNAME$', self.class_name).replace(
+                            "$C_PREFIX$", self.c_prefix).replace(
+                            "$F_PREFIX$", self.f_prefix),
                     4*' ')
 
         result = ''
 
         # declaration
         func_name = '{}_{}_{}'.format(
-                self.ns_prefix, self.class_name, self.name)
+                self.f_prefix, self.class_name, self.name)
         in_parameters = self._f_in_parameters()
         return_type, out_parameters = self._f_out_parameters()
         if self.may_throw:
@@ -1591,9 +1600,11 @@ def fortran_function(self) -> str:
         arg_str = ', &\n'.join([8*' ' + arg for arg in args])
 
         # call C function
+        fc_func_name = '{}_{}_{}_'.format(
+                self.c_prefix, self.class_name, self.name)
         chain_call = self.fc_chain_call(
-                ns_prefix=self.ns_prefix, class_name=self.class_name,
-                fc_func_name=(func_name + '_'), fc_args=arg_str)
+                ns_prefix=self.c_prefix, class_name=self.class_name,
+                fc_func_name=fc_func_name, fc_args=arg_str)
         result_name = ''
         if return_type != '':
             result_name = func_name
@@ -1654,7 +1665,7 @@ def fortran_public_declaration(self) -> str:
             return ''
 
         func_name = '{}_{}_{}'.format(
-                self.ns_prefix, self.class_name, self.name)
+                self.f_prefix, self.class_name, self.name)
         return '    public :: {}\n'.format(func_name)
 
     def fortran_exports(self) -> List[str]:
@@ -1664,12 +1675,12 @@ def fortran_exports(self) -> List[str]:
             return []
         else:
             return ['{}_{}_{}_;'.format(
-                    self.ns_prefix, self.class_name, self.name)]
+                    self.c_prefix, self.class_name, self.name)]
 
     def fortran_contains_definition(self) -> str:
         if self.f_override == '':
             return ''
-        full_name = f'{self.ns_prefix}_{self.class_name}_{self.name}'
+        full_name = f'{self.f_prefix}_{self.class_name}_{self.name}'
         return f'    procedure :: {self.name} => {full_name}\n'
 
     @staticmethod
@@ -1793,7 +1804,8 @@ def __init__(
 
     def __copy__(self) -> 'Constructor':
         result = Constructor(copy(self.params), self.name)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.class_name = self.class_name
         result.ret_type = self.ret_type
@@ -1817,8 +1829,8 @@ def fortran_overload(self) -> str:
         if self.name != "create":
             return ''
         return indent(dedent(f"""\
-            interface {self.ns_prefix}_{self.class_name}
-                module procedure {self.ns_prefix}_{self.class_name}_{self.name}
+            interface {self.f_prefix}_{self.class_name}
+                module procedure {self.f_prefix}_{self.class_name}_{self.name}
             end interface
 
             """), 4*' ')
@@ -1847,7 +1859,8 @@ def __init__(self, param: Par, name: str = 'equals', **args: Any) -> None:
 
     def __copy__(self) -> 'EqualsOperator':
         result = EqualsOperator(copy(self.params[0]), self.name)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.class_name = self.class_name
         result.ret_type = self.ret_type
@@ -1881,7 +1894,8 @@ def __init__(self,
 
     def __copy__(self) -> 'AssignmentOperator':
         result = AssignmentOperator(self.name, copy(self.params[0]))
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.class_name = self.class_name
         result.ret_type = self.ret_type
@@ -1911,7 +1925,8 @@ def __init__(self, name: str, params: List[Par], may_throw: bool = False
     def __copy__(self) -> 'IndexAssignmentOperator':
         result = IndexAssignmentOperator(
                 self.name, copy(self.params), self.may_throw)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.class_name = self.class_name
         result.ret_type = self.ret_type
@@ -1939,7 +1954,8 @@ class ShiftedIndexAssignmentOperator(IndexAssignmentOperator):
     def __copy__(self) -> 'ShiftedIndexAssignmentOperator':
         result = ShiftedIndexAssignmentOperator(
                 self.name, copy(self.params), self.may_throw)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.class_name = self.class_name
         result.ret_type = self.ret_type
@@ -1974,7 +1990,8 @@ def __init__(self, params: List[Par], name: str, **args: Any) -> None:
 
     def __copy__(self) -> 'NamedConstructor':
         result = NamedConstructor(copy(self.params), self.name)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.class_name = self.class_name
         result.name = self.name
@@ -2015,7 +2032,8 @@ def __init__(self, **args: Any) -> None:
 
     def __copy__(self) -> 'MemFun':
         result = Destructor()
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.class_name = self.class_name
         result.ret_type = self.ret_type
@@ -2034,18 +2052,18 @@ def _fc_cpp_call(self) -> str:
 
     def fortran_function(self) -> str:
         return indent(dedent(f"""\
-            subroutine {self.ns_prefix}_{self.class_name}_{self.name}(self)
+            subroutine {self.f_prefix}_{self.class_name}_{self.name}(self)
                 implicit none
-                type({self.ns_prefix}_{self.class_name}), intent(inout) :: self
+                type({self.f_prefix}_{self.class_name}), intent(inout) :: self
 
-                call {self.ns_prefix}_{self.class_name}_{self.name}_(self%ptr)
+                call {self.c_prefix}_{self.class_name}_{self.name}_(self%ptr)
                 self%ptr = 0
-            end subroutine {self.ns_prefix}_{self.class_name}_{self.name}
+            end subroutine {self.f_prefix}_{self.class_name}_{self.name}
 
             """), 4*' ')
 
     def fortran_contains_definition(self) -> str:
-        full_name = f'{self.ns_prefix}_{self.class_name}_{self.name}'
+        full_name = f'{self.f_prefix}_{self.class_name}_{self.name}'
         return f'    final :: {full_name}\n'
 
 
@@ -2082,7 +2100,7 @@ def set_public(self, public: Optional[bool]) -> None:
         for instance in self.instances:
             instance.set_public(public)
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str]) -> None:
+    def set_ns_prefix(self, ns_for_name: Dict[str, Tuple[str, str]]) -> None:
         """Sets the namespace prefix correctly for all members.
 
         Args:
@@ -2165,7 +2183,8 @@ def __copy__(self) -> 'MemFunTmplInstance':
                 self.ret_type, self.tpl_name, self.targ, copy(self.params),
                 self.may_throw)
 
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         result.name = self.name
         result.class_name = self.class_name
@@ -2258,7 +2277,8 @@ def __copy__(self) -> 'MemFunTmpl':
         result = MemFunTmpl(
                 self.types, self.ret_type, self.name, copy(self.params),
                 self.may_throw)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         if self.class_name is None:
             result.class_name = None
@@ -2293,7 +2313,8 @@ def __init__(self, name: str, names: List[str], is_constructor: bool) -> None:
 
     def __copy__(self) -> 'OverloadSet':
         result = OverloadSet(self.name, self.names, self.is_constructor)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.class_name = self.class_name
         result.public = self.public
         return result
@@ -2308,7 +2329,7 @@ def fortran_function(self) -> str:
         return ''
 
     def fortran_overload(self) -> str:
-        prefix = '{}_{}'.format(self.ns_prefix, self.class_name)
+        prefix = '{}_{}'.format(self.f_prefix, self.class_name)
         interfaces = [f'{prefix}_{self.name}']
         # do not generate a fortran constructor for named constructors like create_grid
         if self.is_constructor and self.name == 'create':
@@ -2332,7 +2353,7 @@ def fortran_public_declaration(self) -> str:
         """
         if self.public:
             return '    public :: {}_{}_{}\n'.format(
-                    self.ns_prefix, self.class_name, self.name)
+                    self.f_prefix, self.class_name, self.name)
         return ''
 
     def fortran_exports(self) -> List[str]:
@@ -2349,17 +2370,18 @@ def fortran_contains_definition(self) -> str:
 
 class NamespaceMember(abc.ABC):
     def __init__(self, name: str):
-        self.ns_prefix: Optional[str] = None
+        self.c_prefix: Optional[str] = None
+        self.f_prefix: Optional[str] = None
         self.public: Optional[bool] = None
         self.name = name
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str]) -> None:
+    def set_ns_prefix(self, ns_for_name: Dict[str, Tuple[str, str]]) -> None:
         """Sets the namespace prefix correctly for all members.
 
         Args:
             ns_for_name: A map from type names to namespace names.
         """
-        self.ns_prefix = ns_for_name[self.name]
+        self.c_prefix, self.f_prefix = ns_for_name[self.name]
 
     def set_public(self, public: Optional[bool]) -> None:
         """Sets whether this class should be public.
@@ -2439,7 +2461,7 @@ def __init__(
                 else:
                     self.members.append(member)
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str]) -> None:
+    def set_ns_prefix(self, ns_for_name: Dict[str, Tuple[str, str]]) -> None:
         super().set_ns_prefix(ns_for_name)
         for member in self.members:
             member.set_ns_prefix(ns_for_name)
@@ -2477,14 +2499,14 @@ def fortran_overloads(self) -> str:
     def fortran_type_definition(self) -> str:
         """Create a Fortran type/handle definition for this class.
         """
-        result = 'type {}_{}\n'.format(self.ns_prefix, self.name)
+        result = 'type {}_{}\n'.format(self.f_prefix, self.name)
         result += '    integer (c_intptr_t) :: ptr = 0\n'
         ctn = ''.join(member.fortran_contains_definition() for member in self.members)
         if ctn:
             result += 'contains\n' + ctn
-        result += 'end type {}_{}\n'.format(self.ns_prefix, self.name)
+        result += 'end type {}_{}\n'.format(self.f_prefix, self.name)
         if self.public:
-            result += 'public :: {}_{}\n'.format(self.ns_prefix, self.name)
+            result += 'public :: {}_{}\n'.format(self.f_prefix, self.name)
         result += '\n'
         return indent(result, 4*' ')
 
@@ -2533,9 +2555,9 @@ def fortran_type_definition(self) -> str:
             public = ', public'
         for val_name, val_value in self.values:
             result += 'integer, parameter{} :: {}_{}_{} = {}\n'.format(
-                    public, self.ns_prefix, self.name, val_name, val_value)
+                    public, self.f_prefix, self.name, val_name, val_value)
         result += ('integer, parameter{0} :: {1}_{2} = selected_int_kind(9)\n\n'
-                   ).format(public, self.ns_prefix, self.name)
+                   ).format(public, self.f_prefix, self.name)
         return indent(result, 4*' ')
 
 
@@ -2558,31 +2580,31 @@ def fortran_type_definition(self) -> str:
         """
         result = ''
         if self.public:
-            result += f'public :: {self.ns_prefix}_{self.name}\n'
+            result += f'public :: {self.f_prefix}_{self.name}\n'
 
-        result += f'type {self.ns_prefix}_{self.name}\n'
+        result += f'type {self.f_prefix}_{self.name}\n'
         for value in self.values:
             result += f'    logical :: {value} = .false.\n'
         result += '\n'
         result += 'contains\n'
-        result += f'    procedure :: to_int => {self.ns_prefix}_{self.name}_to_int_\n'
+        result += f'    procedure :: to_int => {self.f_prefix}_{self.name}_to_int_\n'
         result += 'end type\n'
         return indent(result, 4*' ')
 
     def fortran_exports(self) -> List[str]:
         """Generates a list of linker exports for the Fortran symbols.
         """
-        fun_name = f'{self.ns_prefix}_{self.name}_to_int_;'
+        fun_name = f'{self.f_prefix}_{self.name}_to_int_;'
         return [fun_name]
 
     def fortran_functions(self) -> str:
         """Create Fortran function definitions for this class.
         """
-        fun_name = f'{self.ns_prefix}_{self.name}_to_int_'
+        fun_name = f'{self.f_prefix}_{self.name}_to_int_'
         result = f'integer function {fun_name}(flags)\n'
         result += '    implicit none\n'
         result += '\n'
-        result += f'    class({self.ns_prefix}_{self.name}), intent(in) :: flags\n'
+        result += f'    class({self.f_prefix}_{self.name}), intent(in) :: flags\n'
         result += '    integer :: ret_val\n'
         result += '\n'
         result += '    ret_val = 0\n'
@@ -2594,7 +2616,7 @@ def fortran_functions(self) -> str:
 
 
 class Namespace:
-    def __init__(self, name: str, public: Optional[bool], prefix: str,
+    def __init__(self, name: str, public: Optional[bool], c_prefix: str, f_prefix: str,
                  members: Sequence[NamespaceMember]
                  ) -> None:
         """Create a namespace description.
@@ -2604,19 +2626,21 @@ def __init__(self, name: str, public: Optional[bool], prefix: str,
             public: Whether to put the symbols in this namespace in the
                     generated public API. If None, do not generate at
                     all (used for forward declarations).
-            prefix: Short prefix to use in C/Fortran function names.
+            c_prefix: Short prefix to use in C function names.
+            f_prefix: Short prefix to use in Fortran function names.
             enums: List of enums in this namespace.
             classes: List of classes in this namespace.
         """
         self.name = name
         self.public = public
-        self.prefix = prefix
+        self.c_prefix = c_prefix
+        self.f_prefix = f_prefix
         self.members = members
 
         for member in self.members:
             member.set_public(public)
 
-    def set_ns_prefix(self, ns_for_name: Dict[str, str]) -> None:
+    def set_ns_prefix(self, ns_for_name: Dict[str, Tuple[str, str]]) -> None:
         """Sets the namespace prefix correctly for all members.
 
         Args:
@@ -2636,12 +2660,12 @@ def fortran_typedefs(self) -> str:
             public = ', public'
         for err_name, err_code in error_codes.items():
             result += '    integer, parameter{} :: {}_{} = {}\n'.format(
-                    public, self.prefix, err_name, err_code)
+                    public, self.f_prefix, err_name, err_code)
         result += '\n'
 
         for kind_name, kind_def in kinds.items():
             result += '    integer, parameter{} :: {}_{} = {}\n'.format(
-                    public, self.prefix, kind_name, kind_def)
+                    public, self.f_prefix, kind_name, kind_def)
         result += '\n'
 
         for member in self.members:
@@ -2710,10 +2734,10 @@ def __init__(
         self.namespaces = namespaces
 
         # set ns_prefix throughout the description
-        ns_for_name: Dict[str, str] = dict()
+        ns_for_name: Dict[str, Tuple[str, str]] = dict()
         for namespace in self.namespaces:
             for member in namespace.members:
-                ns_for_name[member.name] = namespace.prefix
+                ns_for_name[member.name] = (namespace.c_prefix, namespace.f_prefix)
 
         for namespace in namespaces:
             namespace.set_ns_prefix(ns_for_name)
diff --git a/scripts/make_libmuscle_api.py b/scripts/make_libmuscle_api.py
index 362137ce..b8841843 100755
--- a/scripts/make_libmuscle_api.py
+++ b/scripts/make_libmuscle_api.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 
 import argparse
-from copy import copy
+from copy import copy, deepcopy
 from textwrap import indent, dedent
 from typing import List, cast
 
@@ -48,7 +48,7 @@ def __init__(self, with_names: bool) -> None:
             # This is not set yet here, but f_type() needs it.
             # The dict is only used by Obj, which we don't have.
             typ.name = 'data_array'
-            typ.set_ns_prefix({}, 'LIBMUSCLE')
+            typ.set_ns_prefix({}, 'LIBMUSCLE', 'LIBMUSCLE')
 
             instance_params: List[Par] = [Array(1, copy(typ), 'data_array')]
             if not with_names:
@@ -67,7 +67,7 @@ def __init__(self, with_names: bool) -> None:
                     instance_params.append(String(arg_name))
                 instance_name = 'grid_{}_n'.format(typ.tname())
                 fc_override = dedent("""\
-                    std::intptr_t LIBMUSCLE_$CLASSNAME$_create_grid_{0}_n_(
+                    std::intptr_t $C_PREFIX$_$CLASSNAME$_create_grid_{0}_n_(
                             {1} * data_array,
                             std::size_t * data_array_shape,
                             std::size_t data_array_ndims,
@@ -142,26 +142,26 @@ def __init__(self, with_names: bool) -> None:
                     dim_list = ', '.join([':'] * ndims)
 
                     f_override = dedent("""\
-                        function LIBMUSCLE_$CLASSNAME$_create_grid_{0}_{1}_n( &
+                        function $F_PREFIX$_$CLASSNAME$_create_grid_{0}_{1}_n( &
                                 data_array, &
                                 {2})
 
                             implicit none
                             {6}, dimension({8}), intent(in) :: data_array
                             {3}
-                            type(LIBMUSCLE_$CLASSNAME$) :: LIBMUSCLE_$CLASSNAME$_create_grid_{0}_{1}_n
+                            type($F_PREFIX$_$CLASSNAME$) :: $F_PREFIX$_$CLASSNAME$_create_grid_{0}_{1}_n
 
                             integer (c_intptr_t) :: ret_val
 
-                            ret_val = LIBMUSCLE_$CLASSNAME$_create_grid_{1}_n_( &
+                            ret_val = $C_PREFIX$_$CLASSNAME$_create_grid_{1}_n_( &
                                     {7}, &
                                     int(shape(data_array), c_size_t), &
                                     {0}_LIBMUSCLE_size, &
                         {4}{5} &
                                 )
 
-                            LIBMUSCLE_$CLASSNAME$_create_grid_{0}_{1}_n%ptr = ret_val
-                        end function LIBMUSCLE_$CLASSNAME$_create_grid_{0}_{1}_n
+                            $F_PREFIX$_$CLASSNAME$_create_grid_{0}_{1}_n%ptr = ret_val
+                        end function $F_PREFIX$_$CLASSNAME$_create_grid_{0}_{1}_n
 
                         """).format(  # noqa: E501
                                 ndims, typ.tname(), name_args, name_types.strip(),
@@ -184,7 +184,8 @@ def __init__(self, with_names: bool) -> None:
 
     def __copy__(self) -> 'GridConstructor':
         result = GridConstructor(self.with_names)
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         if self.class_name is None:
             result.class_name = None
@@ -212,10 +213,10 @@ def __init__(self) -> None:
             # This is not set yet here, but f_type() needs it.
             # The dict is only used by Obj, which we don't have.
             typ.name = 'elements'
-            typ.set_ns_prefix({}, 'LIBMUSCLE')
+            typ.set_ns_prefix({}, 'LIBMUSCLE', 'LIBMUSCLE')
             func_name = 'elements_{}'.format(typ.tname())
             fc_override = dedent("""\
-                    void LIBMUSCLE_$CLASSNAME$_elements_{0}_(
+                    void $C_PREFIX$_$CLASSNAME$_elements_{0}_(
                             std::intptr_t self,
                             std::size_t ndims,
                             {1} ** elements,
@@ -259,14 +260,14 @@ def __init__(self) -> None:
                 dims_list = ', '.join([':']*ndims)
                 rev_dims = ', '.join(map(str, reversed(range(1, ndims+1))))
                 f_override = dedent("""\
-                    subroutine LIBMUSCLE_$CLASSNAME$_elements_{0}_{1}( &
+                    subroutine $F_PREFIX$_$CLASSNAME$_elements_{0}_{1}( &
                             self, &
                             elements, &
                             err_code, &
                             err_msg)
 
                         implicit none
-                        class(LIBMUSCLE_$CLASSNAME$), intent(in) :: self
+                        class($F_PREFIX$_$CLASSNAME$), intent(in) :: self
                         {2}, dimension({3}), intent(out) :: elements
                         integer, optional, intent(out) :: err_code
                         character(:), allocatable, optional, intent(out) :: err_msg
@@ -283,7 +284,7 @@ def __init__(self) -> None:
                         character(:), allocatable :: err_msg_p
                         integer (c_size_t) :: err_msg_i
 
-                        call LIBMUSCLE_$CLASSNAME$_elements_{1}_( &
+                        call $C_PREFIX$_$CLASSNAME$_elements_{1}_( &
                             self%ptr, &
                             {0}_LIBMUSCLE_size, &
                             ret_val, &
@@ -326,7 +327,7 @@ def __init__(self) -> None:
                             call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/))
                             elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ {4}:: /), (/{5}/))
                         end if
-                    end subroutine LIBMUSCLE_$CLASSNAME$_elements_{0}_{1}
+                    end subroutine $F_PREFIX$_$CLASSNAME$_elements_{0}_{1}
 
                     """).format(  # noqa: E501
                         ndims, typ.tname(), typ.f_ret_type()[1][0][0],
@@ -340,7 +341,8 @@ def __init__(self) -> None:
 
     def __copy__(self) -> 'Elements':
         result = Elements()
-        result.ns_prefix = self.ns_prefix
+        result.c_prefix = self.c_prefix
+        result.f_prefix = self.f_prefix
         result.public = self.public
         if self.class_name is None:
             result.class_name = None
@@ -400,7 +402,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Bytes('data'), 'as_byte_array', [], True,
         fc_override=dedent("""\
-            void LIBMUSCLE_DataConstRef_as_byte_array_(
+            void $C_PREFIX$_DataConstRef_as_byte_array_(
                     std::intptr_t self,
                     char ** data, std::size_t * data_size,
                     int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -423,7 +425,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Obj('DataConstRef', 'value'), 'get_item_by_key', [String('key')], True,
         fc_override=dedent("""\
-            std::intptr_t LIBMUSCLE_$CLASSNAME$_get_item_by_key_(
+            std::intptr_t $C_PREFIX$_$CLASSNAME$_get_item_by_key_(
                     std::intptr_t self,
                     char * key, std::size_t key_size,
                     int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -456,7 +458,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Obj('DataConstRef', 'value'), 'get_item_by_index', [Sizet('i')], True,
         fc_override=dedent("""\
-            std::intptr_t LIBMUSCLE_$CLASSNAME$_get_item_by_index_(
+            std::intptr_t $C_PREFIX$_$CLASSNAME$_get_item_by_index_(
                     std::intptr_t self,
                     std::size_t i,
                     int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -489,7 +491,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Sizet(), 'num_dims', [], True,
         fc_override=dedent("""\
-            std::size_t LIBMUSCLE_$CLASSNAME$_num_dims_(
+            std::size_t $C_PREFIX$_$CLASSNAME$_num_dims_(
                     std::intptr_t self,
                     int * err_code, char ** err_msg, std::size_t * err_msg_len
             ) {
@@ -542,7 +544,7 @@ def __copy__(self) -> 'Elements':
     NamedConstructor(
         [Bytes('buf')], 'byte_array_from_buf', cpp_func_name='byte_array',
         fc_override=dedent("""\
-            std::intptr_t LIBMUSCLE_Data_create_byte_array_from_buf_(
+            std::intptr_t $C_PREFIX$_Data_create_byte_array_from_buf_(
                    char * buf, std::size_t buf_size
             ) {
                Data * result = new Data(Data::byte_array(buf, buf_size));
@@ -556,7 +558,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Bytes('data'), 'as_byte_array', [], True,
         fc_override=dedent("""\
-            void LIBMUSCLE_Data_as_byte_array_(
+            void $C_PREFIX$_Data_as_byte_array_(
                     std::intptr_t self,
                     char ** data, std::size_t * data_size,
                     int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -592,7 +594,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Void(), 'set_nil', [], False,
         fc_override=dedent("""\
-            void LIBMUSCLE_Data_set_nil_(std::intptr_t self) {
+            void $C_PREFIX$_Data_set_nil_(std::intptr_t self) {
                 Data * self_p = reinterpret_cast<Data *>(self);
                 *self_p = Data();
             }
@@ -602,7 +604,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Obj('Data', 'value'), 'get_item_by_key', [String('key')], True,
         fc_override=dedent("""\
-            std::intptr_t LIBMUSCLE_Data_get_item_by_key_(
+            std::intptr_t $C_PREFIX$_Data_get_item_by_key_(
                     std::intptr_t self,
                     char * key, std::size_t key_size,
                     int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -635,7 +637,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Obj('Data', 'value'), 'get_item_by_index', [Sizet('i')], True,
         fc_override=dedent("""\
-            std::intptr_t LIBMUSCLE_Data_get_item_by_index_(
+            std::intptr_t $C_PREFIX$_Data_get_item_by_index_(
                     std::intptr_t self,
                     std::size_t i,
                     int * err_code, char ** err_msg, std::size_t * err_msg_len
@@ -694,7 +696,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         String(), 'key', [Sizet('i')], True,
         fc_override=dedent("""\
-            void LIBMUSCLE_Data_key_(
+            void $C_PREFIX$_Data_key_(
                     std::intptr_t self, std::size_t i,
                     char ** ret_val, std::size_t * ret_val_size,
                     int * err_code,
@@ -729,7 +731,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Obj('Data'), 'value', [Sizet('i')], True,
         fc_override=dedent("""\
-            std::intptr_t LIBMUSCLE_Data_value_(
+            std::intptr_t $C_PREFIX$_Data_value_(
                     std::intptr_t self, std::size_t i,
                     int * err_code,
                     char ** err_msg, std::size_t * err_msg_len
@@ -813,7 +815,7 @@ def __copy__(self) -> 'Elements':
     MemFun(
         Sizet(), 'num_ports', [EnumVal('Operator', 'op')],
         fc_override=dedent("""\
-            std::size_t LIBMUSCLE_PortsDescription_num_ports_(std::intptr_t self, int op) {
+            std::size_t $C_PREFIX$_PortsDescription_num_ports_(std::intptr_t self, int op) {
                 PortsDescription * self_p = reinterpret_cast<PortsDescription *>(self);
                 Operator op_e = static_cast<Operator>(op);
                 std::size_t result = 0u;
@@ -833,7 +835,7 @@ def __copy__(self) -> 'Elements':
     [Obj('CmdLineArgs', 'cla'), Obj('PortsDescription', 'ports'),
         Int('flags')],
     fc_override=dedent("""\
-        std::intptr_t LIBMUSCLE_Instance_create_(
+        std::intptr_t $C_PREFIX$_Instance_create_(
                 std::intptr_t cla,
                 std::intptr_t ports,
                 int flags
@@ -862,7 +864,7 @@ def __copy__(self) -> 'Elements':
             character (kind=c_char, len=:), allocatable :: cur_arg
 
             num_args = command_argument_count()
-            cla = LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_(num_args + 1)
+            cla = $C_PREFIX$_IMPL_BINDINGS_CmdLineArgs_create_(num_args + 1)
             do i = 0, num_args
                 call get_command_argument(i, length=arg_len)
                 allocate (character(arg_len+1) :: cur_arg)
@@ -876,9 +878,9 @@ def __copy__(self) -> 'Elements':
             if (present(ports)) ports_ptr = ports%ptr
             iflags = 0
             if (present(flags)) iflags = flags%to_int()
-            LIBMUSCLE_Instance_create%ptr = LIBMUSCLE_Instance_create_( &
+            LIBMUSCLE_Instance_create%ptr = $C_PREFIX$_Instance_create_( &
                 cla, ports_ptr, iflags)
-            call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(cla)
+            call $C_PREFIX$_IMPL_BINDINGS_CmdLineArgs_free_(cla)
         end function LIBMUSCLE_Instance_create
 
         """))
@@ -888,7 +890,7 @@ def __copy__(self) -> 'Elements':
         Obj('CmdLineArgs', 'cla'), Obj('PortsDescription', 'ports'),
         Int('flags'), Int('communicator'), Int('root')],
     fc_override=dedent("""\
-        std::intptr_t LIBMUSCLE_Instance_create_(
+        std::intptr_t $C_PREFIX$_Instance_create_(
                 std::intptr_t cla,
                 std::intptr_t ports,
                 int flags,
@@ -924,13 +926,13 @@ def __copy__(self) -> 'Elements':
             character (kind=c_char, len=:), allocatable :: cur_arg
 
             num_args = command_argument_count()
-            cla = LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_(num_args + 1)
+            cla = $C_PREFIX$_IMPL_BINDINGS_CmdLineArgs_create_(num_args + 1)
             do i = 0, num_args
                 call get_command_argument(i, length=arg_len)
                 allocate (character(arg_len+1) :: cur_arg)
                 call get_command_argument(i, value=cur_arg)
                 cur_arg(arg_len+1:arg_len+1) = c_null_char
-                call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_( &
+                call $C_PREFIX$_IMPL_BINDINGS_CmdLineArgs_set_arg_( &
                        cla, i, cur_arg, int(len(cur_arg), c_size_t))
                 deallocate(cur_arg)
             end do
@@ -943,11 +945,11 @@ def __copy__(self) -> 'Elements':
             aroot = 0
             if (present(root)) aroot = root
             LIBMUSCLE_Instance_create%ptr = &
-                LIBMUSCLE_Instance_create_(cla, ports_ptr, iflags, acommunicator, aroot)
-            call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(cla)
+                $C_PREFIX$_Instance_create_(cla, ports_ptr, iflags, acommunicator, aroot)
+            call $C_PREFIX$_IMPL_BINDINGS_CmdLineArgs_free_(cla)
         end function LIBMUSCLE_Instance_create
 
-        """)
+        """)  # noqa: E501
     )
 
 
@@ -1073,12 +1075,12 @@ def __copy__(self) -> 'Elements':
         [
             'ymmsl'],
         [
-            Namespace('libmuscle', True, 'LIBMUSCLE', [
+            Namespace('libmuscle', True, 'LIBMUSCLE', 'LIBMUSCLE', [
                 dataconstref_desc, data_desc, portsdescription_desc,
                 message_desc, instance_desc, instanceflags_desc]),
-            Namespace('libmuscle::impl::bindings', False,
+            Namespace('libmuscle::impl::bindings', False, 'LIBMUSCLE_IMPL_BINDINGS',
                       'LIBMUSCLE_IMPL_BINDINGS', [cmdlineargs_desc]),
-            Namespace('ymmsl', None, 'YMMSL',
+            Namespace('ymmsl', None, 'YMMSL', 'YMMSL',
                       ymmsl_forward_members)
         ])
 
@@ -1094,12 +1096,14 @@ def __copy__(self) -> 'Elements':
         [
             'mpi', 'ymmsl'],
         [
-            Namespace('libmuscle', True, 'LIBMUSCLE', [
-                dataconstref_desc, data_desc, portsdescription_desc,
-                message_desc, instance_mpi_desc, instanceflags_desc]),
-            Namespace('libmuscle::impl::bindings', False,
-                      'LIBMUSCLE_IMPL_BINDINGS', [cmdlineargs_desc]),
-            Namespace('ymmsl', None, 'YMMSL',
+            Namespace('libmuscle', True, 'LIBMUSCLE_MPI', 'LIBMUSCLE', [
+                deepcopy(dataconstref_desc), deepcopy(data_desc),
+                deepcopy(portsdescription_desc), deepcopy(message_desc),
+                deepcopy(instance_mpi_desc), deepcopy(instanceflags_desc)]),
+            Namespace('libmuscle::mpi_impl::bindings', False,
+                      'LIBMUSCLE_MPI_IMPL_BINDINGS', 'LIBMUSCLE_IMPL_BINDINGS',
+                      [deepcopy(cmdlineargs_desc)]),
+            Namespace('ymmsl', None, 'YMMSL', 'YMMSL',
                       ymmsl_forward_members)
         ])
 
@@ -1147,4 +1151,4 @@ def __copy__(self) -> 'Elements':
                     if 'FORTRAN ABI' in line:
                         out_file.write(exports_txt)
                     else:
-                        out_file.write(line)
+                        out_file.write(line.replace("::impl::", "::mpi_impl::"))
diff --git a/scripts/make_ymmsl_api.py b/scripts/make_ymmsl_api.py
index 92fe26e1..97ebfd6b 100755
--- a/scripts/make_ymmsl_api.py
+++ b/scripts/make_ymmsl_api.py
@@ -90,7 +90,7 @@
         [],
         [
             Namespace(
-                'ymmsl', True, 'YMMSL',
+                'ymmsl', True, 'YMMSL', 'YMMSL',
                 [operator_desc, settings_desc]),
         ])
 


Test patch:
diff --git a/libmuscle/cpp/src/libmuscle/tests/mmp_client_test.cpp b/libmuscle/cpp/src/libmuscle/tests/mmp_client_test.cpp
index 27c0550a..940e31b0 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mmp_client_test.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mmp_client_test.cpp
@@ -3,16 +3,17 @@
  */
 #include <libmuscle/logging.hpp>
 #include <libmuscle/mmp_client.hpp>
+#include <libmuscle/namespace.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 #include <cassert>
 #include <tuple>
 
 
-using libmuscle::impl::LogLevel;
-using libmuscle::impl::LogMessage;
-using libmuscle::impl::MMPClient;
-using libmuscle::impl::Timestamp;
+using libmuscle::_MUSCLE_IMPL_NS::LogLevel;
+using libmuscle::_MUSCLE_IMPL_NS::LogMessage;
+using libmuscle::_MUSCLE_IMPL_NS::MMPClient;
+using libmuscle::_MUSCLE_IMPL_NS::Timestamp;
 using ymmsl::Operator;
 using ymmsl::Port;
 using ymmsl::Reference;
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mcp/mock_tcp_transport_server.cpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mcp/mock_tcp_transport_server.cpp
index aa6bce97..6448329e 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mcp/mock_tcp_transport_server.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mcp/mock_tcp_transport_server.cpp
@@ -2,7 +2,7 @@
 
 #include <ymmsl/ymmsl.hpp>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 namespace mcp {
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mcp/mock_tcp_transport_server.hpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mcp/mock_tcp_transport_server.hpp
index b8a0b045..d28b1f6f 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mcp/mock_tcp_transport_server.hpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mcp/mock_tcp_transport_server.hpp
@@ -1,11 +1,12 @@
 #pragma once
 
 #include <libmuscle/mcp/transport_server.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl { namespace mcp {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS { namespace mcp {
 
 class MockTcpTransportServer : public TransportServer {
     public:
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_communicator.cpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_communicator.cpp
index acc20d84..4f287ee5 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_communicator.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_communicator.cpp
@@ -5,9 +5,9 @@
 
 #include <cassert>
 
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::Port;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::Port;
 
 using ymmsl::Conduit;
 using ymmsl::Identifier;
@@ -16,7 +16,7 @@ using ymmsl::Reference;
 using ymmsl::Settings;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 MockCommunicator::MockCommunicator(
         ymmsl::Reference const & kernel,
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_communicator.hpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_communicator.hpp
index d1274eb4..4c288bed 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_communicator.hpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_communicator.hpp
@@ -3,6 +3,7 @@
 #include <libmuscle/data.hpp>
 #include <libmuscle/logger.hpp>
 #include <libmuscle/message.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/peer_manager.hpp>
 #include <libmuscle/port.hpp>
 #include <libmuscle/profiler.hpp>
@@ -16,7 +17,7 @@
 #include <vector>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 using PortsDescription = std::unordered_map<ymmsl::Operator, std::vector<std::string>>;
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_logger.cpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_logger.cpp
index be18a9bc..797c1bd0 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_logger.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_logger.cpp
@@ -1,7 +1,7 @@
 #include "mocks/mock_logger.hpp"
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 MockLogger::MockLogger() {}
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_logger.hpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_logger.hpp
index 1a1345f1..d4be69b5 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_logger.hpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_logger.hpp
@@ -2,9 +2,10 @@
 
 #include <libmuscle/logging.hpp>
 #include <libmuscle/mmp_client.hpp>
+#include <libmuscle/namespace.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 class MockLogger {
     public:
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mmp_client.cpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mmp_client.cpp
index 76bf67e6..0fa14ee8 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mmp_client.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mmp_client.cpp
@@ -7,7 +7,7 @@ using ymmsl::Conduit;
 using ymmsl::Reference;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 MockMMPClient::MockMMPClient(
         Reference const & instance_id, std::string const & location)
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mmp_client.hpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mmp_client.hpp
index 158ec021..e0fa4eb4 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mmp_client.hpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mmp_client.hpp
@@ -6,6 +6,7 @@
 #include <vector>
 
 #include <libmuscle/logging.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/profiling.hpp>
 #include <libmuscle/snapshot.hpp>
 #include <libmuscle/timestamp.hpp>
@@ -14,7 +15,7 @@
 #include <ymmsl/ymmsl.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 class MockMMPClient {
     public:
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mpp_client.cpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mpp_client.cpp
index d5848422..f508ddd5 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mpp_client.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mpp_client.cpp
@@ -10,7 +10,7 @@
 #include <vector>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 MockMPPClient::MockMPPClient(std::vector<std::string> const & locations) {
     ++num_constructed;
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mpp_client.hpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mpp_client.hpp
index 6c4875cb..e6b14ce1 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mpp_client.hpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_mpp_client.hpp
@@ -2,6 +2,7 @@
 
 #include <libmuscle/mpp_message.hpp>
 #include <libmuscle/mcp/transport_client.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/profiling.hpp>
 
 #include <ymmsl/ymmsl.hpp>
@@ -12,7 +13,7 @@
 #include <vector>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 
 using ProfileData = std::tuple<
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_peer_manager.cpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_peer_manager.cpp
index 850d8501..a5032c53 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_peer_manager.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_peer_manager.cpp
@@ -6,7 +6,7 @@ using ymmsl::Identifier;
 using ymmsl::Reference;
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 MockPeerManager::MockPeerManager(
         Reference const & kernel,
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_peer_manager.hpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_peer_manager.hpp
index 231ce403..7edcf609 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_peer_manager.hpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_peer_manager.hpp
@@ -3,13 +3,14 @@
 #include <ymmsl/ymmsl.hpp>
 
 #include <libmuscle/endpoint.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <string>
 #include <unordered_map>
 #include <vector>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 using PeerDims = std::unordered_map<ymmsl::Reference, std::vector<int>>;
 using PeerLocations = std::unordered_map<
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_post_office.cpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_post_office.cpp
index cb6a92d5..028e2c39 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_post_office.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_post_office.cpp
@@ -1,6 +1,6 @@
 #include <mocks/mock_post_office.hpp>
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 int MockPostOffice::handle_request(
         char const * res_buf, std::size_t res_len,
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_post_office.hpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_post_office.hpp
index 9ed502c3..a275ae9d 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_post_office.hpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_post_office.hpp
@@ -5,10 +5,11 @@
 #include <libmuscle/data.hpp>
 #include <libmuscle/mpp_message.hpp>
 #include <libmuscle/mcp/transport_server.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/outbox.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 
 class MockPostOffice : public mcp::RequestHandler {
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_profiler.cpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_profiler.cpp
index 4810bbf6..a6379fe5 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_profiler.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_profiler.cpp
@@ -3,7 +3,7 @@
 #include <libmuscle/mpp_client.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
     MockProfiler::MockProfiler() {};
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_profiler.hpp b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_profiler.hpp
index 9f9a4365..54567abd 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mocks/mock_profiler.hpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mocks/mock_profiler.hpp
@@ -2,9 +2,10 @@
 
 #include <libmuscle/profiling.hpp>
 #include <libmuscle/mmp_client.hpp>
+#include <libmuscle/namespace.hpp>
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 class MockProfiler {
     public:
diff --git a/libmuscle/cpp/src/libmuscle/tests/mpp_client_test.cpp b/libmuscle/cpp/src/libmuscle/tests/mpp_client_test.cpp
index 4b2d1319..9dc523c7 100644
--- a/libmuscle/cpp/src/libmuscle/tests/mpp_client_test.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/mpp_client_test.cpp
@@ -5,6 +5,7 @@
 #include <libmuscle/mcp/data_pack.hpp>
 #include <libmuscle/mpp_message.hpp>
 #include <libmuscle/mpp_client.hpp>
+#include <libmuscle/namespace.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 #include <cassert>
@@ -14,10 +15,10 @@
 #include <msgpack.hpp>
 
 
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::MPPMessage;
-using libmuscle::impl::MPPClient;
-using libmuscle::impl::mcp::unpack_data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::MPPMessage;
+using libmuscle::_MUSCLE_IMPL_NS::MPPClient;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::unpack_data;
 using ymmsl::Reference;
 using ymmsl::Settings;
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/tcp_transport_server_test.cpp b/libmuscle/cpp/src/libmuscle/tests/tcp_transport_server_test.cpp
index 7082a0bc..c98b1490 100644
--- a/libmuscle/cpp/src/libmuscle/tests/tcp_transport_server_test.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/tcp_transport_server_test.cpp
@@ -5,6 +5,7 @@
 #include <libmuscle/mcp/data_pack.hpp>
 #include <libmuscle/mpp_message.hpp>
 #include <libmuscle/mcp/tcp_transport_server.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/post_office.hpp>
 #include <ymmsl/ymmsl.hpp>
 
@@ -16,11 +17,11 @@
 #include <msgpack.hpp>
 
 
-using libmuscle::impl::PostOffice;
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::MPPMessage;
-using libmuscle::impl::mcp::TcpTransportServer;
+using libmuscle::_MUSCLE_IMPL_NS::PostOffice;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::MPPMessage;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::TcpTransportServer;
 using ymmsl::Reference;
 using ymmsl::Settings;
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_api_guard.cpp b/libmuscle/cpp/src/libmuscle/tests/test_api_guard.cpp
index fce068bd..42994ac4 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_api_guard.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_api_guard.cpp
@@ -2,11 +2,13 @@
 
 #include <libmuscle/api_guard.hpp>
 
+#include <libmuscle/namespace.hpp>
+
 #include <vector>
 #include <set>
 
-using libmuscle::impl::APIGuard;
-using libmuscle::impl::APIPhase;
+using libmuscle::_MUSCLE_IMPL_NS::APIGuard;
+using libmuscle::_MUSCLE_IMPL_NS::APIPhase;
 
 int main(int argc, char *argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_checkpoint_triggers.cpp b/libmuscle/cpp/src/libmuscle/tests/test_checkpoint_triggers.cpp
index 9bd9c467..8c6acfb8 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_checkpoint_triggers.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_checkpoint_triggers.cpp
@@ -2,13 +2,14 @@
 
 #include <libmuscle/checkpoint_triggers.hpp>
 
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/mcp/data_pack.hpp>
 
-using libmuscle::impl::TriggerManager;
-using libmuscle::impl::AtCheckpointTrigger;
-using libmuscle::impl::RangeCheckpointTrigger;
-using libmuscle::impl::CombinedCheckpointTriggers;
-using libmuscle::impl::Data;
+using libmuscle::_MUSCLE_IMPL_NS::TriggerManager;
+using libmuscle::_MUSCLE_IMPL_NS::AtCheckpointTrigger;
+using libmuscle::_MUSCLE_IMPL_NS::RangeCheckpointTrigger;
+using libmuscle::_MUSCLE_IMPL_NS::CombinedCheckpointTriggers;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
 
 int main(int argc, char *argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_communicator.cpp b/libmuscle/cpp/src/libmuscle/tests/test_communicator.cpp
index 5a8d94c1..fc34e959 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_communicator.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_communicator.cpp
@@ -38,6 +38,7 @@
 #include <stdexcept>
 #include <gtest/gtest.h>
 #include <libmuscle/communicator.hpp>
+#include <libmuscle/namespace.hpp>
 #include <mocks/mock_mpp_client.hpp>
 #include <mocks/mcp/mock_tcp_transport_server.hpp>
 #include <mocks/mock_logger.hpp>
@@ -45,20 +46,20 @@
 #include <mocks/mock_profiler.hpp>
 
 
-using libmuscle::impl::Communicator;
-using libmuscle::impl::Data;
-using libmuscle::impl::Endpoint;
-using libmuscle::impl::Optional;
-using libmuscle::impl::PeerDims;
-using libmuscle::impl::PeerLocations;
-using libmuscle::impl::PortsDescription;
-using libmuscle::impl::Message;
-using libmuscle::impl::MockLogger;
-using libmuscle::impl::MockPeerManager;
-using libmuscle::impl::MockPostOffice;
-using libmuscle::impl::MockProfiler;
-using libmuscle::impl::MockMPPClient;
-using libmuscle::impl::mcp::MockTcpTransportServer;
+using libmuscle::_MUSCLE_IMPL_NS::Communicator;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::Endpoint;
+using libmuscle::_MUSCLE_IMPL_NS::Optional;
+using libmuscle::_MUSCLE_IMPL_NS::PeerDims;
+using libmuscle::_MUSCLE_IMPL_NS::PeerLocations;
+using libmuscle::_MUSCLE_IMPL_NS::PortsDescription;
+using libmuscle::_MUSCLE_IMPL_NS::Message;
+using libmuscle::_MUSCLE_IMPL_NS::MockLogger;
+using libmuscle::_MUSCLE_IMPL_NS::MockPeerManager;
+using libmuscle::_MUSCLE_IMPL_NS::MockPostOffice;
+using libmuscle::_MUSCLE_IMPL_NS::MockProfiler;
+using libmuscle::_MUSCLE_IMPL_NS::MockMPPClient;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::MockTcpTransportServer;
 
 using ymmsl::Conduit;
 using ymmsl::Reference;
@@ -71,10 +72,10 @@ int main(int argc, char *argv[]) {
 
 
 // Helpers for accessing internal state
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 struct TestCommunicator {
-    static std::unordered_map<std::string, libmuscle::impl::Port> const & ports_(
+    static std::unordered_map<std::string, libmuscle::_MUSCLE_IMPL_NS::Port> const & ports_(
             Communicator const & comm)
     {
         return comm.ports_;
@@ -83,7 +84,7 @@ struct TestCommunicator {
 
 } }
 
-using libmuscle::impl::TestCommunicator;
+using libmuscle::_MUSCLE_IMPL_NS::TestCommunicator;
 
 
 /* Mocks have internal state, which needs to be reset before each test. This
@@ -525,7 +526,7 @@ TEST(libmuscle_communicator, close_port) {
             MockPostOffice::last_message->timestamp,
             std::numeric_limits<double>::infinity());
     ASSERT_FALSE(MockPostOffice::last_message->next_timestamp.is_set());
-    ASSERT_TRUE(libmuscle::impl::is_close_port(MockPostOffice::last_message->data));
+    ASSERT_TRUE(libmuscle::_MUSCLE_IMPL_NS::is_close_port(MockPostOffice::last_message->data));
 }
 
 TEST(libmuscle_communicator, receive_message) {
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_data.cpp b/libmuscle/cpp/src/libmuscle/tests/test_data.cpp
index 0b3419ac..5e46054b 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_data.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_data.cpp
@@ -1,5 +1,6 @@
 #include "libmuscle/data.hpp"
 #include "libmuscle/mcp/data_pack.hpp"
+#include <libmuscle/namespace.hpp>
 
 #include <ymmsl/ymmsl.hpp>
 
@@ -10,10 +11,10 @@
 #include <msgpack.hpp>
 
 
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::mcp::unpack_data;
-using libmuscle::impl::StorageOrder;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::unpack_data;
+using libmuscle::_MUSCLE_IMPL_NS::StorageOrder;
 using ymmsl::SettingValue;
 using ymmsl::Settings;
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_data_memory_use.cpp b/libmuscle/cpp/src/libmuscle/tests/test_data_memory_use.cpp
index e4913fcd..885f808b 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_data_memory_use.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_data_memory_use.cpp
@@ -1,5 +1,6 @@
 #include "libmuscle/data.hpp"
 #include "libmuscle/mcp/data_pack.hpp"
+#include <libmuscle/namespace.hpp>
 
 #include <cstddef>
 #include <cstdio>
@@ -13,7 +14,7 @@
 #include <gtest/gtest.h>
 
 
-using libmuscle::impl::Data;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
 
 
 int main(int argc, char *argv[]) {
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_instance.cpp b/libmuscle/cpp/src/libmuscle/tests/test_instance.cpp
index f462facb..a714eebe 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_instance.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_instance.cpp
@@ -32,16 +32,17 @@
 #include <gtest/gtest.h>
 
 #include <libmuscle/instance.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/settings_manager.hpp>
 #include <mocks/mock_communicator.hpp>
 
-using libmuscle::impl::ClosePort;
-using libmuscle::impl::Instance;
-using libmuscle::impl::InstanceFlags;
-using libmuscle::impl::Message;
-using libmuscle::impl::MockCommunicator;
-using libmuscle::impl::MockMMPClient;
-using libmuscle::impl::PortsDescription;
+using libmuscle::_MUSCLE_IMPL_NS::ClosePort;
+using libmuscle::_MUSCLE_IMPL_NS::Instance;
+using libmuscle::_MUSCLE_IMPL_NS::InstanceFlags;
+using libmuscle::_MUSCLE_IMPL_NS::Message;
+using libmuscle::_MUSCLE_IMPL_NS::MockCommunicator;
+using libmuscle::_MUSCLE_IMPL_NS::MockMMPClient;
+using libmuscle::_MUSCLE_IMPL_NS::PortsDescription;
 
 using ymmsl::Reference;
 
@@ -53,7 +54,7 @@ int main(int argc, char *argv[]) {
 
 
 // Helpers for accessing internal state
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 struct TestInstance {
     static Reference & instance_name_(Instance & instance) {
@@ -67,7 +68,7 @@ struct TestInstance {
 
 } }
 
-using libmuscle::impl::TestInstance;
+using libmuscle::_MUSCLE_IMPL_NS::TestInstance;
 
 /* Mocks have internal state, which needs to be reset before each test. This
  * means that the tests are not reentrant, and cannot be run in parallel.
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_logger.cpp b/libmuscle/cpp/src/libmuscle/tests/test_logger.cpp
index 6d1c11b4..7aff2e6b 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_logger.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_logger.cpp
@@ -13,13 +13,14 @@
 // Test code dependencies
 #include <libmuscle/logger.hpp>
 #include <libmuscle/logging.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <gtest/gtest.h>
 
 
-using libmuscle::impl::Logger;
-using libmuscle::impl::LogLevel;
-using libmuscle::impl::MockMMPClient;
+using libmuscle::_MUSCLE_IMPL_NS::Logger;
+using libmuscle::_MUSCLE_IMPL_NS::LogLevel;
+using libmuscle::_MUSCLE_IMPL_NS::MockMMPClient;
 using ymmsl::Reference;
 
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_mpp_message.cpp b/libmuscle/cpp/src/libmuscle/tests/test_mpp_message.cpp
index cebcedd5..ea08f848 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_mpp_message.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_mpp_message.cpp
@@ -5,14 +5,15 @@
 
 #include <libmuscle/data.hpp>
 #include <libmuscle/mcp/data_pack.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/util.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 #include <utility>
 
 
-using libmuscle::impl::Data;
-using libmuscle::impl::MPPMessage;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::MPPMessage;
 using ymmsl::Reference;
 
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_outbox.cpp b/libmuscle/cpp/src/libmuscle/tests/test_outbox.cpp
index e98bd423..7b2ddb24 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_outbox.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_outbox.cpp
@@ -7,13 +7,14 @@
 #include <libmuscle/util.hpp>
 #include <libmuscle/data.hpp>
 #include <libmuscle/mpp_message.hpp>
+#include <libmuscle/namespace.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::Optional;
-using libmuscle::impl::Outbox;
-using libmuscle::impl::MPPMessage;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::Optional;
+using libmuscle::_MUSCLE_IMPL_NS::Outbox;
+using libmuscle::_MUSCLE_IMPL_NS::MPPMessage;
 using ymmsl::Reference;
 
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_peer_manager.cpp b/libmuscle/cpp/src/libmuscle/tests/test_peer_manager.cpp
index eee0977a..f02aac9c 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_peer_manager.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_peer_manager.cpp
@@ -1,5 +1,6 @@
 #include "libmuscle/peer_manager.hpp"
 
+#include <libmuscle/namespace.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 #include <memory>
@@ -7,9 +8,9 @@
 #include <gtest/gtest.h>
 
 
-using libmuscle::impl::PeerDims;
-using libmuscle::impl::PeerLocations;
-using libmuscle::impl::PeerManager;
+using libmuscle::_MUSCLE_IMPL_NS::PeerDims;
+using libmuscle::_MUSCLE_IMPL_NS::PeerLocations;
+using libmuscle::_MUSCLE_IMPL_NS::PeerManager;
 using ymmsl::Conduit;
 using ymmsl::Reference;
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_port.cpp b/libmuscle/cpp/src/libmuscle/tests/test_port.cpp
index 73c4fe71..5452ec34 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_port.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_port.cpp
@@ -2,11 +2,12 @@
 
 #include <gtest/gtest.h>
 
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/port.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 
-using libmuscle::impl::Port;
+using libmuscle::_MUSCLE_IMPL_NS::Port;
 using ymmsl::Identifier;
 using ymmsl::Operator;
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_post_office.cpp b/libmuscle/cpp/src/libmuscle/tests/test_post_office.cpp
index bf6981d8..354cba50 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_post_office.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_post_office.cpp
@@ -13,16 +13,17 @@
 #include <libmuscle/mcp/data_pack.hpp>
 #include <libmuscle/mcp/protocol.hpp>
 #include <libmuscle/mpp_message.hpp>
+#include <libmuscle/namespace.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::Optional;
-using libmuscle::impl::Outbox;
-using libmuscle::impl::PostOffice;
-using libmuscle::impl::RequestType;
-using libmuscle::impl::MPPMessage;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::Optional;
+using libmuscle::_MUSCLE_IMPL_NS::Outbox;
+using libmuscle::_MUSCLE_IMPL_NS::PostOffice;
+using libmuscle::_MUSCLE_IMPL_NS::RequestType;
+using libmuscle::_MUSCLE_IMPL_NS::MPPMessage;
 using ymmsl::Reference;
 
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_profiler.cpp b/libmuscle/cpp/src/libmuscle/tests/test_profiler.cpp
index c1a1b0a2..6b5e9c78 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_profiler.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_profiler.cpp
@@ -11,6 +11,7 @@
 
 
 // Test code dependencies
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/profiler.hpp>
 #include <libmuscle/profiling.hpp>
 
@@ -18,11 +19,11 @@
 #include <gtest/gtest.h>
 
 
-using libmuscle::impl::Profiler;
-using libmuscle::impl::ProfileEvent;
-using libmuscle::impl::ProfileEventType;
-using libmuscle::impl::ProfileTimestamp;
-using libmuscle::impl::MockMMPClient;
+using libmuscle::_MUSCLE_IMPL_NS::Profiler;
+using libmuscle::_MUSCLE_IMPL_NS::ProfileEvent;
+using libmuscle::_MUSCLE_IMPL_NS::ProfileEventType;
+using libmuscle::_MUSCLE_IMPL_NS::ProfileTimestamp;
+using libmuscle::_MUSCLE_IMPL_NS::MockMMPClient;
 using ymmsl::Port;
 
 
@@ -32,7 +33,7 @@ int main(int argc, char *argv[]) {
 }
 
 
-namespace libmuscle { namespace impl {
+namespace libmuscle { namespace _MUSCLE_IMPL_NS {
 
 // Helper for accessing internal state
 
@@ -86,7 +87,7 @@ bool operator==(ProfileEvent const & lhs, ProfileEvent const & rhs) {
 
 } }
 
-using libmuscle::impl::TestProfiler;
+using libmuscle::_MUSCLE_IMPL_NS::TestProfiler;
 
 
 /* Mocks have internal state, which needs to be reset before each test. This
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_settings_manager.cpp b/libmuscle/cpp/src/libmuscle/tests/test_settings_manager.cpp
index e52d1ed9..223726dd 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_settings_manager.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_settings_manager.cpp
@@ -4,11 +4,12 @@
 
 #include <gtest/gtest.h>
 
+#include <libmuscle/namespace.hpp>
 #include <ymmsl/ymmsl.hpp>
 
 
 using namespace std::string_literals;
-using libmuscle::impl::SettingsManager;
+using libmuscle::_MUSCLE_IMPL_NS::SettingsManager;
 using ymmsl::Reference;
 using ymmsl::Settings;
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_snapshot.cpp b/libmuscle/cpp/src/libmuscle/tests/test_snapshot.cpp
index 5d1516ef..ae67e1b0 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_snapshot.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_snapshot.cpp
@@ -1,12 +1,13 @@
 #include <gtest/gtest.h>
 
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/snapshot.hpp>
 
-using libmuscle::impl::Data;
-using libmuscle::impl::Message;
-using libmuscle::impl::Optional;
-using libmuscle::impl::Snapshot;
-using libmuscle::impl::SnapshotMetadata;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::Message;
+using libmuscle::_MUSCLE_IMPL_NS::Optional;
+using libmuscle::_MUSCLE_IMPL_NS::Snapshot;
+using libmuscle::_MUSCLE_IMPL_NS::SnapshotMetadata;
 
 int main(int argc, char *argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_snapshot_manager.cpp b/libmuscle/cpp/src/libmuscle/tests/test_snapshot_manager.cpp
index 7c787eba..2eaa2b87 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_snapshot_manager.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_snapshot_manager.cpp
@@ -32,6 +32,7 @@
 #include <typeinfo>
 
 #include <gtest/gtest.h>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/snapshot_manager.hpp>
 
 // Note: using POSIX for filesystem calls
@@ -44,16 +45,16 @@
 #include <unistd.h>
 #include <ftw.h>
 
-using libmuscle::impl::Data;
-using libmuscle::impl::Message;
-using libmuscle::impl::MockCommunicator;
-using libmuscle::impl::MockLogger;
-using libmuscle::impl::MockMMPClient;
-using libmuscle::impl::MockProfiler;
-using libmuscle::impl::Optional;
-using libmuscle::impl::Snapshot;
-using libmuscle::impl::SnapshotMetadata;
-using libmuscle::impl::SnapshotManager;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::Message;
+using libmuscle::_MUSCLE_IMPL_NS::MockCommunicator;
+using libmuscle::_MUSCLE_IMPL_NS::MockLogger;
+using libmuscle::_MUSCLE_IMPL_NS::MockMMPClient;
+using libmuscle::_MUSCLE_IMPL_NS::MockProfiler;
+using libmuscle::_MUSCLE_IMPL_NS::Optional;
+using libmuscle::_MUSCLE_IMPL_NS::Snapshot;
+using libmuscle::_MUSCLE_IMPL_NS::SnapshotMetadata;
+using libmuscle::_MUSCLE_IMPL_NS::SnapshotManager;
 using ymmsl::Reference;
 
 int main(int argc, char *argv[]) {
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_tcp_communication.cpp b/libmuscle/cpp/src/libmuscle/tests/test_tcp_communication.cpp
index 6d70fbc2..02b41fdd 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_tcp_communication.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_tcp_communication.cpp
@@ -6,6 +6,7 @@
 #include <libmuscle/mpp_client.hpp>
 
 #include <libmuscle/data.hpp>
+#include <libmuscle/namespace.hpp>
 #include <libmuscle/post_office.hpp>
 #include <libmuscle/util.hpp>
 #include <ymmsl/ymmsl.hpp>
@@ -14,12 +15,12 @@
 #include <utility>
 
 
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::MPPMessage;
-using libmuscle::impl::MPPClient;
-using libmuscle::impl::mcp::TcpTransportServer;
-using libmuscle::impl::PostOffice;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::MPPMessage;
+using libmuscle::_MUSCLE_IMPL_NS::MPPClient;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::TcpTransportServer;
+using libmuscle::_MUSCLE_IMPL_NS::PostOffice;
 
 using ymmsl::Reference;
 
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_tcp_transport.cpp b/libmuscle/cpp/src/libmuscle/tests/test_tcp_transport.cpp
index 4f084a24..adb7d4db 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_tcp_transport.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_tcp_transport.cpp
@@ -4,6 +4,7 @@
 #include <libmuscle/mcp/transport_server.hpp>
 #include <libmuscle/mcp/tcp_transport_client.hpp>
 #include <libmuscle/mcp/tcp_transport_server.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <msgpack.hpp>
 
@@ -14,11 +15,11 @@
 #include <vector>
 
 
-using libmuscle::impl::Data;
-using libmuscle::impl::DataConstRef;
-using libmuscle::impl::mcp::RequestHandler;
-using libmuscle::impl::mcp::TcpTransportClient;
-using libmuscle::impl::mcp::TcpTransportServer;
+using libmuscle::_MUSCLE_IMPL_NS::Data;
+using libmuscle::_MUSCLE_IMPL_NS::DataConstRef;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::RequestHandler;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::TcpTransportClient;
+using libmuscle::_MUSCLE_IMPL_NS::mcp::TcpTransportServer;
 
 
 int main(int argc, char *argv[]) {
diff --git a/libmuscle/cpp/src/libmuscle/tests/test_util.cpp b/libmuscle/cpp/src/libmuscle/tests/test_util.cpp
index 18106df9..db34eb62 100644
--- a/libmuscle/cpp/src/libmuscle/tests/test_util.cpp
+++ b/libmuscle/cpp/src/libmuscle/tests/test_util.cpp
@@ -1,11 +1,12 @@
 #include <libmuscle/util.hpp>
+#include <libmuscle/namespace.hpp>
 
 #include <utility>
 
 #include <gtest/gtest.h>
 
 
-using libmuscle::impl::Optional;
+using libmuscle::_MUSCLE_IMPL_NS::Optional;
 
 
 // Note: do not run in parallel, OptMock has static members that are reused
diff --git a/scripts/tests/make_echolib_api.py b/scripts/tests/make_echolib_api.py
index c07ba9bf..717fe50d 100755
--- a/scripts/tests/make_echolib_api.py
+++ b/scripts/tests/make_echolib_api.py
@@ -82,8 +82,8 @@
             'vector'],
         [],
         [
-            Namespace('echolib', True, 'ECHO', [color_desc, echo_desc]),
-            Namespace('echolib::impl', False, 'ECHO_impl',
+            Namespace('echolib', True, 'ECHO', 'ECHO', [color_desc, echo_desc]),
+            Namespace('echolib::impl', False, 'ECHO_impl', 'ECHO_impl',
                       [cmdlineargs_desc])
             ])