-
Notifications
You must be signed in to change notification settings - Fork 315
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
[LinearSolver.Direct] Fix metis dependency #4450
[LinearSolver.Direct] Fix metis dependency #4450
Conversation
Yes, I don't have the exact commit but, after the version 5.1.0, some changes lead to a crash. Before the changes, it works. Note also that the version number (in the code) has not been updated properly along the history of the repository: KarypisLab/METIS@f5ae915. It went from 5.1.0 to 5.2.1, whereas there is a 5.1.1 release. Finally, less importantly, in SOFA we need a portable random generator in METIS for reproductible results. It is enabled via a compilation option |
[ci-build][with-all-tests] |
The bug introduced in metis somewhere between v5.1.0 and v5.2.1 looks similar to conda-forge/gtsam-feedstock#21. |
@bakpaul This would mean that you don't need to port v5.1.0 branch on your fork, we would rely on v5.2.1 both for external package (including conda) and for the fetch of your fork, which already has a v5.2.1 branch. |
@bakpaul I'm afraid the current PR to have a metis 5.2.1 package on conda-forge (conda-forge/metis-feedstock#41) is stalling... and as the official repository is not active anymore (PR not merged anymore neither) and the official build chain is broken, it can take a lot of time before a 5.2.1 comes up on conda-forge. |
I've added the |
message(SEND_ERROR "Metis version ${Metis_VERSION} found in ${Metis_INCLUDE_DIR}, " | ||
"but exact version ${Metis_FIND_VERSION} is required") | ||
endif() | ||
# message(STATUS "Metis version found: ${Metis_VERSION} in ${Metis_INCLUDE_DIR}, ${Metis_FIND_VERSION} was required ") |
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.
Do you want to message or not? If not, please remove this line
We will also need to install metis library to distribute it with the binaries. I didn't have time to make it work, I'll try tomorrow. |
[ci-build][with-all-tests][force-full-build] |
This reverts commit 71baa47.
So now the linkage of metis is PRIVATE in One problem is that FetchContent_MakeAvailable make the target available for the current target and its child (that is why the test in |
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.
Looks fine to me otherwise 🤷♂️
Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
* Link dynamically with embedded metis to comply conda-forge rules * export all symbols (for MSVC) * Use external 5.1.0 metis or fallback to embedded code linked dynamically * fix comments in metis cmake module * ADD find or fetch mechanism * Remove embeded metis and put linkage to private * Fix metis dependency but still not the best fix * test * Put back public linkage * Revert "Put back public linkage" This reverts commit 71baa47. * Clean * cleaning #2 * Use SOFA_ALLOW_FETCH_DEPENDENCIES cmake option for metis * Add missing CImg to list of fetchable dependencies in doc * Update applications/plugins/SofaMatrix/CMakeLists.txt Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com> --------- Co-authored-by: Frederick Roy <froy@lnrobo.com> Co-authored-by: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Co-authored-by: bakpaul <bakpaul@hotmail.fr> Co-authored-by: Paul Baksic <paul.baksic@outlook.fr> Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Continuation of #4266
As required by conda-forge/staged-recipes#23085, we must avoid static libraries to comply conda-forge rules.
Tests with more recent versions of metis (such as one available on conda-forge) seems to introduce some bugs (@bakpaul @alxbilger Do you have some inputs to provide here ?).
For now, the solution we converged to is to dynamically link metis with Sofa.
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if