openucx / ucx

Unified Communication X (mailing list - https://elist.ornl.gov/mailman/listinfo/ucx-group)
http://www.openucx.org
Other
1.15k stars 425 forks source link

Proposal to add external ucx detection for spack #8497

Open RichardYCJ opened 2 years ago

RichardYCJ commented 2 years ago

Hi @hppritcha,

I'm wondering if it is possible to add spec detection for external ucx by spack.

Since sometimes the library is provided by hardware manufacturer with optimized configuration, say embedded in NVidia OFED/HPCX toolkit. And I'd prefer to reuse it to build my own MPI. But spack requires the detailed variants of ucx packages to build, some may not but whether it is +thread_multiple is important in case to build with multi-thread support.

Technically speaking, I think it is doable cuz ucx_info -b can provide most of the info about the variants.

Though I'm not a spack developer, here's a brief intro to add external detection support in case you need it. A global attribute executables should first be declared to search for (say "^ucx_info$") in the bash environment, and then an method called determine_variants should be implemented to check and return the variants.

A somewhat detailed tutorial can be find here and there're also good examples in the spack buildin packages like openmpi/package.py.

hppritcha commented 2 years ago

yes this would be a good idea to add to ucx package.

hppritcha commented 2 years ago

i'm assigning to myself but it will be on the lower end of my priority queue, so if someone else wants to take it that would be great.

RichardYCJ commented 2 years ago

Good to here that, I might also give it a try. But since I'm neither a spack nor ucx developer. I might take some time to do so.