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

CHOLMOD: Use PRIVATE scope dependencies also for static library. #560

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

mmuetzel
Copy link
Contributor

@mmuetzel mmuetzel commented Dec 1, 2023

Instead of going through the build rules of all libraries, I figured it might be a good first step to make the modifications only for CHOLMOD first. If that helps to build the static KLU_CHOLMOD library on systems where the wrong headers are pulled in, we could make the corresponding changes for all other libraries, too.
If it doesn't help, we'd need to look for other solutions.

@DrTimothyAldenDavis or @Fabian188: When you come around to it, could you please check if the static KLU_CHOLMOD libraries build with these changes on affected systems?

@Fabian188
Copy link

I pulled dev2

git log | head -n 23
commit c051663673510bf9040c211f0093ca0674e4a728
Merge: 833495e1b 9e8157934
Author: Tim Davis <[email protected]>
Date:   Fri Dec 1 07:28:30 2023 -0600

    Merge pull request #559 from mmuetzel/ci
    
    CI: Add runner using MSVC with CUDA

commit 9e81579346bf9dabce86233eb756628189edf118
Author: Markus Mützel <[email protected]>
Date:   Wed Nov 29 20:11:06 2023 +0100

    SPQR: Add dependencies for CUDA libraries
    
    Needed for `SuiteSparse_free`, `SuiteSparse_malloc` and others.

commit c11dc531d91429beb04e7e74a707a1557cf7a20d
Author: Markus Mützel <[email protected]>
Date:   Tue Nov 28 21:48:27 2023 +0100

    SuiteSparsePolicy.cmake: Use `find_package` instead of `include` for CUDAToolkit

I did cmake .. --fresh and make clean

Consolidate compiler generated dependencies of target UMFPACK
/Library/Developer/CommandLineTools/usr/bin/make  -f UMFPACK/CMakeFiles/UMFPACK.dir/build.make UMFPACK/CMakeFiles/UMFPACK.dir/build
[ 19%] Building C object UMFPACK/CMakeFiles/UMFPACK.dir/Source2/umf_di_assemble.c.o
cd /Users/fwein/code/SuiteSparse-org/mybuild/UMFPACK && /Library/Developer/CommandLineTools/usr/bin/cc -DBLAS_Apple -DUMFPACK_EXPORTS -I/Users/fwein/code/SuiteSparse-org/mybuild/UMFPACK -I/Users/fwein/code/SuiteSparse-org/UMFPACK -I/Users/fwein/code/SuiteSparse-org/UMFPACK/Source -I/Users/fwein/code/SuiteSparse-org/UMFPACK/Include -I/Users/fwein/code/SuiteSparse-org/SuiteSparse_config -I/opt/homebrew/include -I/Users/fwein/code/SuiteSparse-org/AMD/Include -I/Users/fwein/code/SuiteSparse-org/CHOLMOD/Include -Xclang -fopenmp  -O3 -DNDEBUG -std=gnu11 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -mmacosx-version-min=13.5 -fPIC -MD -MT UMFPACK/CMakeFiles/UMFPACK.dir/Source2/umf_di_assemble.c.o -MF CMakeFiles/UMFPACK.dir/Source2/umf_di_assemble.c.o.d -o CMakeFiles/UMFPACK.dir/Source2/umf_di_assemble.c.o -c /Users/fwein/code/SuiteSparse-org/UMFPACK/Source2/umf_di_assemble.c
In file included from /Users/fwein/code/SuiteSparse-org/UMFPACK/Source2/umf_di_assemble.c:10:
In file included from /Users/fwein/code/SuiteSparse-org/UMFPACK/Source/umf_assemble.c:14:
In file included from /Users/fwein/code/SuiteSparse-org/UMFPACK/Source/umf_internal.h:330:
/Users/fwein/code/SuiteSparse-org/UMFPACK/Include/umfpack.h:87:2: error: "UMFPACK 6.3.0 requires SuiteSparse_config 7.4.0 or later"
#error "UMFPACK 6.3.0 requires SuiteSparse_config 7.4.0 or later"
 ^
/Users/fwein/code/SuiteSparse-org/UMFPACK/Include/umfpack.h:91:2: error: "UMFPACK 6.3.0 requires AMD 3.3.0 or later"
#error "UMFPACK 6.3.0 requires AMD 3.

@mmuetzel
Copy link
Contributor Author

mmuetzel commented Dec 1, 2023

@Fabian188: Thank you for testing.
Was the build process previously stuck at KLU_CHOLMOD_static for you? If it was, that means the changes from here helped. (If it wasn't, we can't tell yet if this makes a difference.)

Edit: Did you actually test with the changes from this PR? Or did you test with the current HEAD of the dev2 branch?

Edit 2: If you already reached that point without this change, that likely means that you don't see the error that should be addressed by the proposed changes.

@Fabian188
Copy link

Modifying the compile command manually:

without -I/opt/homebrew/include

/Users/fwein/code/SuiteSparse-org/SuiteSparse_config/SuiteSparse_config.h:67:14: fatal error: 'omp.h' file not found
    #include <omp.h>

Having it as the last include
.... I/Users/fwein/code/SuiteSparse-org/CHOLMOD/Include -I/opt/homebrew/include -Xclang -fopenmp -O3 ...
compiles without any issue

@Fabian188
Copy link

Fabian188 commented Dec 1, 2023

@Fabian188: Thank you for testing. Was the build process previously stuck at KLU_CHOLMOD_static for you? If it was, that means the changes from here helped. (If it wasn't, we can't tell yet if this makes a difference.)

Edit: Did you actually test with the changes from this PR? Or did you test with the current HEAD of the dev2 branch?

Head of dev2 branch. I provided a git log. I understood that a PR is part of the dev2? I'm not used to use to github, usually I use gitlab.

W.r.t. the previouous error, I don't remember. If you tell the git version I can checkout and test again.

@mmuetzel
Copy link
Contributor Author

mmuetzel commented Dec 1, 2023

Commits from a pull request aren't part of the "actual" repository before they are merged. GitHub pull requests are what GitLab calls "merge request".

@mmuetzel
Copy link
Contributor Author

mmuetzel commented Dec 1, 2023

Having it as the last include
.... I/Users/fwein/code/SuiteSparse-org/CHOLMOD/Include -I/opt/homebrew/include -Xclang -fopenmp -O3 ...
compiles without any issue

To fix that error, you might try the changes proposed in #561.

@DrTimothyAldenDavis DrTimothyAldenDavis merged commit 5d41165 into DrTimothyAldenDavis:dev2 Dec 1, 2023
23 checks passed
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

Successfully merging this pull request may close these issues.

3 participants