Skip to content

Commit

Permalink
cmake: using option command; update to MATLAB interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Nov 9, 2022
1 parent 7359565 commit 0fdad8e
Show file tree
Hide file tree
Showing 90 changed files with 234 additions and 579 deletions.
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Pull request template for SuiteSparse

* Please do not submit a pull request to the default branch. Use the
dev or dev2 branch instead. If in doubt, please ask me first.

* Please describe your pull request:

* No pull request can be accepted unless you first sign the
Expand Down
2 changes: 1 addition & 1 deletion AMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

cmake_minimum_required ( VERSION 3.19 )

set ( AMD_DATE "Nov 4, 2022" )
set ( AMD_DATE "Nov 12, 2022" )
set ( AMD_VERSION_MAJOR 3 )
set ( AMD_VERSION_MINOR 0 )
set ( AMD_VERSION_SUB 0 )
Expand Down
8 changes: 5 additions & 3 deletions AMD/Demo/amd_f77cross.f
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
C ======================================================================

C ----------------------------------------------------------------------
C AMD, Copyright (c) by Timothy A. Davis, Patrick R.
C Amestoy, and Iain S. Duff. See ../README.txt for License.
C email: [email protected]
C AMD, Copyright (c) 1996-2022, Timothy A. Davis, Patrick R. Amestoy,
C and Iain S. Duff. All Rights Reserved.
C SPDX-License-Identifier: BSD-3-clause
C ----------------------------------------------------------------------


C This program provides an example of how to call the C version of AMD
C from a Fortran program. It is HIGHLY non-portable.

Expand Down Expand Up @@ -46,5 +47,6 @@
PRINT 50, K, PERM (K) + 1
50 FORMAT ('PERM (',I2,') = ', I2)
60 CONTINUE
CALL FLUSH (6)
END

7 changes: 4 additions & 3 deletions AMD/Demo/amd_f77demo.f
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
C ======================================================================

C ----------------------------------------------------------------------
C AMD, Copyright (c) by Timothy A. Davis, Patrick R.
C Amestoy, and Iain S. Duff. See ../README.txt for License.
C email: [email protected]
C AMD, Copyright (c) 1996-2022, Timothy A. Davis, Patrick R. Amestoy,
C and Iain S. Duff. All Rights Reserved.
C SPDX-License-Identifier: BSD-3-clause
C ----------------------------------------------------------------------

C A simple Fortran 77 main program that illustrates the use of the
Expand Down Expand Up @@ -157,4 +157,5 @@
170 FORMAT (' new row indices: ', 24I3)
180 CONTINUE
190 CONTINUE
CALL FLUSH (6)
END
7 changes: 4 additions & 3 deletions AMD/Demo/amd_f77simple.f
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
C ----------------------------------------------------------------------
C AMD, Copyright (c) by Timothy A. Davis, Patrick R.
C Amestoy, and Iain S. Duff. See ../README.txt for License.
C email: [email protected]
C AMD, Copyright (c) 1996-2022, Timothy A. Davis, Patrick R. Amestoy,
C and Iain S. Duff. All Rights Reserved.
C SPDX-License-Identifier: BSD-3-clause
C ----------------------------------------------------------------------

C This program provides an example of how to call the Fortran version
Expand Down Expand Up @@ -34,4 +34,5 @@
PRINT 50, K, LAST (K)
50 FORMAT ('P (',I2,') = ', I2)
60 CONTINUE
CALL FLUSH (6)
END
2 changes: 1 addition & 1 deletion AMD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Nov 4, 2022: version 3.0.0
Nov 12, 2022: version 3.0.0

* using CMake build system
* integers: int (32-bit) and SuiteSparse_long (nominally 64-bit) replaced
Expand Down
2 changes: 1 addition & 1 deletion AMD/Doc/amd_version.tex
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% version of SuiteSparse/AMD
\date{VERSION 3.0.0, Nov 4, 2022}
\date{VERSION 3.0.0, Nov 12, 2022}
2 changes: 1 addition & 1 deletion AMD/Include/amd.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ SUITESPARSE_PUBLIC void amd_l_info (double Info [ ]) ;
* Versions 1.1 and earlier of AMD do not include a #define'd version number.
*/

#define AMD_DATE "Nov 4, 2022"
#define AMD_DATE "Nov 12, 2022"
#define AMD_MAIN_VERSION 3
#define AMD_SUB_VERSION 0
#define AMD_SUBSUB_VERSION 0
Expand Down
2 changes: 1 addition & 1 deletion BTF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

cmake_minimum_required ( VERSION 3.19 )

set ( BTF_DATE "Nov 4, 2022" )
set ( BTF_DATE "Nov 12, 2022" )
set ( BTF_VERSION_MAJOR 2 )
set ( BTF_VERSION_MINOR 0 )
set ( BTF_VERSION_SUB 0 )
Expand Down
2 changes: 1 addition & 1 deletion BTF/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Nov 4, 2022: version 2.0.0
Nov 12, 2022: version 2.0.0

* using CMake build system
* integers: int (32-bit) and SuiteSparse_long (nominally 64-bit) replaced
Expand Down
2 changes: 1 addition & 1 deletion BTF/Include/btf.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ int64_t btf_l_order (int64_t, int64_t *, int64_t *, double , double *,
* #endif
*/

#define BTF_DATE "Nov 4, 2022"
#define BTF_DATE "Nov 12, 2022"
#define BTF_MAIN_VERSION 2
#define BTF_SUB_VERSION 0
#define BTF_SUBSUB_VERSION 0
Expand Down
2 changes: 1 addition & 1 deletion CAMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

cmake_minimum_required ( VERSION 3.19 )

set ( CAMD_DATE "Nov 4, 2022" )
set ( CAMD_DATE "Nov 12, 2022" )
set ( CAMD_VERSION_MAJOR 3 )
set ( CAMD_VERSION_MINOR 0 )
set ( CAMD_VERSION_SUB 0 )
Expand Down
2 changes: 1 addition & 1 deletion CAMD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Nov 4, 2022: version 3.0.0
Nov 12, 2022: version 3.0.0

* using CMake build system
* integers: int (32-bit) and SuiteSparse_long (nominally 64-bit) replaced
Expand Down
2 changes: 1 addition & 1 deletion CAMD/Doc/camd_version.tex
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% version of SuiteSparse/CAMD
\date{VERSION 3.0.0, Nov 4, 2022}
\date{VERSION 3.0.0, Nov 12, 2022}
2 changes: 1 addition & 1 deletion CAMD/Include/camd.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ SUITESPARSE_PUBLIC void camd_l_info (double Info [ ]) ;
* #endif
*/

#define CAMD_DATE "Nov 4, 2022"
#define CAMD_DATE "Nov 12, 2022"
#define CAMD_MAIN_VERSION 3
#define CAMD_SUB_VERSION 0
#define CAMD_SUBSUB_VERSION 0
Expand Down
2 changes: 1 addition & 1 deletion CCOLAMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

cmake_minimum_required ( VERSION 3.19 )

set ( CCOLAMD_DATE "Nov 4, 2022" )
set ( CCOLAMD_DATE "Nov 12, 2022" )
set ( CCOLAMD_VERSION_MAJOR 3 )
set ( CCOLAMD_VERSION_MINOR 0 )
set ( CCOLAMD_VERSION_SUB 0 )
Expand Down
2 changes: 1 addition & 1 deletion CCOLAMD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Nov 4, 2022: version 3.0.0
Nov 12, 2022: version 3.0.0

* using CMake build system
* integers: int (32-bit) and SuiteSparse_long (nominally 64-bit) replaced
Expand Down
2 changes: 1 addition & 1 deletion CCOLAMD/Include/ccolamd.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern "C" {
* #endif
*/

#define CCOLAMD_DATE "Nov 4, 2022"
#define CCOLAMD_DATE "Nov 12, 2022"
#define CCOLAMD_MAIN_VERSION 3
#define CCOLAMD_SUB_VERSION 0
#define CCOLAMD_SUBSUB_VERSION 0
Expand Down
53 changes: 17 additions & 36 deletions CHOLMOD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# cmake 3.22 is required to find the BLAS/LAPACK
cmake_minimum_required ( VERSION 3.22 )

set ( CHOLMOD_DATE "Nov 4, 2022" )
set ( CHOLMOD_DATE "Nov 12, 2022" )
set ( CHOLMOD_VERSION_MAJOR 4 )
set ( CHOLMOD_VERSION_MINOR 0 )
set ( CHOLMOD_VERSION_SUB 0 )
Expand All @@ -34,10 +34,7 @@ set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/../CCOLAMD/cmake_modules
${CMAKE_SOURCE_DIR}/../SuiteSparse_config/cmake_modules )

if ( NOT DEFINED ENABLE_CUDA )
# default is to use CUDA, if available
set ( ENABLE_CUDA true )
endif ( )
option ( ENABLE_CUDA "Enable CUDA acceleration" on )

if ( NGPL )
# NGPL: if true, do not include any GPL-licensed module
Expand Down Expand Up @@ -104,10 +101,8 @@ find_package ( AMD 3.0.0 REQUIRED )
# Check module
#---------------------------------------------------------------------------

if ( NOT DEFINED NCHECK )
# by default, build the Check module
set ( NCHECK false )
endif ( )
option ( NCHECK "ON: do not use Check Module. OFF (default): use Check Module" off )

if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/Check )
# Check module does not appear so don't use it
set ( NCHECK true )
Expand All @@ -121,10 +116,8 @@ find_package ( AMD 3.0.0 REQUIRED )
# MatrixOps module
#---------------------------------------------------------------------------

if ( NOT DEFINED NMATRIXOPS )
# by default, build the MatrixOps module
set ( NMATRIXOPS false )
endif ( )
option ( NMATRIXOPS "ON: do not use MatrixOps Module. OFF (default): use MatrixOps Module" off )

if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/MatrixOps )
# MatrixOps module does not appear so don't use it
set ( NMATRIXOPS true )
Expand All @@ -138,10 +131,8 @@ find_package ( AMD 3.0.0 REQUIRED )
# Cholesky module: requires AMD, COLAMD
#---------------------------------------------------------------------------

if ( NOT DEFINED NCHOLESKY )
# by default, build the Cholesky module
set ( NCHOLESKY false )
endif ( )
option ( NCHOLESKY "ON: do not use Cholesky Module. OFF (default): use Cholesky Module" off )

if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/Cholesky )
# Cholesky module does not appear so don't use it
set ( NCHOLESKY true )
Expand All @@ -158,10 +149,8 @@ find_package ( AMD 3.0.0 REQUIRED )
# Modify module: requires Cholesky
#---------------------------------------------------------------------------

if ( NOT DEFINED NMODIFY )
# by default, build the Modify module
set ( NMODIFY false )
endif ( )
option ( NMODIFY "ON: do not use Modify Module. OFF (default): use Modify Module" off )

if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/Modify )
# Modify module does not appear so don't use it
set ( NMODIFY true )
Expand All @@ -175,10 +164,7 @@ find_package ( AMD 3.0.0 REQUIRED )
# interfaces to CAMD and CCOLAMD
#---------------------------------------------------------------------------

if ( NOT DEFINED NCAMD )
# by default, compile with CAMD and CCOLAMD
set ( NCAMD false )
endif ( )
option ( NCAMD "ON: do not use CAMD/CCOLAMD. OFF (default): use CAMD/CCOLAMD" off )

if ( NOT NCAMD )
# find CAMD and CCOLAMD
Expand All @@ -200,20 +186,18 @@ find_package ( AMD 3.0.0 REQUIRED )
# Partition module: requires Cholesky, CAMD, CCOLAMD, and METIS
#---------------------------------------------------------------------------

if ( NOT DEFINED NPARTITION )
# by default, build the Partition module
set ( NPARTITION false )
endif ( )
option ( NPARTITION "ON: do not use METIS. OFF (default): use METIS" off )

if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/Partition )
# Partition module does not appear so don't use it
set ( NPARTITION true )
# The Partition module does not exist, so skip CAMD and CCOLAMD, since
# the Partition Module is CHOLMOD's only interface to CAMD and CCOLAMD.
set ( NCAMD true )
endif ( )
if ( NPARTITION )
# if NPARTITION is true: do not build the Partition module
add_compile_definitions ( NPARTITION )
# Partition module is not being built, so skip CAMD and CCOLAMD, since
# the Partition Module is CHOLMOD's only interface to CAMD and CCOLAMD.
set ( NCAMD true )
endif ( )

if ( NCAMD )
Expand All @@ -225,10 +209,7 @@ find_package ( AMD 3.0.0 REQUIRED )
# Supernodal module: requires Cholesky, BLAS, and LAPACK
#---------------------------------------------------------------------------

if ( NOT DEFINED NSUPERNODAL )
# by default, build the Supernodal module
set ( NSUPERNODAL false )
endif ( )
option ( NSUPERNODAL "ON: do not use Supernodal Module. OFF (default): use Supernodal Module" off )

if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/Supernodal )
# Supernodal module does not appear so don't use it
Expand Down
6 changes: 5 additions & 1 deletion CHOLMOD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Nov 4, 2022: version 4.0.0
Nov 12, 2022: version 4.0.0

* using CMake build system
* integers: int (32-bit) and SuiteSparse_long (nominally 64-bit) replaced
Expand All @@ -9,6 +9,10 @@ Nov 4, 2022: version 4.0.0
* libcholmod_cuda.so: CUDA support split into a separate library.
* OpenMP: CHOLMOD_OMP_NUM_THREADS removed, replaced with run time
controls (Common->nthreads_max, Common->chunk)
* METIS: no longer built as a separate libary. A slightly modified version
of METIS is embedded into the CHOLMOD library, with a prefix appended
to each function name so it won't conflict with a standard METIS
library that may already exist in the application.

June 30, 2020: no change to version number

Expand Down
2 changes: 1 addition & 1 deletion CHOLMOD/Doc/cholmod_version.tex
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% version of SuiteSparse/CHOLMOD
\date{VERSION 4.0.0, Nov 4, 2022}
\date{VERSION 4.0.0, Nov 12, 2022}
2 changes: 1 addition & 1 deletion CHOLMOD/Include/cholmod.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
#ifndef CHOLMOD_H
#define CHOLMOD_H

#define CHOLMOD_DATE "Nov 4, 2022"
#define CHOLMOD_DATE "Nov 12, 2022"
#define CHOLMOD_MAIN_VERSION 4
#define CHOLMOD_SUB_VERSION 0
#define CHOLMOD_SUBSUB_VERSION 0
Expand Down
10 changes: 2 additions & 8 deletions CHOLMOD/MATLAB/cholmod_install.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
function cholmod_install (metis_path)
function cholmod_install
%CHOLMOD_INSTALL compile and install CHOLMOD, AMD, COLAMD, CCOLAMD, CAMD
%
% Example:
% cholmod_install % compiles using METIS
% cholmod_install ('/my/metis') % using non-default path to METIS
% cholmod_install ('no metis') % do not use METIS at all
%
% CHOLMOD relies on AMD and COLAMD, for its ordering options, and can
% optionally use CCOLAMD, CAMD, and METIS as well. By default, CCOLAMD, CAMD,
Expand All @@ -22,12 +20,8 @@ function cholmod_install (metis_path)
% Copyright 2006-2022, Timothy A. Davis, All Rights Reserved.
% SPDX-License-Identifier: GPL-2.0+

if (nargin < 1)
metis_path = '../../SuiteSparse_metis' ;
end

% compile CHOLMOD and add to the path
cholmod_make (metis_path) ;
cholmod_make ;
cholmod_path = pwd ;
addpath (cholmod_path)

Expand Down
Loading

0 comments on commit 0fdad8e

Please sign in to comment.