Skip to content

Commit

Permalink
SPQR: Make GPUQREngine a subproject.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Sep 19, 2023
1 parent 1b1b211 commit dda79b5
Show file tree
Hide file tree
Showing 89 changed files with 55 additions and 177 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-arch-emu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency: ci-arch-emu-${{ github.ref }}

env:
# string with name of libraries to be built
BUILD_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:RBio:SuiteSparse_GPURuntime:GPUQREngine:SPQR:SPEX"
BUILD_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:RBio:SuiteSparse_GPURuntime:SPQR:SPEX"
# string with name of libraries to be checked
CHECK_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:RBio:SPQR:SPEX"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency: ci-${{ github.ref }}

env:
# string with name of libraries to be built
BUILD_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:RBio:SuiteSparse_GPURuntime:GPUQREngine:SPQR:GraphBLAS:SPEX"
BUILD_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:RBio:SuiteSparse_GPURuntime:SPQR:GraphBLAS:SPEX"
# string with name of libraries to be checked
CHECK_LIBS: "SuiteSparse_config:Mongoose:AMD:BTF:CAMD:CCOLAMD:COLAMD:CHOLMOD:CSparse:CXSparse:LDL:KLU:UMFPACK:RBio:SPQR:GraphBLAS:SPEX"

Expand Down
77 changes: 0 additions & 77 deletions GPUQREngine/Makefile

This file was deleted.

4 changes: 0 additions & 4 deletions GPUQREngine/build/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ library:
( cd UMFPACK && $(MAKE) )
( cd RBio && $(MAKE) )
( cd SuiteSparse_GPURuntime && $(MAKE) )
( cd GPUQREngine && $(MAKE) )
( cd SPQR && $(MAKE) )
( cd GraphBLAS && $(MAKE) )
( cd SPEX && $(MAKE) )
Expand All @@ -59,7 +58,6 @@ local:
( cd UMFPACK && $(MAKE) local )
( cd RBio && $(MAKE) local )
( cd SuiteSparse_GPURuntime && $(MAKE) local )
( cd GPUQREngine && $(MAKE) local )
( cd SPQR && $(MAKE) local )
( cd GraphBLAS && $(MAKE) local )
( cd SPEX && $(MAKE) local )
Expand All @@ -82,7 +80,6 @@ global:
( cd UMFPACK && $(MAKE) global )
( cd RBio && $(MAKE) global )
( cd SuiteSparse_GPURuntime && $(MAKE) global )
( cd GPUQREngine && $(MAKE) global )
( cd SPQR && $(MAKE) global )
( cd GraphBLAS && $(MAKE) global )
( cd SPEX && $(MAKE) global )
Expand All @@ -103,7 +100,6 @@ install:
( cd UMFPACK && $(MAKE) install )
( cd RBio && $(MAKE) install )
( cd SuiteSparse_GPURuntime && $(MAKE) install )
( cd GPUQREngine && $(MAKE) install )
( cd SPQR && $(MAKE) install )
( cd GraphBLAS && $(MAKE) install )
( cd SPEX && $(MAKE) install )
Expand All @@ -124,7 +120,6 @@ uninstall:
( cd CXSparse && $(MAKE) uninstall )
( cd RBio && $(MAKE) uninstall )
( cd SuiteSparse_GPURuntime && $(MAKE) uninstall )
( cd GPUQREngine && $(MAKE) uninstall )
( cd SPQR && $(MAKE) uninstall )
( cd GraphBLAS && $(MAKE) uninstall )
( cd SPEX && $(MAKE) uninstall )
Expand All @@ -149,7 +144,6 @@ purge:
- ( cd CXSparse && $(MAKE) purge )
- ( cd RBio && $(MAKE) purge )
- ( cd SuiteSparse_GPURuntime && $(MAKE) purge )
- ( cd GPUQREngine && $(MAKE) purge )
- ( cd SPQR && $(MAKE) purge )
- $(RM) MATLAB_Tools/*/*.mex* MATLAB_Tools/*/*/*.mex*
- $(RM) MATLAB_Tools/*/*.o MATLAB_Tools/*/*/*.o
Expand Down Expand Up @@ -225,7 +219,6 @@ debug:
( cd UMFPACK && $(MAKE) debug )
( cd RBio && $(MAKE) debug )
( cd SuiteSparse_GPURuntime && $(MAKE) )
( cd GPUQREngine && $(MAKE) )
( cd SPQR && $(MAKE) debug )
( cd GraphBLAS && $(MAKE) cdebug )
( cd SPEX && $(MAKE) debug )
Expand Down
16 changes: 4 additions & 12 deletions SPQR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ if ( SUITESPARSE_CUDA )
find_package ( SuiteSparse_GPURuntime 3.2.0 REQUIRED )
endif ( )

find_package ( GPUQREngine 3.2.0
PATHS ${CMAKE_SOURCE_DIR}/../GPUQREngine/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::GPUQREngine )
find_package ( GPUQREngine 3.2.0 REQUIRED )
endif ( )

find_package ( CHOLMOD_CUDA 4.2.0
PATHS ${CMAKE_SOURCE_DIR}/../CHOLMOD/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::CHOLMOD_CUDA )
Expand All @@ -119,6 +113,7 @@ include ( SuiteSparseLAPACK ) # requires cmake 3.22

if ( SUITESPARSE_CUDA )
# with CUDA
add_subdirectory ( GPUQREngine )
add_subdirectory ( SPQRGPU )
endif ( )

Expand Down Expand Up @@ -260,7 +255,7 @@ if ( SUITESPARSE_CUDA )
# Maybe, those two targets aren't actually standalone libraries but should
# be part of the SPQR project?
target_link_libraries ( SPQR PRIVATE
SuiteSparse::GPUQREngine SuiteSparse::GPURuntime )
GPUQREngine SuiteSparse::GPURuntime )
target_compile_definitions ( SPQR PUBLIC "SUITESPARSE_CUDA" )
set ( SPQR_CFLAGS "-DSUITESPARSE_CUDA" )
if ( NOT NSTATIC )
Expand All @@ -272,11 +267,8 @@ if ( SUITESPARSE_CUDA )
target_link_libraries ( SPQR_static PUBLIC SPQR_CUDA_static )
target_compile_definitions ( SPQR_static PUBLIC "SUITESPARSE_CUDA" )

if ( TARGET SuiteSparse::GPUQREngine_static )
target_link_libraries ( SPQR_static PUBLIC SuiteSparse::GPUQREngine_static )
else ( )
target_link_libraries ( SPQR_static PUBLIC SuiteSparse::GPUQREngine )
endif ( )
target_link_libraries ( SPQR_static PUBLIC GPUQREngine_static )

if ( TARGET SuiteSparse::GPURuntime_static )
target_link_libraries ( SPQR_static PUBLIC SuiteSparse::GPURuntime_static )
else ( )
Expand Down
29 changes: 18 additions & 11 deletions SPQR/Config/SPQRConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,27 @@ set ( _dependencies_found ON )
if ( @SUITESPARSE_CUDA@ )
# Look for imported targets of additional dependency if SPQR was built with CUDA

if ( NOT SPQR_CUDA_FOUND )
if ( @SUITESPARSE_IN_BUILD_TREE@ )
# First check in a common build tree
find_dependency ( SPQR_CUDA ${SPQR_VERSION}
PATHS ${CMAKE_SOURCE_DIR}/../SPQR/build NO_DEFAULT_PATH )
# Then, check in the currently active CMAKE_MODULE_PATH
if ( NOT SPQR_CUDA_FOUND )
find_dependency ( SPQR_CUDA ${SPQR_VERSION} )
endif ( )
else ( )
if ( @SUITESPARSE_IN_BUILD_TREE@ )
# First check in a common build tree
find_dependency ( GPUQREngine @GPUQRENGINE_VERSION_MAJOR@.@GPUQRENGINE_VERSION_MINOR@
PATHS ${CMAKE_SOURCE_DIR}/../SPQR/build/GPUQREngine NO_DEFAULT_PATH )
# Then, check in the currently active CMAKE_MODULE_PATH
if ( NOT TARGET GPUQREngine )
find_dependency ( GPUQREngine @GPUQRENGINE_VERSION_MAJOR@.@GPUQRENGINE_VERSION_MINOR@ )
endif ( )

# First check in a common build tree
find_dependency ( SPQR_CUDA ${SPQR_VERSION}
PATHS ${CMAKE_SOURCE_DIR}/../SPQR/build NO_DEFAULT_PATH )
# Then, check in the currently active CMAKE_MODULE_PATH
if ( NOT TARGET SPQR_CUDA )
find_dependency ( SPQR_CUDA ${SPQR_VERSION} )
endif ( )
else ( )
find_dependency ( GPUQREngine @GPUQRENGINE_VERSION_MAJOR@.@GPUQRENGINE_VERSION_MINOR@ )
find_dependency ( SPQR_CUDA ${SPQR_VERSION} )
endif ( )
if ( NOT SPQR_CUDA_FOUND )
if ( NOT GPUQREngine_FOUND OR NOT SPQR_CUDA_FOUND )
set ( _dependencies_found OFF )
endif ( )
endif ( )
Expand Down
Loading

0 comments on commit dda79b5

Please sign in to comment.