Skip to content

Commit

Permalink
v4.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Oct 19, 2019
1 parent 8339b36 commit 1ae82cf
Show file tree
Hide file tree
Showing 58 changed files with 890 additions and 109 deletions.
39 changes: 0 additions & 39 deletions AMD/Doc/License

This file was deleted.

91 changes: 91 additions & 0 deletions AMD/Doc/License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
AMD, Copyright (c), 1996-2015, Timothy A. Davis,
Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved.

AMD License: At the user's option, you may use AMD under either the LGPL
version 2.1 license, or the BSD 3-clause license. You may not use both
licenses, nor may you mix-and-match clauses from each license. To use a
license, in the documentation for your application simply state either of the
following, replacing <YOUR APPLICATION> with the name of your application:

AMD, Copyright (c), 1996-2015, Timothy A. Davis,
Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved.
Used in <YOUR APPLICATION> under the BSD 3-clause license.

or

AMD, Copyright (c), 1996-2015, Timothy A. Davis,
Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved.
Used in <YOUR APPLICATION> under the LGPL v2.1 license.

In the event that your package <A> includes another package <B> by another
author, and <A> and <B> use AMD under different licenses, you may select
one license to apply to both uses of AMD in the combined application.

Availability:

http://www.suitesparse.com

-------------------------------------------------------------------------------
BSD 3-clause:
-------------------------------------------------------------------------------

Copyright (c), 1996-2015, Timothy A. Davis,
Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the organizations to which the authors are
affiliated, nor the names of its contributors may be used to endorse
or promote products derived from this software without specific prior
written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

-------------------------------------------------------------------------------
LGPL version 2.1:
-------------------------------------------------------------------------------

Your use or distribution of AMD or any modified version of
AMD implies that you agree to this License.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA

Permission is hereby granted to use or copy this program under the
terms of the GNU LGPL, provided that the Copyright, this License,
and the Availability of the original version is retained on all copies.
User documentation of any code that uses this code or any modified
version of this code must cite the Copyright, this License, the
Availability note, and "Used by permission." Permission to modify
the code and to distribute modified code is granted, provided the
Copyright, this License, and the Availability note are retained,
and a notice that the code was modified is included.

-------------------------------------------------------------------------------
6 changes: 6 additions & 0 deletions CHOLMOD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
July 14, 2015: version 3.0.6

* NGPL did not disable MatrixOps, Modify, and Supernodal modules,
contradicting its definition in the User Guide. Fixed in this release.
* added MATLAB interface for row add/delete (lurowmod mexFunction)

Jan 19, 2015: version 3.0.5

* minor bug fix to cholmod_symmetry.c for the 'quick return'
Expand Down
2 changes: 2 additions & 0 deletions CHOLMOD/Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ M = \
../MATLAB/ldlsolve.m \
../MATLAB/ldlsplit.m \
../MATLAB/ldlupdate.m \
../MATLAB/ldlrowmod.m \
../MATLAB/metis.m \
../MATLAB/nesdis.m \
../MATLAB/resymbol.m \
Expand All @@ -61,6 +62,7 @@ UserGuide.pdf: UserGuide.tex UserGuide.bib $(I) $(C) $(M) Makefile getproto rule
./getmproto ../MATLAB/ldlsolve.m > _ldlsolve_m.tex
./getmproto ../MATLAB/ldlsplit.m > _ldlsplit_m.tex
./getmproto ../MATLAB/ldlupdate.m > _ldlupdate_m.tex
./getmproto ../MATLAB/ldlrowmod.m > _ldlrowmod_m.tex
./getmproto ../MATLAB/metis.m > _metis_m.tex
./getmproto ../MATLAB/mread.m > _mread_m.tex
./getmproto ../MATLAB/spsym.m > _spsym_m.tex
Expand Down
Binary file modified CHOLMOD/Doc/UserGuide.pdf
Binary file not shown.
7 changes: 6 additions & 1 deletion CHOLMOD/Doc/UserGuide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
\title{User Guide for CHOLMOD: a sparse Cholesky factorization and
modification package}

\date{VERSION 3.0.5, Jan 19, 2015}
\date{VERSION 3.0.6, July 14, 2015}
\maketitle

%-------------------------------------------------------------------------------
Expand Down Expand Up @@ -329,7 +329,9 @@
\item {\tt -DCAMD}: do not include the interfaces to CAMD, CCOLAMD,
and CSYMAMD in the Partition module. License: GNU LGPL.
\item {\tt -DNGPL}: do not include any GNU GPL Modules in the CHOLMOD library.
Note that the Demo requires the MatrixOps module.
\item {\tt -DNMATRIXOPS}: do not include the MatrixOps module. License: GNU GPL.
Note that the Demo requires the MatrixOps module.
\item {\tt -DNMODIFY}: do not include the Modify module. License: GNU GPL.
\item {\tt -DNSUPERNODAL}: do not include the Supernodal module. License: GNU GPL.
\item {\tt -DNPRINT}: do not print anything.
Expand Down Expand Up @@ -397,6 +399,7 @@
{\tt ldlsolve} & {\tt x = L'}$\backslash${\tt (D}$\backslash${\tt (L}$\backslash${\tt b))} \\
{\tt ldlsplit} & split the output of {\tt ldlchol} into {\tt L} and {\tt D} \\
{\tt ldlupdate} & update/downdate an {\tt L*D*L'} factorization \\
{\tt ldlrowmod} & add/delete a row from an {\tt L*D*L'} factorization \\
{\tt metis} & interface to {\tt METIS\_NodeND} ordering \\
{\tt mread} & read a sparse or dense Matrix Market file \\
{\tt mwrite} & write a sparse or dense Matrix Market file \\
Expand Down Expand Up @@ -434,6 +437,8 @@ \subsection{{\tt ldlsplit}: split an $\m{LDL}\tr$ factorization} \input{_ldlspl
\newpage
\subsection{{\tt ldlupdate}: update/downdate an $\m{LDL}\tr$ factorization} \input{_ldlupdate_m.tex}
\newpage
\subsection{{\tt ldlrowmod}: add/delete a row from an $\m{LDL}\tr$ factorization} \input{_ldlrowmod_m.tex}
\newpage
\subsection{{\tt mread}: read a sparse or dense matrix from a Matrix Market file}\input{_mread_m.tex}
\subsection{{\tt mwrite}: write a sparse or dense matrix to a Matrix Market file} \input{_mwrite_m.tex}
\newpage
Expand Down
4 changes: 2 additions & 2 deletions CHOLMOD/Include/cholmod_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@

#define CHOLMOD_HAS_VERSION_FUNCTION

#define CHOLMOD_DATE "Jan 7, 2015"
#define CHOLMOD_DATE "July 14, 2015"
#define CHOLMOD_VER_CODE(main,sub) ((main) * 1000 + (sub))
#define CHOLMOD_MAIN_VERSION 3
#define CHOLMOD_SUB_VERSION 0
#define CHOLMOD_SUBSUB_VERSION 5
#define CHOLMOD_SUBSUB_VERSION 6
#define CHOLMOD_VERSION \
CHOLMOD_VER_CODE(CHOLMOD_MAIN_VERSION,CHOLMOD_SUB_VERSION)

Expand Down
4 changes: 3 additions & 1 deletion CHOLMOD/MATLAB/Contents.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
% lchol - sparse A=L*L' factorization.
% ldlchol - sparse A=LDL' factorization
% ldlupdate - multiple-rank update or downdate of a sparse LDL' factorization.
% ldlrowmod - add/delete row from a sparse LDL' factorization.
% resymbol - recomputes the symbolic Cholesky factorization of the matrix A.
% ldlsolve - solve LDL'x=b using a sparse LDL' factorization
% ldlsplit - split an LDL' factorization into L and D.
Expand All @@ -25,6 +26,7 @@
% cholmod_install - compile and install CHOLMOD, AMD, COLAMD, CCOLAMD, CAMD
% cholmod_make - compiles the CHOLMOD mexFunctions
% graph_demo - graph partitioning demo
% cholmod_updown_demo - a demo of update/downdate and row add/delete functions
%
%
% Example:
Expand All @@ -33,4 +35,4 @@
% Note: cholmod has been renamed cholmod2, so as not to conflict with itself
% (the MATLAB built-in cholmod function).

% Copyright 2006-2007, Timothy A. Davis, http://www.suitesparse.com
% Copyright 2006-2015, Timothy A. Davis, http://www.suitesparse.com
4 changes: 3 additions & 1 deletion CHOLMOD/MATLAB/Test/cholmod_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function cholmod_test (nmat, do_diary)
% do_diary: 1 to save results in a diary, 0 otherwise. Default 0.
%
% cholmod_demo: run tests on a few random matrices
% cholmod_updown_demo: run tests for update/downdate and row add/delete
% graph_demo: graph partitioning demo
% test0: test most CHOLMOD functions
% test1: test sparse2
Expand Down Expand Up @@ -112,7 +113,8 @@ function cholmod_test (nmat, do_diary)

try

cholmod_demo ; waitbar ( 1/tt, h, 'CHOLMOD graph demo');
cholmod_demo ; waitbar ( 1/tt, h, 'CHOLMOD up/down demo');
cholmod_update_demo ; waitbar ( 1/tt, h, 'CHOLMOD graph demo');
if (do_metis)
graph_demo ;
end
Expand Down
44 changes: 42 additions & 2 deletions CHOLMOD/MATLAB/Test/test0.m
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ function test0 (nmat)
else
fprintf (' no fill-in\n') ;
end
clear LD

% check the factorization, LD2 has LDL' factorization of S+C*C'
[L,D] = ldlsplit (LD2) ;
Expand Down Expand Up @@ -275,11 +274,52 @@ function test0 (nmat)
err2 = norm (S2*x-b,1) / norm (S,1) ;
fprintf ('MATLAB residual: %6.1e (sparse b)\n', err2) ;

% ----------------------------------------------------------------------
% test the row delete
k = max (1, fix (n/2)) ;
tic
LD6 = ldlrowmod (LD,k) ;
t6 = toc ;
fprintf ('\nCHOLMOD time: ldlrowmod, delete %10.4f nnz(L) %d', ...
t6, nnz (LD6)) ;

I = speye (n) ;
S2 = S ;
S2 (k,:) = I (k,:) ;
S2 (:,k) = I (:,k) ;

% check the factorization, LD6 has LDL' factorization of S2
[L,D] = ldlsplit (LD6) ;
err = ldl_normest (S2, L, D) / lnorm ;
if (err > 1e-6)
error ('!') ;
end

% test the row add, by adding the row back in again
Ck = S (:,k) ;
S2 (:,k) = Ck ;
S2 (k,:) = Ck' ;

tic
LD7 = ldlrowmod (LD6,k,Ck) ;
t7 = toc ;
fprintf ('\nCHOLMOD time: ldlrowmod, add %10.4f nnz(L) %d', ...
t7, nnz (LD7)) ;

% check the factorization, LD7 has LDL' factorization of S
[L,D] = ldlsplit (LD7) ;
err = ldl_normest (S, L, D) / lnorm ;
if (err > 1e-6)
error ('!') ;
end

% ----------------------------------------------------------------------

% catch
% fprintf ('failed\n') ;
% end

clear A S C L R LD LD2 LD3 D p q C1 C2 LD3 S2 LD4 b x LD5
clear A S C L R LD LD2 LD3 D p q C1 C2 LD3 S2 LD4 b x LD5 I LDL6 LD7 Ck

end

Expand Down
26 changes: 23 additions & 3 deletions CHOLMOD/MATLAB/cholmod_demo.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,35 @@ function try_matrix (A)
t2, 1e-6 * fl / t2) ;

tic
LD = ldlupdate (LD,C) ;
LD2 = ldlupdate (LD,C) ;
t3 = toc ;
fprintf ('CHOLMOD ldlupdate(sparse(A),C) time: %6.2f (rank-1, C dense)\n', t3) ;

[L,D] = ldlsplit (LD) ;
L = full (L) ;
[L,D] = ldlsplit (LD2) ;
% L = full (L) ;
err = norm ((S+C*C') - L*D*L', 1) / norm (S,1) ;
fprintf ('err: %g\n', err) ;

k = max (1,fix(n/2)) ;
tic
LD3 = ldlrowmod (LD, k) ;
t4 = toc ;
fprintf ('CHOLMOD ldlrowmod(LD,k) time: %6.2f\n', t4) ;

[L,D] = ldlsplit (LD3) ;
S2 = S ;
I = speye (n) ;
S2 (k,:) = I (k,:) ;
S2 (:,k) = I (:,k) ;
err = norm (S2 - L*D*L', 1) / norm (S,1) ;
fprintf ('err: %g\n', err) ;

LD4 = ldlchol (S2) ;
[L,D] = ldlsplit (LD4) ;
% L = full (L) ;
err = norm (S2 - L*D*L', 1) / norm (S,1) ;
fprintf ('err: %g\n', err) ;

tic
R = chol (S) ; %#ok
s1 = toc ;
Expand Down
4 changes: 2 additions & 2 deletions CHOLMOD/MATLAB/cholmod_install.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ function cholmod_install (metis_path)
%
% See also analyze, bisect, chol2, cholmod2, etree2, lchol, ldlchol, ldlsolve,
% ldlupdate, metis, spsym, nesdis, septree, resymbol, sdmult, sparse2,
% symbfact2, mread, mwrite, amd2, colamd2, camd, ccolamd
% symbfact2, mread, mwrite, amd2, colamd2, camd, ccolamd, ldlrowmod

% Copyright 2006-2007, Timothy A. Davis
% Copyright 2006-2015, Timothy A. Davis

if (nargin < 1)
metis_path = '../../metis-4.0' ;
Expand Down
5 changes: 3 additions & 2 deletions CHOLMOD/MATLAB/cholmod_make.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ function cholmod_make (metis_path)
%
% See also analyze, bisect, chol2, cholmod2, etree2, lchol, ldlchol, ldlsolve,
% ldlupdate, metis, spsym, nesdis, septree, resymbol, sdmult, sparse2,
% symbfact2, mread, mwrite
% symbfact2, mread, mwrite, ldlrowmod

% Copyright 2006-2007, Timothy A. Davis, http://www.suitesparse.com
% Copyright 2006-2015, Timothy A. Davis, http://www.suitesparse.com

details = 0 ; % 1 if details of each command are to be printed

Expand Down Expand Up @@ -283,6 +283,7 @@ function cholmod_make (metis_path)
'ldlchol', ...
'ldlsolve', ...
'ldlupdate', ...
'ldlrowmod', ...
'metis', ...
'spsym', ...
'nesdis', ...
Expand Down
Loading

0 comments on commit 1ae82cf

Please sign in to comment.