-
Notifications
You must be signed in to change notification settings - Fork 936
Description
I have noticed that the BML framework (and therefore also the BTL framework) is initialized even when it is not used. This didn't use to be an issue when the only PML available was ob1, but now there are several PMLs / OSCs available that don't use BMLs or BTLs.
For example:
$ mpirun --mca pml ucx --mca osc ucx ...
Am I correct in thinking that the above example should not use BMLs or BTLs?
I ask because I notice that the BML framework is unconditionally initialized in ompi_mpi_init():
ompi/ompi/runtime/ompi_mpi_init.c
Lines 609 to 616 in a0ea197
| if (OMPI_SUCCESS != (ret = mca_base_framework_open(&ompi_bml_base_framework, 0))) { | |
| error = "mca_bml_base_open() failed"; | |
| goto error; | |
| } | |
| if (OMPI_SUCCESS != (ret = mca_bml_base_init (1, ompi_mpi_thread_multiple))) { | |
| error = "mca_bml_base_init() failed"; | |
| goto error; | |
| } |
Opening the BML framework causes the r2 component to be initialized, which then opens the BTL framework, which then causes all the BTL components to be initialized.
Can the BML and BTL frameworks be opened lazily / only if they are really needed? E.g., only open the BML framework if ob1 is used (is BML used anywhere else?), and only open the BTL framework from BML r2 and/or OSC rdma (and/or anywhere else BTLs are used)?
Or is there a reason we unconditionally initialize the BML in ompi_mpi_init()?