What you have basically in both Boost and mpi4py is just embedded Openmpi.
IMO since mpi is straightforward (mostly just pragmas) in C/C++ you can tweak things
merely by either recompiling with -D to define some things or actually read in command line arguments.
See here for libraries and documentation:
Open MPI: Open Source High Performance Computing