-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[openblas] Make build_lapack=True default for >= 0.3.21 #20894
[openblas] Make build_lapack=True default for >= 0.3.21 #20894
Conversation
Version 0.3.21 of openblas introduced the ability to build lapack from C. Make this default to enable CCI recipes to use lapack when depending on openblas. Additionally, fix an inconsistency in version constraint. Review was provided in conan-io#19808 to constrain it to 0.3.24 as this was the latest version available in CCI. However, the constraint on building lapack really applies to anything newer than 0.3.21, so this is the most appropriate model for the logic. Not modelling this accurately precludes the correct behaviour if intermediate versions are added at a later date. Closes conan-io#7361
I detected other pull requests that are modifying openblas/all recipe:
This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
This comment has been minimized.
This comment has been minimized.
Modifying defaults in configure is now prohibited and should be done in config_options instead.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@uilianries any idea what's going on with CI here? |
This comment has been minimized.
This comment has been minimized.
@samuel-emrys Could you please, show a link or document proving that support, just in case? |
@uilianries this PR only makes the lapack build default. Support for building lapack from C was approved by yourself in #19808:
From the v0.3.21 release notes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not confident accepting this PR now, because there is no fortran support when building this package in CCI:
The version 0.3.24 will build with lapack, but no fortran is available, so the generated package is not good, someone will open an issue complaining about this lack of support for sure.
I'll check with Conan team to include fortran to Linux docker images, at least, we could solve it partially.
@uilianries I'm not sure I follow what you mean. What are you drawing attention to in those logs? All that related to fortran that I could find was this:
which is the point of this PR. We can remove any dependency on fortran by building lapack from C sources. I'm not sure why anybody would complain, as it's reasonably easy to trigger a fortran build by defining the conan-center-index/recipes/openblas/all/conanfile.py Lines 40 to 44 in e354330
#19808 removed the dependence on fortran so that we can build lapack with a C++ only toolchain - this seems to be the most desirable solution to me - what am I missing? Lack of lapack support on CCI due to lack of a fortran compiler has been an ongoing issue for years now (#5260, #15556). I would really rather solve this with the simplest solution we have which is to build it from C. It's not perfect - it version locks lapack to 3.9.0, but it gives CCI minimum viability uniformly across all operating systems. Other math packages only provide limited utility without lapack, such as armadillo. If we can explore adding fortran compilers to conan CI infrastructure to add a proper lapack recipe or build it here, that would be good as well, but I strongly suggest we should go for the quick win here. |
@uilianries can you engage on this more/elaborate on your reasoning? it doesn't make a lot of sense to me and having lapack available is a critical requirement for math libraries in CCI. cc @RubenRBS @memsharded |
@samuel-emrys indeed is a problem also related to the CI. I'll take a look to provide fortran via Docker images, so it should be able to build anything. Some images are prepared already (conanio/gcc11-ubuntu16.04), but Clang images need and extra build (checking to use llvm flang). For legacy images will be more complicated, because some of them are using ubuntu-toolchain-r or llvm repository and fortran is not always available. |
@uilianries understood, but this is a conversation we've been having for approx 2 years.. I'm not sure I understand the issue you have with the above solution of removing any Fortran requirement from building lapack in openblas - can you elaborate on that? |
Adding fortran support to conan ci's is a good idea and is something that should be progressed independently of this PR, but it does open a can of worms with respect to binary compatibility - conan doesn't currently have a way to describe the ABI or runtime requirements that building a package with ifort or gfortran implies. Building the fortran components from sources that have been converted to C really is the best way forward here in my opinion, because none of those ABI considerations will factor in here - it becomes a plain C library. This is what we want as default wherever possible until conan has the features to support polyglot considerations. |
@uilianries @RubenRBS what's the best way to have a conversation about this and/or an alternate pathway to getting lapack/other fortran libs on cci? Here or slack? I don't understand the rationale for not accepting this - this seems to be the best solution for conan because it bypasses the fortran requirement entirely, and this has been an ongoing issue for years (#5260, #15556) - getting a resolution here would be good and would enable a number of scientific computing libraries to work unimpeded. // cc @memsharded |
Just to be clear in case it was missed above, the reason I'm confused is that from the release notes:
This means that the sources have been converted from fortran to c, so this change triggers a build from the C sources only by default, meaning that there's no dependency on fortran at all here - this is essentially a C library, which sidesteps the problem of using fortran at all. I would imagine is the easiest path forward for conan-center-index. |
Co-authored-by: Uilian Ries <uilianries@gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
* Patch versions earlier than 0.3.24 to include hotfix of OpenMathLib/OpenBLAS#4142, which fixes detection of the armv8 architecture to ARM64 from ARM. * Refactor patches into a _patch_sources method
These failures are as a result of d34e4a1, which introduces a native Macos armv8 runner to the c3i build matrix. armv8 builds of openblas have to date, only been explicitly disallowed for cross builds, and so an "invalid" configuration has made it through here and is causing failures. I've attempted to add armv8 compatibility in this PR (by hotfixing OpenMathLib/OpenBLAS#4142 This also relates to #21485 |
This comment has been minimized.
This comment has been minimized.
* armv8 is not currently supported by versions lower than 0.3.24 due to a bug in the cpu architecture identification erroneously identifying a 32 bit architecture instead of 64.
This comment has been minimized.
This comment has been minimized.
… lapack This check was erroneously removed when the note about an f2c converted copy of lapack being used was added. The f2c version of lapack is only available for versions greater than or equal to 0.3.21, and versions lower than this should not build lapack by default.
Conan v1 pipeline ✔️All green in build 12 (
Conan v2 pipeline ✔️
All green in build 12 (
|
I've reverted the changes to add armv8 compatibility as they weren't immediately working (and they're beyond the scope of this PR), and I've added an additional exclusion for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Openblas now builds lapack by default for versions >= 0.3.25 as of conan-io#20894. Change the armadillo default to use openblas as lapack provider to make armadillo useful for default build configurations. * Bump openblas and hdf5 dependencies
* Openblas now builds lapack by default for versions >= 0.3.25 as of #20894. Change the armadillo default to use openblas as lapack provider to make armadillo useful for default build configurations. * Bump openblas and hdf5 dependencies
Version 0.3.21 of openblas introduced the ability to build lapack from C. Make this default to enable CCI recipes to use lapack when depending on openblas.
Additionally, fix an inconsistency in version constraint. Review was provided in #19808 to constrain it to 0.3.24 as this was the latest version available in CCI. However, functionality to build lapack was added in 0.3.21, so it doesn't really make sense to exclude versions between 0.3.21 and 0.3.24 from building lapack should they be added at a later date.
Closes #7361
Specify library name and version: openblas/0.3.24