Skip to content

Conversation

@wckzhang
Copy link
Contributor

By default, dso component loading failure is printed out. This
is not an unexpected case (For example, if a component does not
have access to a library.so on runtime). Thus we bump the
verbosity level to have this warning be silenced by default.

Signed-off-by: William Zhang [email protected]

By default, dso component loading failure is printed out. This
is not an unexpected case (For example, if a component does not
have access to a library.so on runtime). Thus we bump the
verbosity level to have this warning be silenced by default.

Signed-off-by: William Zhang <[email protected]>
@wckzhang
Copy link
Contributor Author

I can also change the other verbosity's in this file (they're all at 0) if someone wants it

Copy link
Member

@hppritcha hppritcha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct. the second arg to opal_output_verbose is the output id, the first arg is the verbosity level.

Also, it looks like someone arranged it so these dlopen failures are chatty by default. I notice there's a opal_mca_base_component_show_load_errors parameter that can be set to turn off this chattiness.

@gpaulsen
Copy link
Member

How does this PR interact with the existing OMPI_MCA_mca_base_component_show_load_errors mca parameter that's used in the v4.x series specifically for showing dlopen loading errors?

Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not agree with this PR: the verbosity is intentionally set to show by default when components that exist on the system are unable to be loaded due to an error at run time (e.g., if a dependent library that cannot be found prevents a DSO component from being loaded). This was done this way intentionally because:

  1. We had users who didn't have dependent libraries setup properly (e.g., missing some network stack libraries on compute nodes) unexpectedly get lower performance because Open MPI fell back to the TCP BTL. When no warning was emitted, the user had no idea that their high-performance / HPC-class network wasn't being used because of a library error. Emitting the warning tells users when this happens.
  2. In general, if a DSO component exists, it means that it was successfully built and installed (e.g., support headers and libraries were found during configure and make). Meaning: someone probably intended that this DSO component should be used. Hence, it's reasonable to believe that it's unexpected if this DSO component can't be used at run time. Therefore, we should warn about it.
    • The warning message says that the DSO is ignored, and therefore execution continues. Clearly: this is a warning, not an error. That being said, if you'd like to improve the message, such as by making it more explicit that this is a non-fatal warning yadda yadda yadda, no problem -- please alter this PR to do that (but not change the verbosity level).
  3. As @hppritcha mentioned:
    • This PR doesn't change the verbosity; it changes the stream ID. That seems like the wrong thing.
    • There are multiple ways to disable this message at run time, if, indeed, the user doesn't care that it will fail to be loaded. For example, you can set mca_base_component_show_load_errors to false. Or you could set the component in question to be excluded. Either of these actions are something that a human can do to explicitly tell Open MPI "I don't care if DSOs fail to load; don't warn me."

@wckzhang
Copy link
Contributor Author

ACK on the stream ID vs verbosity level.

@jsquyres For #2, I thought a usage was for package managers to only ship one build that would have their components built out, ie. (cuda, rocm, libfabric, ucx, etc.), but the systems they run on would not necessarily have any of those libraries available. Are we going with the philosophy that if a dso is built, all its dependencies are intended to exist?

@jsquyres
Copy link
Member

Are we going with the philosophy that if a dso is built, all its dependencies are intended to exist?

Yes.

If a packager builds an Open MPI DSO, they will list all the dependencies of that DSO as requirements for that package. E.g., if Linux distro XYZ builds openmpi.package with OFI support (i.e., the OFI DSOs exist in openmpi.package), then I would expect the packager to also list the XYZ distro package containing libfabric.so* as a requirement for openmpi.package. Hence, installing openmpi.package should also install (for example) libfabric.package, which will then make libfabric.so* be available, and therefore Open MPI's ofi components should have what they need to load successfully at run time.

(this is a somewhat simplistic example where Open MPI's ofi component only needs libfabric.so, but you get the general idea)

If packagers don't list dependencies like this, I would consider that a bug in the package.

@edgargabriel
Copy link
Member

edgargabriel commented Aug 30, 2022

I am pretty sure that this will not work in that case with the accelerator framework. If a packager compiles e.g. Open MPI with cuda+rocm support, there will be no platform out there that fulfills both requirements, they will have either/or. In that case this goes against the main idea and benefit of the accelerator framework.

@wckzhang
Copy link
Contributor Author

@jsquyres the main motivation of this change is as Edgar mentions, the accelerator framework. We currently during runtime do search and dlopen which avoids this issue, but if we want to get rid of the dlopen code and have the components built as dso's, this behavior would encounter these warnings

@jsquyres
Copy link
Member

jsquyres commented Sep 1, 2022

@bwbarrett and I chatted about this yesterday. Is there a reason that the accelerator framework components are doing their own dlopen'ing of their dependent libraries, rather than linking them in at build time and letting the run-time linker handle the finding/opening of the dependent libraries (like all other components in Open MPI)?

I am pretty sure that this will not work in that case with the accelerator framework. If a packager compiles e.g. Open MPI with cuda+rocm support, there will be no platform out there that fulfills both requirements, they will have either/or. In that case this goes against the main idea and benefit of the accelerator framework.

I do not think that this is the case.

Do Linux distros have packages for CUDA and/or ROCM? I don't know how CUDA/ROCM are licensed, but I suspect that Linux distros may not have packages for them because of licensing issues. In that case, the Linux distro Open MPI package won't be built for CUDA or ROCM, either. Hence, it won't be an issue in this case.

But let's assume that Packager ABC builds an Open MPI package with both CUDA and ROCM support. That means that when the ABC Open MPI package was built, both CUDA and ROCM were installed and available (so that Open MPI could find CUDA/ROCM header files and libraries). The ABC Open MPI package will therefore list both CUDA and ROCM as dependent packages. Hence, when a user installs the ABC Open MPI package, it will also install the CUDA and ROCM packages, and therefore everything will work fine. Meaning:

  • The ROCM component should successfully load. If the user has no ROCM-capable hardware, the ROCM component should disqualify itself at run time (with no error).
  • The CUDA component should successfully load. If the user has no CUDA-capable hardware, the CUDA component should disqualify itself at run time (with no error).

This is how all the other frameworks operate in Open MPI. Is there a reason to make the accelerator framework and/or components operate differently?

@jsquyres
Copy link
Member

jsquyres commented Sep 1, 2022

I neglected to mention the self-built/installed case.

When a user builds their own Open MPI (vs. using a pre-built package), they typically build the components that are needed for their system. E.g., if they have CUDA-capable hardware, they should have the CUDA headers + libraries installed, which will allow Open MPI to build the CUDA accelerator component. If they have no ROCM-capable hardware, they won't have ROCM headers + libraries, and therefore the ROCM accelerator component won't be built. Hence, there's an element of component self-selection when building Open MPI for a specific system/cluster/environment.

All this being said, perhaps I'm totally missing your point. If you want to get on the phone at discuss, we can certainly do that.

@wckzhang
Copy link
Contributor Author

wckzhang commented Sep 1, 2022

Had some offline discussion with Jeff, might pursue some other ways to get the behavior I'm looking for. Closing this PR.

@wckzhang wckzhang closed this Sep 1, 2022
@edgargabriel
Copy link
Member

edgargabriel commented Sep 2, 2022 via email

@edgargabriel
Copy link
Member

edgargabriel commented Sep 2, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants