Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jsquyres opened this issue Aug 25, 2018 · 1 comment
Open

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

jsquyres opened this issue Aug 25, 2018 · 1 comment
Labels

Comments

@jsquyres
Copy link
Member

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

@bwbarrett
Copy link
Member

At one point, the BML initialized critical pieces of the ompi_proc_t structure. It's possible with the move to lazy initialization of peer data structures that we don't have the bad abstraction breaks that we once did, but my guess is that this is more than just an if statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants