Skip to content

BML (and BTL) framework(s) initialized even when they are not used #5599

@jsquyres

Description

@jsquyres

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():

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()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions