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

GPURuntime: Don't add include dir for SuiteSparse_Config to interface #370

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

mmuetzel
Copy link
Contributor

There is no reason I can see why projects that link to this library would need to add the include directory of SuiteSparse_Config to the preprocessor flags.
This will probably also remove the confusing output in the configuration summary.

@DrTimothyAldenDavis
Copy link
Owner

I'll give it a try -- thanks.

@DrTimothyAldenDavis DrTimothyAldenDavis merged commit afe05b7 into DrTimothyAldenDavis:dev2 Aug 30, 2023
13 checks passed
@DrTimothyAldenDavis
Copy link
Owner

Getting closer but still strange. Building the Example package gives strange results, reporting /usr/local/include instead of the actual installation folder.

hypersparse $ pwd
/home/faculty/d/davis/dev2/SuiteSparse
hypersparse $ cd Example/
hypersparse $ make
( cd build && cmake  .. && cmake --build . --config Release -j8 )
-- Building MY library version: v1.4.0 (FIXME DATE, 2023)
-- SuiteSparse_config version: 7.2.0
-- SuiteSparse_config include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- SuiteSparse_config library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libsuitesparseconfig.so.7.2.0
-- SuiteSparse_config static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libsuitesparseconfig.a
-- AMD version: 3.2.0
-- AMD include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- AMD library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libamd.so.3.2.0
-- AMD static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libamd.a
-- BTF version: 2.2.0
-- BTF include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- BTF library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libbtf.so.2.2.0
-- BTF static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libbtf.a
-- CAMD version: 3.2.0
-- CAMD include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- CAMD library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libcamd.so.3.2.0
-- CAMD static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libcamd.a
-- CCOLAMD version: 3.2.0
-- CCOLAMD include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- CCOLAMD library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libccolamd.so.3.2.0
-- CCOLAMD static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libccolamd.a
-- COLAMD version: 3.2.0
-- COLAMD include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- COLAMD library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libcolamd.so.3.2.0
-- COLAMD static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libcolamd.a
-- CHOLMOD_CUDA version: 4.2.0
-- CHOLMOD_CUDA library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libcholmod_cuda.so.4.2.0
-- CHOLMOD_CUDA static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libcholmod_cuda.a
-- CHOLMOD version: 4.2.0
-- CHOLMOD include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- CHOLMOD library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libcholmod.so.4.2.0
-- CHOLMOD static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libcholmod.a
-- CXSparse version: 4.2.0
-- CXSparse include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- CXSparse library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libcxsparse.so.4.2.0
-- CXSparse static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libcxsparse.a
-- GraphBLAS version: 8.2.0
-- GraphBLAS include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- GraphBLAS library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libgraphblas.so.8.2.0
-- GraphBLAS static:  
-- KLU version: 2.2.0
-- KLU include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- KLU library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libklu.so.2.2.0
-- KLU static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libklu.a
-- KLU_CHOLMOD version: 2.2.0
-- KLU_CHOLMOD include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- KLU_CHOLMOD library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libklu_cholmod.so.2.2.0
-- KLU_CHOLMOD static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libklu_cholmod.a
-- LDL version: 3.2.0
-- LDL include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- LDL library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libldl.so.3.2.0
-- LDL static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libldl.a
-- Mongoose version: 3.2.0
-- Mongoose include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- Mongoose library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libmongoose.so.3.2.0
-- Mongoose static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libmongoose.a
-- RBio version: 4.2.0
-- RBio include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- RBio library: /home/faculty/d/davis/dev2/SuiteSparse/lib/librbio.so.4.2.0
-- RBio static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/librbio.a
-- SPEX version: 2.2.0
-- SPEX include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- SPEX library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libspex.so.2.2.0
-- SPEX static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libspex.a
-- SPQR_CUDA version: 4.2.0
-- SPQR_CUDA library: /home/faculty/d/davis/dev2/SuiteSparse/SPQR/build/SPQRGPU/libspqr_cuda.so.4.2.0
-- SPQR_CUDA static:  /home/faculty/d/davis/dev2/SuiteSparse/SPQR/build/SPQRGPU/libspqr_cuda.a
-- SPQR version: 4.2.0
-- SPQR include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- SPQR library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libspqr.so.4.2.0
-- SPQR static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libspqr.a
-- UMFPACK version: 6.2.0
-- UMFPACK include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- UMFPACK library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libumfpack.so.6.2.0
-- UMFPACK static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libumfpack.a
-- CHOLMOD_CUDA version: 4.2.0
-- CHOLMOD_CUDA library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libcholmod_cuda.so.4.2.0
-- CHOLMOD_CUDA static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libcholmod_cuda.a
-- SPQR_CUDA version: 4.2.0
-- SPQR_CUDA library: /home/faculty/d/davis/dev2/SuiteSparse/SPQR/build/SPQRGPU/libspqr_cuda.so.4.2.0
-- SPQR_CUDA static:  /home/faculty/d/davis/dev2/SuiteSparse/SPQR/build/SPQRGPU/libspqr_cuda.a
-- SuiteSparse_GPURuntime version: 3.2.0
-- SuiteSparse_GPURuntime include: /usr/local/include
-- SuiteSparse_GPURuntime library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libsuitesparse_gpuruntime.so.3.2.0
-- SuiteSparse_GPURuntime static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libsuitesparse_gpuruntime.a
-- GPUQREngine version: 3.2.0
-- GPUQREngine include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- GPUQREngine library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libgpuqrengine.so.3.2.0
-- GPUQREngine static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libgpuqrengine.a
-- Checking for module 'gmp>=6.1.2'
--   Package 'gmp', required by 'virtual:world', not found
-- major: #define __GNU_MP_VERSION            6
-- minor: #define __GNU_MP_VERSION_MINOR      2
-- patch: #define __GNU_MP_VERSION_PATCHLEVEL 0
-- gmp version: 6.2.0
-- gmp include: /usr/include/x86_64-linux-gnu
-- gmp library: /usr/lib/x86_64-linux-gnu/libgmp.so.10.4.0
-- gmp static:  /usr/lib/x86_64-linux-gnu/libgmp.a
-- Checking for module 'mpfr>=4.0.2'
--   Package 'mpfr', required by 'virtual:world', not found
-- major/minor/patch: #define MPFR_VERSION_STRING "4.0.2"
-- mpfr version: 4.0.2
-- mpfr include: /usr/include
-- mpfr library: /usr/lib/x86_64-linux-gnu/libmpfr.so.6.0.2
-- mpfr static:  /usr/lib/x86_64-linux-gnu/libmpfr.a
-- Looking for Intel 32-bit BLAS
-- Found Intel10_64lp 32-bit BLAS
-- OpenMP C libraries:      /usr/lib/gcc/x86_64-linux-gnu/9/libgomp.so;/usr/lib/x86_64-linux-gnu/libpthread.so 
-- OpenMP C include:         
-- OpenMP C flags:          -fopenmp 
-- BLAS libraries:      /usr/lib/x86_64-linux-gnu/libmkl_intel_lp64.so;/usr/lib/x86_64-linux-gnu/libmkl_intel_thread.so;/usr/lib/x86_64-linux-gnu/libmkl_core.so;/usr/lib/x86_64-linux-gnu/libiomp5.so;-lpthread;-lm;-ldl 
-- BLAS include:         
-- BLAS linker flags:    
-- LAPACK libraries:     
-- LAPACK include:       
-- LAPACK linker flags:  
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/faculty/d/davis/dev2/SuiteSparse/Example/build
make[1]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[2]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
[  8%] Linking C shared library libmy.so
[ 25%] Built target my_static
[ 33%] Linking CXX shared library libmy_cxx.so
[ 50%] Built target my_cxx_static
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
[ 58%] Built target my
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
[ 66%] Linking C executable my_demo
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
[ 75%] Built target my_cxx
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[3]: Entering directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
[ 83%] Linking C executable my_cxx_demo
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
[ 91%] Built target my_demo
make[3]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
[100%] Built target my_cxx_demo
make[2]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'
make[1]: Leaving directory '/home/faculty/d/davis/dev2/SuiteSparse/Example/build'

@DrTimothyAldenDavis
Copy link
Owner

It should report this instead:

-- SuiteSparse_GPURuntime version: 3.2.0
-- SuiteSparse_GPURuntime include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- SuiteSparse_GPURuntime library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libsuitesparse_gpuruntime.so.3.2.0
-- SuiteSparse_GPURuntime static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libsuitesparse_gpuruntime.a

@mmuetzel
Copy link
Contributor Author

Sometimes CMake doesn't seem to overwrite some files on installation even if it needs to.
Do you see the same after make purge && make local && make install?

Could you please upload the generated SuiteSparse_GPURuntime*.cmake files?

@DrTimothyAldenDavis
Copy link
Owner

Here's a zip file with the *.cmake files from SuiteSparse_GPURuntime/build folder:

SuiteSparse_GPURuntime_cmake_files.zip

This file has the contents of the SuiteSparse/lib/cmake/SuiteSparse_GPURuntime folder, after "make local; make install":

SuiteSparse_GPURuntime.zip

The latter has this in the SuiteSparse_GPURuntimeTargets.cmake (below). Note that the dynamic library has a different "set_target_properties" than the static library.

image

I found an extraneous double quote in SuiteSparse_GPURuntime/CMakeLists.txt and removed it (PR cf692d9 ). It had no effect on this.

I suppose that the Example package might not need to use find_package for these CUDA libraries anyway. I'll try that and see what happens.

@DrTimothyAldenDavis
Copy link
Owner

See fe77284 where I've removed the find_package for CHOLMOD_CUDA and SPQR_CUDA, since the find_package (CHOLMOD) and find_package(SPQR) now finds those libraries themselves.

@mmuetzel
Copy link
Contributor Author

Maybe fixed in #371?

@DrTimothyAldenDavis
Copy link
Owner

I've already merged #371 and the issue is still there.

@mmuetzel
Copy link
Contributor Author

It solved the issue for me locally with make local.

Does a make purge && make local && make install cycle make a difference?

@DrTimothyAldenDavis
Copy link
Owner

DrTimothyAldenDavis commented Aug 31, 2023 via email

@DrTimothyAldenDavis
Copy link
Owner

make purge ; make local ; make install fixes it. I now see the right include directory for SuiteSparse_GPURuntime when building the Example package:

-- SuiteSparse_GPURuntime version: 3.2.0
-- SuiteSparse_GPURuntime include: /home/faculty/d/davis/dev2/SuiteSparse/include
-- SuiteSparse_GPURuntime library: /home/faculty/d/davis/dev2/SuiteSparse/lib/libsuitesparse_gpuruntime.so.3.2.0
-- SuiteSparse_GPURuntime static:  /home/faculty/d/davis/dev2/SuiteSparse/lib/libsuitesparse_gpuruntime.a

and when building SPQR:

-- SuiteSparse_GPURuntime version: 3.2.0
-- SuiteSparse_GPURuntime include: /home/faculty/d/davis/dev2/SuiteSparse/SuiteSparse_GPURuntime/Include
-- SuiteSparse_GPURuntime library: /home/faculty/d/davis/dev2/SuiteSparse/SuiteSparse_GPURuntime/build/libsuitesparse_gpuruntime.so.3.2.0
-- SuiteSparse_GPURuntime static:  /home/faculty/d/davis/dev2/SuiteSparse/SuiteSparse_GPURuntime/build/libsuitesparse_gpuruntime.a

looks great!

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.

2 participants