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

CombBLAS causes multiple definition of GlobalMT and ThreadBuffLenForBinning in SuperLU-Dist #20

Open
drew-parsons opened this issue Aug 5, 2023 · 0 comments

Comments

@drew-parsons
Copy link
Contributor

CombBLAS provides BipartiteMatchings as an Application. But SuperLU-Dist uses CombBLAS's BipartiteMatchings ApproxWeightPerfectMatching.h and BPMaximalMatching.h when built with CombBLAS support (c2cpp_GetHWPM.cpp).

CombBLAS uses a handful of global definitions in these headers. This means that when linked in a library the way SuperLU-Dist uses, these definitions are exposed and triggered a multiple definition error, e.g. https://buildd.debian.org/status/fetch.php?pkg=superlu-dist&arch=s390x&ver=8.1.2%2Bdfsg1-1%2Bb2&stamp=1691085601&raw=0

CMakeFiles/superlu_dist.dir/z_c2cpp_GetHWPM.cpp.o:/usr/include/CombBLAS/BipartiteMatchings/BPMaximalMatching.h:17: multiple definition of `GlobalMT'; CMakeFiles/superlu_dist.dir/d_c2cpp_GetHWPM.cpp.o:/usr/include/CombBLAS/BipartiteMatchings/BPMaximalMatching.h:17: first defined here
/usr/bin/ld: CMakeFiles/superlu_dist.dir/z_c2cpp_GetHWPM.cpp.o: in function `combblas::ThreadBuffLenForBinning(int, int)':
/usr/include/CombBLAS/BipartiteMatchings/ApproxWeightPerfectMatching.h:401: multiple definition of `combblas::ThreadBuffLenForBinning(int, int)'; CMakeFiles/superlu_dist.dir/d_c2cpp_GetHWPM.cpp.o:/usr/include/CombBLAS/BipartiteMatchings/ApproxWeightPerfectMatching.h:401: first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [SRC/CMakeFiles/superlu_dist.dir/build.make:2995: SRC/libsuperlu_dist.so.8.1.2] Error 1

The problem was previously raised for SuperLU-Dist at xiaoyeli/superlu_dist#40 and xiaoyeli/superlu_dist#60 . In Issue#60 a patch was suggested for CombBLAS 1.6 used by GNU at https://github.com/guix-mirror/guix/blob/master/gnu/packages/patches/combinatorial-blas-awpm.patch

Some elements of this patch have now been applied in CombBLAS 2.0.0. The "../" path to CombBLAS.h is fixed and t1Comp definitions removed. But other parts of the patch still need to be applied, as shown by the error message above. GlobalMT needs to be moved to a local definition and ThreadBuffLenForBinning needs to be inlined.

A debian version of the patch is https://salsa.debian.org/science-team/combblas/-/blob/master/debian/patches/AWPM_library_38dd27e.patch

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

No branches or pull requests

1 participant