Skip to content

Commit

Permalink
v4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Oct 19, 2019
1 parent 6e62387 commit 273cb7f
Show file tree
Hide file tree
Showing 295 changed files with 14,530 additions and 4,140 deletions.
11 changes: 7 additions & 4 deletions AMD/Demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ C = $(CC) $(CF) -I../Include -I../../SuiteSparse_config

INC = ../Include/amd.h ../../SuiteSparse_config/SuiteSparse_config.h

LIB2 = ../../SuiteSparse_config/libsuitesparseconfig.a $(LIB)

library:
( cd ../../SuiteSparse_config ; $(MAKE) )
( cd ../Lib ; $(MAKE) )

f77lib:
Expand All @@ -23,22 +26,22 @@ f77lib:
dist:

amd_demo: amd_demo.c library $(INC)
$(C) -o amd_demo amd_demo.c ../Lib/libamd.a $(LIB)
$(C) -o amd_demo amd_demo.c ../Lib/libamd.a $(LIB2)
./amd_demo > my_amd_demo.out
- diff amd_demo.out my_amd_demo.out

amd_l_demo: amd_l_demo.c library $(INC)
$(C) -o amd_l_demo amd_l_demo.c ../Lib/libamd.a $(LIB)
$(C) -o amd_l_demo amd_l_demo.c ../Lib/libamd.a $(LIB2)
./amd_l_demo > my_amd_l_demo.out
- diff amd_l_demo.out my_amd_l_demo.out

amd_demo2: amd_demo2.c library $(INC)
$(C) -o amd_demo2 amd_demo2.c ../Lib/libamd.a $(LIB)
$(C) -o amd_demo2 amd_demo2.c ../Lib/libamd.a $(LIB2)
./amd_demo2 > my_amd_demo2.out
- diff amd_demo2.out my_amd_demo2.out

amd_simple: amd_simple.c library $(INC)
$(C) -o amd_simple amd_simple.c ../Lib/libamd.a $(LIB)
$(C) -o amd_simple amd_simple.c ../Lib/libamd.a $(LIB2)
./amd_simple > my_amd_simple.out
- diff amd_simple.out my_amd_simple.out

Expand Down
6 changes: 3 additions & 3 deletions AMD/Demo/amd_demo.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AMD version 2.3.0, date: Jun 1, 2012
AMD version 2.4.0, date: July 31, 2013
AMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:

AMD version 2.3.0, Jun 1, 2012: approximate minimum degree ordering
AMD version 2.4.0, July 31, 2013: approximate minimum degree ordering
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -115,7 +115,7 @@ Plot of input matrix pattern:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from amd_order: 0 (should be 0)

AMD version 2.3.0, Jun 1, 2012, results:
AMD version 2.4.0, July 31, 2013, results:
status: OK
n, dimension of A: 24
nz, number of nonzeros in A: 160
Expand Down
4 changes: 2 additions & 2 deletions AMD/Demo/amd_demo2.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AMD demo, with a jumbled version of the 24-by-24
Harwell/Boeing matrix, can_24:

AMD version 2.3.0, Jun 1, 2012: approximate minimum degree ordering
AMD version 2.4.0, July 31, 2013: approximate minimum degree ordering
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -144,7 +144,7 @@ Plot of symmetric matrix to be ordered by amd_order:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from amd_order: 1 (should be 1)

AMD version 2.3.0, Jun 1, 2012, results:
AMD version 2.4.0, July 31, 2013, results:
status: OK, but jumbled
n, dimension of A: 24
nz, number of nonzeros in A: 102
Expand Down
6 changes: 3 additions & 3 deletions AMD/Demo/amd_l_demo.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AMD version 2.3.0, date: Jun 1, 2012
AMD version 2.4.0, date: July 31, 2013
AMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:

AMD version 2.3.0, Jun 1, 2012: approximate minimum degree ordering
AMD version 2.4.0, July 31, 2013: approximate minimum degree ordering
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -115,7 +115,7 @@ Plot of input matrix pattern:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from amd_l_order: 0 (should be 0)

AMD version 2.3.0, Jun 1, 2012, results:
AMD version 2.4.0, July 31, 2013, results:
status: OK
n, dimension of A: 24
nz, number of nonzeros in A: 160
Expand Down
Binary file modified AMD/Doc/AMD_UserGuide.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions AMD/Doc/AMD_UserGuide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
This work was supported by the EPSRC under grant GR/R46441.
}}

\date{VERSION 2.3.1, Jun 20, 2012}
\date{VERSION 2.4.0, July 31, 2013}
\maketitle

%------------------------------------------------------------------------------
Expand All @@ -45,7 +45,7 @@
\end{abstract}
%------------------------------------------------------------------------------

AMD Copyright\copyright 2011 by Timothy A.
AMD Copyright\copyright 2013 by Timothy A.
Davis, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved.
AMD is available under alternate licences; contact T. Davis for details.

Expand Down
4 changes: 4 additions & 0 deletions AMD/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
July 31, 2013: version 2.4.0

* changed malloc and printf pointers to use SuiteSparse_config

Jun 20, 2012: verison 2.3.1

* minor update for Windows (removed filesep)
Expand Down
21 changes: 5 additions & 16 deletions AMD/Include/amd.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
/* AMD Version 2.2, Copyright (c) 2007 by Timothy A. Davis, */
/* AMD Version 2.4, Copyright (c) 1996-2013 by Timothy A. Davis, */
/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */
/* email: [email protected] */
/* ------------------------------------------------------------------------- */
Expand Down Expand Up @@ -307,18 +307,7 @@ SuiteSparse_long amd_l_valid
/* AMD memory manager and printf routines */
/* ------------------------------------------------------------------------- */

/* The user can redefine these to change the malloc, free, and printf routines
* that AMD uses. */

#ifndef EXTERN
#define EXTERN extern
#endif

EXTERN void *(*amd_malloc) (size_t) ; /* pointer to malloc */
EXTERN void (*amd_free) (void *) ; /* pointer to free */
EXTERN void *(*amd_realloc) (void *, size_t) ; /* pointer to realloc */
EXTERN void *(*amd_calloc) (size_t, size_t) ; /* pointer to calloc */
EXTERN int (*amd_printf) (const char *, ...) ; /* pointer to printf */
/* moved to SuiteSparse_config.c */

/* ------------------------------------------------------------------------- */
/* AMD Control and Info arrays */
Expand Down Expand Up @@ -397,11 +386,11 @@ void amd_l_info (double Info [ ]) ;
* Versions 1.1 and earlier of AMD do not include a #define'd version number.
*/

#define AMD_DATE "Jun 20, 2012"
#define AMD_DATE "July 31, 2013"
#define AMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub))
#define AMD_MAIN_VERSION 2
#define AMD_SUB_VERSION 3
#define AMD_SUBSUB_VERSION 1
#define AMD_SUB_VERSION 4
#define AMD_SUBSUB_VERSION 0
#define AMD_VERSION AMD_VERSION_CODE(AMD_MAIN_VERSION,AMD_SUB_VERSION)

#ifdef __cplusplus
Expand Down
31 changes: 5 additions & 26 deletions AMD/Include/amd_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@
/* This file is for internal use in AMD itself, and does not normally need to
* be included in user code (it is included in UMFPACK, however). All others
* should use amd.h instead.
*
* The following compile-time definitions affect how AMD is compiled.
*
* -DNPRINT
*
* Disable all printing. stdio.h will not be included. Printing can
* be re-enabled at run-time by setting the global pointer amd_printf
* to printf (or mexPrintf for a MATLAB mexFunction).
*
* -DNMALLOC
*
* No memory manager is defined at compile-time. You MUST define the
* function pointers amd_malloc, amd_free, amd_realloc, and
* amd_calloc at run-time for AMD to work properly.
*/

/* ========================================================================= */
Expand Down Expand Up @@ -211,13 +197,6 @@

#endif

/* ========================================================================= */
/* === PRINTF macro ======================================================== */
/* ========================================================================= */

/* All output goes through the PRINTF macro. */
#define PRINTF(params) { if (amd_printf != NULL) (void) amd_printf params ; }

/* ------------------------------------------------------------------------- */
/* AMD routine definitions (not user-callable) */
/* ------------------------------------------------------------------------- */
Expand Down Expand Up @@ -328,11 +307,11 @@ GLOBAL void AMD_dump
#define ASSERT(expression) (assert (expression))
#endif

#define AMD_DEBUG0(params) { PRINTF (params) ; }
#define AMD_DEBUG1(params) { if (AMD_debug >= 1) PRINTF (params) ; }
#define AMD_DEBUG2(params) { if (AMD_debug >= 2) PRINTF (params) ; }
#define AMD_DEBUG3(params) { if (AMD_debug >= 3) PRINTF (params) ; }
#define AMD_DEBUG4(params) { if (AMD_debug >= 4) PRINTF (params) ; }
#define AMD_DEBUG0(params) { SUITESPARSE_PRINTF (params) ; }
#define AMD_DEBUG1(params) { if (AMD_debug >= 1) SUITESPARSE_PRINTF (params) ; }
#define AMD_DEBUG2(params) { if (AMD_debug >= 2) SUITESPARSE_PRINTF (params) ; }
#define AMD_DEBUG3(params) { if (AMD_debug >= 3) SUITESPARSE_PRINTF (params) ; }
#define AMD_DEBUG4(params) { if (AMD_debug >= 4) SUITESPARSE_PRINTF (params) ; }

#else

Expand Down
5 changes: 1 addition & 4 deletions AMD/Lib/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ AMDL = $(addsuffix .o, $(subst amd_,amd_l_,$(AMD)))
# compile each int and long routine (with no real/complex version)
#-------------------------------------------------------------------------------

amd_global.o: ../Source/amd_global.c $(INC)
$(C) -c $< -o $@

amd_i_%.o: ../Source/amd_%.c $(INC)
$(C) -DDINT -c $< -o $@

Expand All @@ -43,7 +40,7 @@ amd_l_%.o: ../Source/amd_%.c $(INC)
# Create the libamd.a library (C versions only)
#-------------------------------------------------------------------------------

libamd.a: amd_global.o $(AMDI) $(AMDL)
libamd.a: $(AMDI) $(AMDL)
$(ARCHIVE) libamd.a $^
- $(RANLIB) libamd.a

Expand Down
3 changes: 1 addition & 2 deletions AMD/Lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ everything:
$(C) -DDLONG -c ../Source/amd_info.c -o amd_l_info.o
$(C) -DDLONG -c ../Source/amd_valid.c -o amd_l_valid.o
$(C) -DDLONG -c ../Source/amd_preprocess.c -o amd_l_preprocess.o
$(C) -c ../Source/amd_global.c
$(ARCHIVE) ../Lib/libamd.a \
amd_i_aat.o amd_i_1.o amd_i_2.o amd_i_dump.o \
amd_i_postorder.o amd_i_post_tree.o amd_i_defaults.o amd_i_order.o \
amd_i_control.o amd_i_info.o amd_i_valid.o amd_l_aat.o amd_l_1.o \
amd_l_2.o amd_l_dump.o amd_l_postorder.o amd_l_post_tree.o \
amd_l_defaults.o amd_l_order.o amd_l_control.o amd_l_info.o \
amd_l_valid.o amd_i_preprocess.o amd_l_preprocess.o amd_global.o
amd_l_valid.o amd_i_preprocess.o amd_l_preprocess.o
- $(RANLIB) ../Lib/libamd.a

#-------------------------------------------------------------------------------
Expand Down
11 changes: 9 additions & 2 deletions AMD/MATLAB/amd_make.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,23 @@
end

i = sprintf ('-I../Include -I../../SuiteSparse_config') ;
cmd = sprintf ('mex -O %s -DDLONG -output amd2 %s amd_mex.c', d, i) ;
cmd = sprintf ('mex -O %s -DDLONG -output amd2 %s amd_mex.c %s', d, i, ...
'../../SuiteSparse_config/SuiteSparse_config.c') ;
files = {'amd_order', 'amd_dump', 'amd_postorder', 'amd_post_tree', ...
'amd_aat', 'amd_2', 'amd_1', 'amd_defaults', 'amd_control', ...
'amd_info', 'amd_valid', 'amd_global', 'amd_preprocess' } ;
'amd_info', 'amd_valid', 'amd_preprocess' } ;
for i = 1 : length (files)
cmd = sprintf ('%s ../Source/%s.c', cmd, files {i}) ;
end
if (details)
fprintf ('%s\n', cmd) ;
end

if (~(ispc || ismac))
% for POSIX timing routine
cmd = [cmd ' -lrt'] ;
end

eval (cmd) ;

fprintf ('AMD successfully compiled.\n') ;
6 changes: 0 additions & 6 deletions AMD/MATLAB/amd_mex.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ void mexFunction
/* get control parameters */
/* --------------------------------------------------------------------- */

amd_malloc = mxMalloc ;
amd_free = mxFree ;
amd_calloc = mxCalloc ;
amd_realloc = mxRealloc ;
amd_printf = mexPrintf ;

spumoni = 0 ;
if (nargin == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion AMD/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# AMD Makefile (for GNU Make or original make)
#------------------------------------------------------------------------------

VERSION = 2.3.1
VERSION = 2.4.0

default: all

Expand Down
2 changes: 1 addition & 1 deletion AMD/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AMD, Copyright (c) 2009-2012 by Timothy A. Davis (http://www.suitesparse.com),
AMD, Copyright (c) 2009-2013 by Timothy A. Davis (http://www.suitesparse.com),
Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. AMD is available
under alternate licences; contact T. Davis for details.

Expand Down
13 changes: 7 additions & 6 deletions AMD/Source/amd_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,31 @@ GLOBAL void AMD_control
aggressive = AMD_DEFAULT_AGGRESSIVE ;
}

PRINTF (("\nAMD version %d.%d.%d, %s: approximate minimum degree ordering\n"
SUITESPARSE_PRINTF ((
"\nAMD version %d.%d.%d, %s: approximate minimum degree ordering\n"
" dense row parameter: %g\n", AMD_MAIN_VERSION, AMD_SUB_VERSION,
AMD_SUBSUB_VERSION, AMD_DATE, alpha)) ;

if (alpha < 0)
{
PRINTF ((" no rows treated as dense\n")) ;
SUITESPARSE_PRINTF ((" no rows treated as dense\n")) ;
}
else
{
PRINTF ((
SUITESPARSE_PRINTF ((
" (rows with more than max (%g * sqrt (n), 16) entries are\n"
" considered \"dense\", and placed last in output permutation)\n",
alpha)) ;
}

if (aggressive)
{
PRINTF ((" aggressive absorption: yes\n")) ;
SUITESPARSE_PRINTF ((" aggressive absorption: yes\n")) ;
}
else
{
PRINTF ((" aggressive absorption: no\n")) ;
SUITESPARSE_PRINTF ((" aggressive absorption: no\n")) ;
}

PRINTF ((" size of AMD integer: %d\n\n", sizeof (Int))) ;
SUITESPARSE_PRINTF ((" size of AMD integer: %d\n\n", sizeof (Int))) ;
}
Loading

0 comments on commit 273cb7f

Please sign in to comment.