The now standard way of doing this is with control variables (CVARs). These are all implementation specific, so you'll have to look in the documentation for your particular library. Often, these can be set with an environment variable.
For example, in MPICH 3.2, there is an environment variable called MPIR_CVAR_ASYNC_PROGRESS
that allows you to turn on and off asynchronous progress at runtime. These things are documented in the tarball in a file called README.envvar
.
These things will not be consistent between implementations so you'll have to be careful about names depending on where you are running. For instance, in Open MPI, I'd imagine that most of these environment variables will be prefixed with something like OMPI_something
since that's more in line with the naming scheme used by that project.