Skip to content

Commit

Permalink
Merge pull request #532 from DrTimothyAldenDavis/singledev2
Browse files Browse the repository at this point in the history
CHOLMOD 5.1.0
  • Loading branch information
DrTimothyAldenDavis authored Nov 26, 2023
2 parents cd38ed0 + 4520491 commit daf0bef
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 83 deletions.
168 changes: 91 additions & 77 deletions CHOLMOD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -616,26 +616,9 @@ endif ( )
# Demo library and programs
#-------------------------------------------------------------------------------

option ( DEMO "ON: Build the demo programs. OFF (default): do not build the demo programs." on )
option ( DEMO "ON: Build the demo programs. OFF (default): do not build the demo programs." off )
if ( DEMO )

enable_testing ( )

#---------------------------------------------------------------------------
# demo library
#---------------------------------------------------------------------------

message ( STATUS "Also compiling the demos in CHOLMOD/Demo" )

#---------------------------------------------------------------------------
# Demo programs
#---------------------------------------------------------------------------

add_executable ( cholmod_di_demo "Demo/cholmod_di_demo.c" )
add_executable ( cholmod_dl_demo "Demo/cholmod_dl_demo.c" )
add_executable ( cholmod_si_demo "Demo/cholmod_si_demo.c" )
add_executable ( cholmod_sl_demo "Demo/cholmod_sl_demo.c" )

add_executable ( cholmod_di_simple "Demo/cholmod_di_simple.c" )
add_executable ( cholmod_dl_simple "Demo/cholmod_dl_simple.c" )
add_executable ( cholmod_si_simple "Demo/cholmod_si_simple.c" )
Expand All @@ -647,7 +630,40 @@ if ( DEMO )
add_executable ( reade "Demo/reade.f" )
endif ( )

# Libraries required for Demo programs
target_link_libraries ( cholmod_di_simple PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_di_simple PUBLIC CHOLMOD_CUDA )
endif ( )
target_link_libraries ( cholmod_si_simple PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_si_simple PUBLIC CHOLMOD_CUDA )
endif ( )
target_link_libraries ( cholmod_dl_simple PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_dl_simple PUBLIC CHOLMOD_CUDA )
endif ( )
target_link_libraries ( cholmod_sl_simple PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_sl_simple PUBLIC CHOLMOD_CUDA )
endif ( )

endif ( )

#-------------------------------------------------------------------------------
# testing
#-------------------------------------------------------------------------------

enable_testing ( )

add_executable ( cholmod_di_demo "Demo/cholmod_di_demo.c" )
add_executable ( cholmod_dl_demo "Demo/cholmod_dl_demo.c" )
add_executable ( cholmod_si_demo "Demo/cholmod_si_demo.c" )
add_executable ( cholmod_sl_demo "Demo/cholmod_sl_demo.c" )

# Libraries required for tests
if ( BUILD_SHARED_LIBS )

# link the tests with shared libraries
target_link_libraries ( cholmod_di_demo PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_di_demo PUBLIC CHOLMOD_CUDA )
Expand All @@ -665,78 +681,76 @@ if ( DEMO )
target_link_libraries ( cholmod_sl_demo PUBLIC CHOLMOD_CUDA )
endif ( )

target_link_libraries ( cholmod_di_simple PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
else ( )

# link the tests with static libraries
target_link_libraries ( cholmod_di_demo PUBLIC CHOLMOD_static SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_di_simple PUBLIC CHOLMOD_CUDA )
target_link_libraries ( cholmod_di_demo PUBLIC CHOLMOD_CUDA_static )
endif ( )
target_link_libraries ( cholmod_si_simple PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
target_link_libraries ( cholmod_si_demo PUBLIC CHOLMOD_static SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_si_simple PUBLIC CHOLMOD_CUDA )
target_link_libraries ( cholmod_si_demo PUBLIC CHOLMOD_CUDA_static )
endif ( )
target_link_libraries ( cholmod_dl_simple PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
target_link_libraries ( cholmod_dl_demo PUBLIC CHOLMOD_static SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_dl_simple PUBLIC CHOLMOD_CUDA )
target_link_libraries ( cholmod_dl_demo PUBLIC CHOLMOD_CUDA_static )
endif ( )
target_link_libraries ( cholmod_sl_simple PUBLIC CHOLMOD SuiteSparse::SuiteSparseConfig )
target_link_libraries ( cholmod_sl_demo PUBLIC CHOLMOD_static SuiteSparse::SuiteSparseConfig )
if ( SUITESPARSE_CUDA )
target_link_libraries ( cholmod_sl_simple PUBLIC CHOLMOD_CUDA )
target_link_libraries ( cholmod_sl_demo PUBLIC CHOLMOD_CUDA_static )
endif ( )

add_test ( NAME int32_double_bcsstk01
COMMAND cholmod_di_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/bcsstk01.tri )
add_test ( NAME int64_double_bcsstk01
COMMAND cholmod_dl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/bcsstk01.tri )
add_test ( NAME int32_single_bcsstk01
COMMAND cholmod_si_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/bcsstk01.tri )
add_test ( NAME int64_single_bcsstk01
COMMAND cholmod_sl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/bcsstk01.tri )

add_test ( NAME int32_double_lp_afiro
COMMAND cholmod_di_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/lp_afiro.tri )
add_test ( NAME int64_double_lp_afiro
COMMAND cholmod_dl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/lp_afiro.tri )
add_test ( NAME int32_single_lp_afiro
COMMAND cholmod_si_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/lp_afiro.tri )
add_test ( NAME int64_single_lp_afiro
COMMAND cholmod_sl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/lp_afiro.tri )

add_test ( NAME int32_double_can24
COMMAND cholmod_di_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/can___24.mtx )
add_test ( NAME int64_double_can24
COMMAND cholmod_dl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/can___24.mtx )
add_test ( NAME int32_single_can24
COMMAND cholmod_si_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/can___24.mtx )
add_test ( NAME int64_single_can24
COMMAND cholmod_sl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/can___24.mtx )

add_test ( NAME int32_double_complex
COMMAND cholmod_di_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/c.tri )
add_test ( NAME int64_double_complex
COMMAND cholmod_dl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/c.tri )
add_test ( NAME int32_single_complex
COMMAND cholmod_si_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/c.tri )
add_test ( NAME int64_single_complex
COMMAND cholmod_sl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/c.tri )

add_test ( NAME int32_double_supernodal
COMMAND cholmod_di_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/bcsstk02.tri )
add_test ( NAME int64_double_supernodal
COMMAND cholmod_dl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/bcsstk02.tri )
add_test ( NAME int32_single_supernodal
COMMAND cholmod_si_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/bcsstk02.tri )
add_test ( NAME int64_single_supernodal
COMMAND cholmod_sl_demo ${CMAKE_SOURCE_DIR}/Demo/Matrix/bcsstk02.tri )

else ( )

message ( STATUS "Skipping the demos in CHOLMOD/Demo" )

endif ( )

add_test ( NAME CHOLMOD_int32_double_bcsstk01
COMMAND cholmod_di_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/bcsstk01.tri )
add_test ( NAME CHOLMOD_int64_double_bcsstk01
COMMAND cholmod_dl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/bcsstk01.tri )
add_test ( NAME CHOLMOD_int32_single_bcsstk01
COMMAND cholmod_si_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/bcsstk01.tri )
add_test ( NAME CHOLMOD_int64_single_bcsstk01
COMMAND cholmod_sl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/bcsstk01.tri )

add_test ( NAME CHOLMOD_int32_double_lp_afiro
COMMAND cholmod_di_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/lp_afiro.tri )
add_test ( NAME CHOLMOD_int64_double_lp_afiro
COMMAND cholmod_dl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/lp_afiro.tri )
add_test ( NAME CHOLMOD_int32_single_lp_afiro
COMMAND cholmod_si_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/lp_afiro.tri )
add_test ( NAME CHOLMOD_int64_single_lp_afiro
COMMAND cholmod_sl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/lp_afiro.tri )

add_test ( NAME CHOLMOD_int32_double_can24
COMMAND cholmod_di_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/can___24.mtx )
add_test ( NAME CHOLMOD_int64_double_can24
COMMAND cholmod_dl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/can___24.mtx )
add_test ( NAME CHOLMOD_int32_single_can24
COMMAND cholmod_si_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/can___24.mtx )
add_test ( NAME CHOLMOD_int64_single_can24
COMMAND cholmod_sl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/can___24.mtx )

add_test ( NAME CHOLMOD_int32_double_complex
COMMAND cholmod_di_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/c.tri )
add_test ( NAME CHOLMOD_int64_double_complex
COMMAND cholmod_dl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/c.tri )
add_test ( NAME CHOLMOD_int32_single_complex
COMMAND cholmod_si_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/c.tri )
add_test ( NAME CHOLMOD_int64_single_complex
COMMAND cholmod_sl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/c.tri )

add_test ( NAME CHOLMOD_int32_double_supernodal
COMMAND cholmod_di_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/bcsstk02.tri )
add_test ( NAME CHOLMOD_int64_double_supernodal
COMMAND cholmod_dl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/bcsstk02.tri )
add_test ( NAME CHOLMOD_int32_single_supernodal
COMMAND cholmod_si_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/bcsstk02.tri )
add_test ( NAME CHOLMOD_int64_single_supernodal
COMMAND cholmod_sl_demo ${PROJECT_SOURCE_DIR}/Demo/Matrix/bcsstk02.tri )

#-------------------------------------------------------------------------------
# report status
#-------------------------------------------------------------------------------

include ( SuiteSparseReport )


4 changes: 2 additions & 2 deletions CHOLMOD/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Module). The rest are copyrighted by the authors: Timothy A. Davis (all of
them), and William W. Hager (the Modify Module).

CHOLMOD relies on several other packages: AMD, CAMD, COLAMD, CCOLAMD,
SuiteSparse_config, METIS, the BLAS, and LAPACK. All the BLAS and LAPACK are
part of SuiteSparse.
SuiteSparse_config, METIS, the BLAS, and LAPACK. All but the BLAS and LAPACK
are part of SuiteSparse.

AMD is authored by T. Davis, Iain Duff, and Patrick Amestoy. COLAMD is
authored by T. Davis and Stefan Larimore, with algorithmic design in
Expand Down
5 changes: 5 additions & 0 deletions GraphBLAS/Config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore these files:

# cmake constructs GB_config.h from GB_config.h.in with the name of the
# compiler, its flags, and other platform-specific properties.
GB_config.h
6 changes: 3 additions & 3 deletions GraphBLAS/Config/GB_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#define GB_LIB_SUFFIX ".so"
#endif

// GB_OBJ_SUFFIX: object suffix (.o for Linux/Unix/Mac, .obj for Windows):
// GB_OBJ_SUFFIX: object suffix (.o for Linux/Unix/Mac/MinGW, .obj for MSVC):
#ifndef GB_OBJ_SUFFIX
#define GB_OBJ_SUFFIX ".o"
#endif
Expand All @@ -57,12 +57,12 @@

// GB_C_LIBRARIES: libraries to link with when using direct compile/link:
#ifndef GB_C_LIBRARIES
#define GB_C_LIBRARIES " -lm -ldl /usr/lib/gcc/x86_64-linux-gnu/9/libgomp.so /usr/lib/x86_64-linux-gnu/libpthread.so"
#define GB_C_LIBRARIES " -lm -ldl -lgomp -lpthread"
#endif

// GB_CMAKE_LIBRARIES: libraries to link with when using cmake
#ifndef GB_CMAKE_LIBRARIES
#define GB_CMAKE_LIBRARIES "m;dl;/usr/lib/gcc/x86_64-linux-gnu/9/libgomp.so;/usr/lib/x86_64-linux-gnu/libpthread.so"
#define GB_CMAKE_LIBRARIES "m;dl;/usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so;/usr/lib/x86_64-linux-gnu/libpthread.so"
#endif

#endif
Expand Down
2 changes: 1 addition & 1 deletion GraphBLAS/Config/GB_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#define GB_LIB_SUFFIX "@GB_LIB_SUFFIX@"
#endif

// GB_OBJ_SUFFIX: object suffix (.o for Linux/Unix/Mac, .obj for Windows):
// GB_OBJ_SUFFIX: object suffix (.o for Linux/Unix/Mac/MinGW, .obj for MSVC):
#ifndef GB_OBJ_SUFFIX
#define GB_OBJ_SUFFIX "@GB_OBJ_SUFFIX@"
#endif
Expand Down
5 changes: 5 additions & 0 deletions GraphBLAS/GraphBLAS/Config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore these files:

# cmake constructs GB_config.h from GB_config.h.in with the name of the
# compiler, its flags, and other platform-specific properties.
GB_config.h

0 comments on commit daf0bef

Please sign in to comment.