diff --git a/AMD/Doc/AMD_UserGuide.pdf b/AMD/Doc/AMD_UserGuide.pdf index 8385a69851..2d9aa36125 100644 Binary files a/AMD/Doc/AMD_UserGuide.pdf and b/AMD/Doc/AMD_UserGuide.pdf differ diff --git a/AMD/Doc/AMD_UserGuide.tex b/AMD/Doc/AMD_UserGuide.tex index b932a71685..d8c2f66bf5 100644 --- a/AMD/Doc/AMD_UserGuide.tex +++ b/AMD/Doc/AMD_UserGuide.tex @@ -32,7 +32,7 @@ This work was supported by the EPSRC under grant GR/R46441. }} -\date{VERSION 2.3.0, Jun 1, 2012} +\date{VERSION 2.3.1, Jun 20, 2012} \maketitle %------------------------------------------------------------------------------ diff --git a/AMD/Doc/ChangeLog b/AMD/Doc/ChangeLog index 3224f733b1..f00073ca3e 100644 --- a/AMD/Doc/ChangeLog +++ b/AMD/Doc/ChangeLog @@ -1,3 +1,7 @@ +Jun 20, 2012: verison 2.3.1 + + * minor update for Windows (removed filesep) + Jun 1, 2012: version 2.3.0 * changed from UFconfig to SuiteSparse_config diff --git a/AMD/Include/amd.h b/AMD/Include/amd.h index c8076d5781..a38fd31bcb 100644 --- a/AMD/Include/amd.h +++ b/AMD/Include/amd.h @@ -397,11 +397,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 1, 2012" +#define AMD_DATE "Jun 20, 2012" #define AMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub)) #define AMD_MAIN_VERSION 2 #define AMD_SUB_VERSION 3 -#define AMD_SUBSUB_VERSION 0 +#define AMD_SUBSUB_VERSION 1 #define AMD_VERSION AMD_VERSION_CODE(AMD_MAIN_VERSION,AMD_SUB_VERSION) #ifdef __cplusplus diff --git a/AMD/MATLAB/amd_make.m b/AMD/MATLAB/amd_make.m index aa0493941d..a91333c130 100644 --- a/AMD/MATLAB/amd_make.m +++ b/AMD/MATLAB/amd_make.m @@ -15,14 +15,13 @@ d = '-largeArrayDims' ; end -i = sprintf ('-I..%sInclude -I..%s..%sSuiteSparse_config', ... - filesep, filesep, filesep) ; +i = sprintf ('-I../Include -I../../SuiteSparse_config') ; cmd = sprintf ('mex -O %s -DDLONG -output amd2 %s amd_mex.c', d, i) ; 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' } ; for i = 1 : length (files) - cmd = sprintf ('%s ..%sSource%s%s.c', cmd, filesep, filesep, files {i}) ; + cmd = sprintf ('%s ../Source/%s.c', cmd, files {i}) ; end if (details) fprintf ('%s\n', cmd) ; diff --git a/AMD/Makefile b/AMD/Makefile index 7275bd4f50..2db3476720 100644 --- a/AMD/Makefile +++ b/AMD/Makefile @@ -2,7 +2,7 @@ # AMD Makefile (for GNU Make or original make) #------------------------------------------------------------------------------ -VERSION = 2.3.0 +VERSION = 2.3.1 default: all diff --git a/CAMD/Doc/CAMD_UserGuide.pdf b/CAMD/Doc/CAMD_UserGuide.pdf index 3ec752e38e..aa9210592b 100644 Binary files a/CAMD/Doc/CAMD_UserGuide.pdf and b/CAMD/Doc/CAMD_UserGuide.pdf differ diff --git a/CAMD/Doc/CAMD_UserGuide.tex b/CAMD/Doc/CAMD_UserGuide.tex index 4be2c7bedf..8a47af0f6d 100644 --- a/CAMD/Doc/CAMD_UserGuide.tex +++ b/CAMD/Doc/CAMD_UserGuide.tex @@ -34,7 +34,7 @@ This work was supported by the EPSRC under grant GR/R46441. }} -\date{VERSION 2.3.0, Jun 1, 2012} +\date{VERSION 2.3.1, Jun 20, 2012} \maketitle %------------------------------------------------------------------------------ diff --git a/CAMD/Doc/ChangeLog b/CAMD/Doc/ChangeLog index 00524ea2d1..e689b4e99a 100644 --- a/CAMD/Doc/ChangeLog +++ b/CAMD/Doc/ChangeLog @@ -1,3 +1,7 @@ +Jun 20, 2012: verison 2.3.1 + + * minor update for Windows (removed filesep) + Jun 1, 2012: version 2.3.0 * changed from UFconfig to SuiteSparse_config diff --git a/CAMD/Include/camd.h b/CAMD/Include/camd.h index 05c0cd42ec..e2e190317a 100644 --- a/CAMD/Include/camd.h +++ b/CAMD/Include/camd.h @@ -404,11 +404,11 @@ void camd_l_info (double Info [ ]) ; * #endif */ -#define CAMD_DATE "Jun 1, 2012" +#define CAMD_DATE "Jun 20, 2012" #define CAMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub)) #define CAMD_MAIN_VERSION 2 #define CAMD_SUB_VERSION 3 -#define CAMD_SUBSUB_VERSION 0 +#define CAMD_SUBSUB_VERSION 1 #define CAMD_VERSION CAMD_VERSION_CODE(CAMD_MAIN_VERSION,CAMD_SUB_VERSION) #ifdef __cplusplus diff --git a/CAMD/MATLAB/camd_make.m b/CAMD/MATLAB/camd_make.m index 389a3ac892..7d851ea4ad 100644 --- a/CAMD/MATLAB/camd_make.m +++ b/CAMD/MATLAB/camd_make.m @@ -15,14 +15,13 @@ d = '-largeArrayDims' ; end -i = sprintf ('-I..%sInclude -I..%s..%sSuiteSparse_config', ... - filesep, filesep, filesep) ; +i = sprintf ('-I../Include -I../../SuiteSparse_config') ; cmd = sprintf ('mex -O %s -DDLONG -output camd %s camd_mex.c', d, i) ; files = {'camd_order', 'camd_dump', 'camd_postorder', ... 'camd_aat', 'camd_2', 'camd_1', 'camd_defaults', 'camd_control', ... 'camd_info', 'camd_valid', 'camd_global', 'camd_preprocess' } ; for i = 1 : length (files) - cmd = sprintf ('%s ..%sSource%s%s.c', cmd, filesep, filesep, files {i}) ; + cmd = sprintf ('%s ../Source/%s.c', cmd, files {i}) ; end if (details) fprintf ('%s\n', cmd) ; diff --git a/CAMD/Makefile b/CAMD/Makefile index a86205be34..8ad74132bf 100644 --- a/CAMD/Makefile +++ b/CAMD/Makefile @@ -2,7 +2,7 @@ # CAMD Makefile #------------------------------------------------------------------------------ -VERSION = 2.3.0 +VERSION = 2.3.1 default: demos diff --git a/CHOLMOD/Core/cholmod_common.c b/CHOLMOD/Core/cholmod_common.c index 05c0714fb7..2394fab2ae 100644 --- a/CHOLMOD/Core/cholmod_common.c +++ b/CHOLMOD/Core/cholmod_common.c @@ -201,7 +201,7 @@ int CHOLMOD(start) Common->cudaStreamPotrf [1] = NULL ; Common->cudaStreamPotrf [2] = NULL ; Common->cublasEventPotrf [0] = NULL ; - Common->cublasEventPotrf [2] = NULL ; + Common->cublasEventPotrf [1] = NULL ; Common->HostPinnedMemory = NULL ; Common->devPotrfWork = NULL ; Common->devSyrkGemmPtrLx = NULL ; diff --git a/CHOLMOD/Demo/Makefile b/CHOLMOD/Demo/Makefile index dc1a3ae139..72efc002ea 100644 --- a/CHOLMOD/Demo/Makefile +++ b/CHOLMOD/Demo/Makefile @@ -11,17 +11,23 @@ include ../../SuiteSparse_config/SuiteSparse_config.mk #------------------------------------------------------------------------------- # the optional Partition module requires METIS, CAMD, and CCOLAMD +I_WITH_PARTITION = LIB_WITH_PARTITION = -CONFIG = +CONFIG = -DNPARTITION +# check if METIS is requested and available ifeq (,$(findstring -DNPARTITION, $(CHOLMOD_CONFIG))) - # check if METIS is available - ifeq (../../metis-4.0, $(wildcard ../../metis-4.0)) - LIB_WITH_PARTITION = $(METIS) ../../CCOLAMD/Lib/libccolamd.a \ - ../../CAMD/Lib/libcamd.a - else - # METIS is not available, but CHOLMOD_CONFIG does not specify - # -DNPARTITION. Add it here so we can still compile CHOLMOD. - CONFIG = -DNPARTITION + # METIS is requested. See if it is available + ifeq ($(METIS_PATH), $(wildcard $(METIS_PATH))) + ifeq (../../CAMD, $(wildcard ../../CAMD)) + ifeq (../../CCOLAMD, $(wildcard ../../CCOLAMD)) + # METIS, CAMD, and CCOLAMD are available + LIB_WITH_PARTITION = $(METIS) ../../CCOLAMD/Lib/libccolamd.a \ + ../../CAMD/Lib/libcamd.a + I_WITH_PARTITION = -I$(METIS_PATH)/Lib \ + -I../../CCOLAMD/Include -I../../CAMD/Include + CONFIG = + endif + endif endif endif #------------------------------------------------------------------------------- @@ -74,10 +80,11 @@ library: ( cd ../Lib ; $(MAKE) ) ( cd ../../AMD ; $(MAKE) library ) ( cd ../../COLAMD ; $(MAKE) library ) -ifneq (,$(findstring -DNPARTITION, $(CHOLMOD_CONFIG))) +ifneq (,$(findstring -DNPARTITION, $(CONFIG))) else ( cd ../../CCOLAMD ; $(MAKE) library ) ( cd ../../CAMD ; $(MAKE) library ) + ( cd $(METIS_PATH) && $(MAKE) ) endif #------------------------------------------------------------------------------- diff --git a/CHOLMOD/Doc/ChangeLog b/CHOLMOD/Doc/ChangeLog index dc4f24e22a..40d40c4de7 100644 --- a/CHOLMOD/Doc/ChangeLog +++ b/CHOLMOD/Doc/ChangeLog @@ -1,3 +1,9 @@ +Jun 20, 2012: verison 2.0.1 + + * minor update for Windows (removed filesep, compiler port fix) + * minor changes to format of User Guide + * bug fix for GPU code (singular case) + Jun 1, 2012: version 2.0.0 * changed from UFconfig to SuiteSparse_config diff --git a/CHOLMOD/Doc/UserGuide.pdf b/CHOLMOD/Doc/UserGuide.pdf index 8843fa32e3..f70c269419 100644 Binary files a/CHOLMOD/Doc/UserGuide.pdf and b/CHOLMOD/Doc/UserGuide.pdf differ diff --git a/CHOLMOD/Doc/UserGuide.tex b/CHOLMOD/Doc/UserGuide.tex index 776430160b..7581d1ef20 100644 --- a/CHOLMOD/Doc/UserGuide.tex +++ b/CHOLMOD/Doc/UserGuide.tex @@ -9,7 +9,7 @@ \newcommand{\new}[1]{\overline{#1}} \topmargin 0in -\textheight 9in +\textheight 8.5in \oddsidemargin 0pt \evensidemargin 0pt \textwidth 6.5in @@ -21,7 +21,7 @@ \title{User Guide for CHOLMOD: a sparse Cholesky factorization and modification package} -\date{VERSION 2.0.0, Jun 1, 2012} +\date{VERSION 2.0.1, Jun 20, 2012} \maketitle %------------------------------------------------------------------------------- @@ -295,9 +295,9 @@ {\tt SuiteSparse\_config/SuiteSparse\_config.mk} file: \begin{itemize} \item {\tt CC = } your C compiler, such as {\tt cc}. -\item {\tt CFLAGS = } optimization flags, such as {\tt -O}. +\item {\tt CF = } optimization flags, such as {\tt -O}. \item {\tt RANLIB = } your system's {\tt ranlib} program, if needed. -\item {\tt AR =} the command to create a library (such as {\tt ar}). +\item {\tt ARCHIVE =} the command to create a library (such as {\tt ar}). \item {\tt RM =} the command to delete a file. \item {\tt MV =} the command to rename a file. \item {\tt F77 =} the command to compile a Fortran program (optional). @@ -420,6 +420,7 @@ \subsection{{\tt cholmod\_demo}: a short demo program} \input{_cholmod_demo_m \subsection{{\tt cholmod\_make}: compile CHOLMOD in MATLAB} \input{_cholmod_make_m.tex} \newpage \subsection{{\tt etree2}: same as {\tt etree}} \input{_etree2_m.tex} +\newpage \subsection{{\tt graph\_demo}: graph partitioning demo} \input{_graph_demo_m.tex} \newpage \subsection{{\tt lchol}: $\m{LL}\tr$ factorization} \input{_lchol_m.tex} @@ -489,30 +490,6 @@ \subsection{{\tt cholmod\_make}: compiling CHOLMOD in MATLAB} The {\tt cholmod\_make} handles this redefinition without making any changes to your METIS source code. -%------------------------------------------------------------------------------- -\subsection{Unix {\tt make} for compiling CHOLMOD} -%------------------------------------------------------------------------------- - -You can also compile the CHOLMOD mexFunctions using the Unix/Linux {\tt make} -command. When using the {\tt gcc} compiler, I strongly recommend editing the -{\tt metis-4.0/Makefile.in} file and changing {\tt COPTIONS} to -\begin{verbatim} - COPTIONS = -fexceptions -\end{verbatim} -Also ensure {\tt -fexceptions} is in the {\tt CFLAGS} option in the -{\tt SuiteSparse\_config/SuiteSparse\_config.mk} file that comes with CHOLMOD. -If you do not make these modifications, the CHOLMOD mexFunctions -will terminate MATLAB if they encounter an error. - -Next, compile your METIS 4.0.1 library by typing {\tt make} in the -{\tt metis-4.0} directory. Then type {\tt make} in the {\tt CHOLMOD/MATLAB} -directory. This will compile the C-callable libraries for -AMD, COLAMD, CAMD, CCOLAMD, METIS, and CHOLMOD, and then compile the -mexFunction interfaces to those libraries. -If METIS tries {\tt malloc} and encounters an out-of-memory condition, -it calls {\tt abort}, which will terminate MATLAB. This problem does not -occur using the method described in the previous section. - %------------------------------------------------------------------------------- \newpage \section{Integer and floating-point types, and notation used} %------------------------------------------------------------------------------- @@ -1285,7 +1262,7 @@ \subsection{{\tt cholmod\_sparse}: compressed-column sparse matrix} Stores a sparse matrix in compressed-column form. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_allocate\_sparse}: allocate sparse matrix} +\subsection{{\tt cholmod\_allocate\_sparse}: allocate sparse matrix} %--------------------------------------- \input{_allocate_sparse.tex} @@ -1307,7 +1284,7 @@ \subsection{{\tt cholmod\_reallocate\_sparse}: reallocate sparse matrix} Reallocates a sparse matrix, so that it can contain {\tt nznew} entries. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_nnz}: number of entries in sparse matrix} +\subsection{{\tt cholmod\_nnz}: number of entries in sparse matrix} %--------------------------------------- \input{_nnz.tex} @@ -1457,7 +1434,7 @@ \subsection{{\tt cholmod\_transpose\_sym}: transpose/permute symmetric sparse ma not modified. {\tt F} can still be properly freed with {\tt cholmod\_free\_sparse}. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_band}: extract band of a sparse matrix} +\subsection{{\tt cholmod\_band}: extract band of a sparse matrix} %--------------------------------------- \input{_band.tex} @@ -1495,7 +1472,7 @@ \subsection{{\tt cholmod\_band\_inplace}: extract band, in place} Only packed matrices can be converted in place. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_aat}: compute $\m{AA}\tr$} +\subsection{{\tt cholmod\_aat}: compute $\m{AA}\tr$} %--------------------------------------- \input{_aat.tex} @@ -1518,7 +1495,7 @@ \subsection{{\tt cholmod\_copy\_sparse}: copy sparse matrix} Returns an exact copy of the input sparse matrix {\tt A}. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_copy}: copy (and change) sparse matrix} +\subsection{{\tt cholmod\_copy}: copy (and change) sparse matrix} %--------------------------------------- \input{_copy.tex} @@ -2431,7 +2408,7 @@ \subsection{{\tt cholmod\_analyze}: symbolic factorization} Refer to {\tt cholmod\_transpose\_unsym} for a description of {\tt f}. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_factorize}: numeric factorization} +\subsection{{\tt cholmod\_factorize}: numeric factorization} %--------------------------------------- \input{_factorize.tex} @@ -2477,7 +2454,7 @@ \subsection{{\tt cholmod\_analyze}: symbolic factorization} stored in LAPACK and the BLAS. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_analyze\_p}: symbolic factorization, given permutation} +\subsection{{\tt cholmod\_analyze\_p}: symbolic factorization, given permutation} %--------------------------------------- \input{_analyze_p.tex} @@ -2498,7 +2475,7 @@ \subsection{{\tt cholmod\_factorize\_p}: numeric factorization, given permutatio Only the real part, {\tt beta[0]}, is used. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_solve}: solve a linear system} +\subsection{{\tt cholmod\_solve}: solve a linear system} %--------------------------------------- \input{_solve.tex} @@ -2543,7 +2520,7 @@ \subsection{{\tt cholmod\_spsolve}: solve a linear system} Identical to {\tt cholmod\_spsolve}, except that {\tt B} and {\tt X} are sparse. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_etree}: find elimination tree} +\subsection{{\tt cholmod\_etree}: find elimination tree} %--------------------------------------- \input{_etree.tex} @@ -2581,7 +2558,7 @@ \subsection{{\tt cholmod\_rowcolcounts}: nonzeros counts of a factor} % sparse QR and LU factorization", BIT, vol 41, 2001, pp. 693-710. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_analyze\_ordering}: analyze a permutation} +\subsection{{\tt cholmod\_analyze\_ordering}: analyze a permutation} %--------------------------------------- \input{_analyze_ordering.tex} @@ -2599,7 +2576,7 @@ \subsection{{\tt cholmod\_rowcolcounts}: nonzeros counts of a factor} {\tt cholmod\_rowcolcounts} are not computed if {\tt ColCount} is {\tt NULL}. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_amd}: interface to AMD} +\subsection{{\tt cholmod\_amd}: interface to AMD} %--------------------------------------- \input{_amd.tex} @@ -2632,7 +2609,7 @@ \subsection{{\tt cholmod\_colamd}: interface to COLAMD} {\tt A} must be unsymmetric ({\tt A->stype = 0}). %--------------------------------------- -\newpage \subsection{{\tt cholmod\_rowfac}: row-oriented Cholesky factorization} +\subsection{{\tt cholmod\_rowfac}: row-oriented Cholesky factorization} %--------------------------------------- \input{_rowfac.tex} @@ -2687,7 +2664,7 @@ \subsection{{\tt cholmod\_rowfac\_mask}: row-oriented Cholesky factorization} %--------------------------------------- -\newpage \subsection{{\tt cholmod\_row\_subtree}: pattern of row of a factor} +\subsection{{\tt cholmod\_row\_subtree}: pattern of row of a factor} %--------------------------------------- \input{_row_subtree.tex} @@ -2711,7 +2688,7 @@ \subsection{{\tt cholmod\_rowfac\_mask}: row-oriented Cholesky factorization} the number of entries in {\tt R} is given by {\tt Rp [0]}. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_row\_lsubtree}: pattern of row of a factor} +\subsection{{\tt cholmod\_row\_lsubtree}: pattern of row of a factor} %--------------------------------------- \input{_row_lsubtree.tex} @@ -2721,7 +2698,7 @@ \subsection{{\tt cholmod\_rowfac\_mask}: row-oriented Cholesky factorization} {\tt Fi} and {\tt fnz} instead. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_resymbol}: re-do symbolic factorization} +\subsection{{\tt cholmod\_resymbol}: re-do symbolic factorization} %--------------------------------------- \input{_resymbol.tex} @@ -2750,7 +2727,7 @@ \subsection{{\tt cholmod\_resymbol\_noperm}: re-do symbolic factorization} ordering {\tt L->Perm} is not used. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_postorder}: tree postorder} +\subsection{{\tt cholmod\_postorder}: tree postorder} %--------------------------------------- \input{_postorder.tex} @@ -2863,7 +2840,6 @@ \subsection{{\tt cholmod\_updown\_solve}: update/downdate} ordering, not your original ordering. This routine does not handle multiple right-hand-sides. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_updown\_mark}: update/downdate} %--------------------------------------- @@ -2882,7 +2858,7 @@ \subsection{{\tt cholmod\_updown\_mask}: update/downdate} For use in LPDASA only. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_rowadd}: add row to factor} +\subsection{{\tt cholmod\_rowadd}: add row to factor} %--------------------------------------- \input{_rowadd.tex} @@ -2900,7 +2876,7 @@ \subsection{{\tt cholmod\_rowadd\_solve}: add row to factor} Identical to {\tt cholmod\_rowadd}, except the system $\m{Lx}=\m{b}$ is also updated/downdated, just like {\tt cholmod\_updown\_solve}. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_rowdel}: delete row from factor} +\subsection{{\tt cholmod\_rowdel}: delete row from factor} %--------------------------------------- \input{_rowdel.tex} @@ -2921,7 +2897,7 @@ \subsection{{\tt cholmod\_rowdel\_solve}: delete row from factor} The algorithm is described in \cite{DavisHager05}. %--------------------------------------- -\newpage \subsection{{\tt cholmod\_rowadd\_mark}: add row to factor} +\subsection{{\tt cholmod\_rowadd\_mark}: add row to factor} %--------------------------------------- \input{_rowadd_mark.tex} diff --git a/CHOLMOD/Include/cholmod_core.h b/CHOLMOD/Include/cholmod_core.h index e6e5ef81a3..274ab47df0 100644 --- a/CHOLMOD/Include/cholmod_core.h +++ b/CHOLMOD/Include/cholmod_core.h @@ -243,11 +243,11 @@ * #endif */ -#define CHOLMOD_DATE "Jun 1, 2012" +#define CHOLMOD_DATE "Jun 20, 2012" #define CHOLMOD_VER_CODE(main,sub) ((main) * 1000 + (sub)) #define CHOLMOD_MAIN_VERSION 2 #define CHOLMOD_SUB_VERSION 0 -#define CHOLMOD_SUBSUB_VERSION 0 +#define CHOLMOD_SUBSUB_VERSION 1 #define CHOLMOD_VERSION \ CHOLMOD_VER_CODE(CHOLMOD_MAIN_VERSION,CHOLMOD_SUB_VERSION) diff --git a/CHOLMOD/Lib/Makefile b/CHOLMOD/Lib/Makefile index 28bda08b64..6e0915eb86 100644 --- a/CHOLMOD/Lib/Makefile +++ b/CHOLMOD/Lib/Makefile @@ -10,19 +10,26 @@ include ../../SuiteSparse_config/SuiteSparse_config.mk #------------------------------------------------------------------------------- # the optional Partition module requires METIS, CAMD, and CCOLAMD -I_WITH_PARTITION = -CONFIG = +I_WITH_PARTITION = +LIB_WITH_PARTITION = +CONFIG = -DNPARTITION +# check if METIS is requested and available ifeq (,$(findstring -DNPARTITION, $(CHOLMOD_CONFIG))) - # METIS is check if METIS is available - ifeq (../../metis-4.0, $(wildcard ../../metis-4.0)) - I_WITH_PARTITION = -I$(METIS_PATH)/Lib \ - -I../../CCOLAMD/Include -I../../CAMD/Include - else - # METIS is not available, but CHOLMOD_CONFIG does not specify - # -DNPARTITION. Add it here so we can still compile CHOLMOD. - CONFIG = -DNPARTITION + # METIS is requested. See if it is available + ifeq ($(METIS_PATH), $(wildcard $(METIS_PATH))) + ifeq (../../CAMD, $(wildcard ../../CAMD)) + ifeq (../../CCOLAMD, $(wildcard ../../CCOLAMD)) + # METIS, CAMD, and CCOLAMD are available + LIB_WITH_PARTITION = $(METIS) ../../CCOLAMD/Lib/libccolamd.a \ + ../../CAMD/Lib/libcamd.a + I_WITH_PARTITION = -I$(METIS_PATH)/Lib \ + -I../../CCOLAMD/Include -I../../CAMD/Include + CONFIG = + endif + endif endif endif +#------------------------------------------------------------------------------- I = -I../../AMD/Include -I../../AMD/Source -I../../COLAMD/Include \ $(I_WITH_PARTITION) -I../Include -I../../SuiteSparse_config diff --git a/CHOLMOD/MATLAB/chol2.m b/CHOLMOD/MATLAB/chol2.m index 8a7be6442f..baa5b7c01b 100644 --- a/CHOLMOD/MATLAB/chol2.m +++ b/CHOLMOD/MATLAB/chol2.m @@ -7,7 +7,7 @@ % % Example: % R = chol2 (A) same as R = chol (A), just faster -% [R,p] = chol2 (A) save as [R,p] = chol(A), just faster +% [R,p] = chol2 (A) same as [R,p] = chol(A), just faster % [R,p,q] = chol2 (A) factorizes A(q,q) into R'*R, where q is % a fill-reducing ordering % diff --git a/CHOLMOD/MATLAB/cholmod_demo.m b/CHOLMOD/MATLAB/cholmod_demo.m index 2285c4d304..61a6ffc019 100644 --- a/CHOLMOD/MATLAB/cholmod_demo.m +++ b/CHOLMOD/MATLAB/cholmod_demo.m @@ -71,7 +71,7 @@ function try_matrix (A) -% try_matrix: try a matrix with CHOLMOD + % try_matrix: try a matrix with CHOLMOD n = size (A,1) ; S = sparse (A) ; diff --git a/CHOLMOD/MATLAB/cholmod_make.m b/CHOLMOD/MATLAB/cholmod_make.m index 8e5a977772..c6ae5e50d9 100644 --- a/CHOLMOD/MATLAB/cholmod_make.m +++ b/CHOLMOD/MATLAB/cholmod_make.m @@ -8,7 +8,7 @@ % All but METIS are distributed with CHOLMOD. To compile CHOLMOD to use METIS % you must first place a copy of the metis-4.0 directory (METIS version 4.0.1) % in same directory that contains the AMD, COLAMD, CCOLAMD, and CHOLMOD -% directories. % See http://www-users.cs.umn.edu/~karypis/metis for a copy of +% directories. See http://www-users.cs.umn.edu/~karypis/metis for a copy of % METIS 4.0.1. % % You must type the cholmod_make command while in the CHOLMOD/MATLAB directory. @@ -54,11 +54,11 @@ include = [include ' -DMATLAB6p1_OR_EARLIER'] ; end -% Determine if METIS is available + % Determine if METIS is available metis_path = '../../metis-4.0' ; have_metis = exist ([metis_path '/Lib'], 'dir') ; -% fix the METIS 4.0.1 rename.h file + % fix the METIS 4.0.1 rename.h file if (have_metis) fprintf ('Compiling CHOLMOD with METIS for MATLAB Version %s\n', v) ; f = fopen ('rename.h', 'w') ; @@ -83,12 +83,12 @@ end -%------------------------------------------------------------------------------- -% BLAS option -%------------------------------------------------------------------------------- + %--------------------------------------------------------------------------- + % BLAS option + %--------------------------------------------------------------------------- -% This is exceedingly ugly. The MATLAB mex command needs to be told where to -% fine the LAPACK and BLAS libraries, which is a real portability nightmare. + % This is exceedingly ugly. The MATLAB mex command needs to be told where to + % fine the LAPACK and BLAS libraries, which is a real portability nightmare. if (pc) if (verLessThan ('matlab', '6.5')) @@ -118,9 +118,7 @@ lapack = [lapack ' -lrt'] ; end -%------------------------------------------------------------------------------- - -include = strrep (include, '/', filesep) ; + %------------------------------------------------------------------------------- config_src = { '../../SuiteSparse_config/SuiteSparse_config' } ; @@ -300,7 +298,7 @@ obj_extension = '.o' ; end -% compile each library source file + % compile each library source file obj = '' ; source = [ordering_src config_src cholmod_src cholmod_matlab] ; @@ -311,8 +309,8 @@ kk = 0 ; for f = source - ff = strrep (f {1}, '/', filesep) ; - slash = strfind (ff, filesep) ; + ff = f {1} ; + slash = strfind (ff, '/') ; if (isempty (slash)) slash = 1 ; else @@ -324,21 +322,21 @@ kk = do_cmd (s, kk, details) ; end -% compile each mexFunction + % compile each mexFunction for f = cholmod_mex_src s = sprintf ('mex %s -DDLONG -O %s %s.c', flags, include, f{1}) ; s = [s obj ' ' lapack] ; %#ok kk = do_cmd (s, kk, details) ; end -% clean up + % clean up s = ['delete ' obj] ; do_cmd (s, kk, details) ; fprintf ('\nCHOLMOD successfully compiled\n') ; -%------------------------------------------------------------------------------- + %------------------------------------------------------------------------------- function kk = do_cmd (s, kk, details) -%DO_CMD: evaluate a command, and either print it or print a "." + %DO_CMD: evaluate a command, and either print it or print a "." if (details) fprintf ('%s\n', s) ; else diff --git a/CHOLMOD/MATLAB/graph_demo.m b/CHOLMOD/MATLAB/graph_demo.m index 7c24c38084..409bf6ad6a 100644 --- a/CHOLMOD/MATLAB/graph_demo.m +++ b/CHOLMOD/MATLAB/graph_demo.m @@ -89,10 +89,8 @@ function graph_demo (n) end end -%------------------------------------------------------------------------------- - function my_gplot (A, x, y) -% my_gplot : like gplot, just a lot faster + % my_gplot : like gplot, just a lot faster [i, j] = find (A) ; [ignore, p] = sort (max(i, j)) ; i = i (p) ; diff --git a/CHOLMOD/MATLAB/lchol.m b/CHOLMOD/MATLAB/lchol.m index 330e7f47aa..02627368ac 100644 --- a/CHOLMOD/MATLAB/lchol.m +++ b/CHOLMOD/MATLAB/lchol.m @@ -6,7 +6,7 @@ % % Example: % L = lchol (A) same as L = chol (A')', just faster -% [L,p] = lchol (A) save as [R,p] = chol(A') ; L=R', just faster +% [L,p] = lchol (A) same as [R,p] = chol(A') ; L=R', just faster % [L,p,q] = lchol (A) factorizes A(q,q) into L*L', where q is a % fill-reducing ordering % diff --git a/CHOLMOD/MATLAB/ldlchol.m b/CHOLMOD/MATLAB/ldlchol.m index 5087b0802b..17bdf2a55d 100644 --- a/CHOLMOD/MATLAB/ldlchol.m +++ b/CHOLMOD/MATLAB/ldlchol.m @@ -9,7 +9,6 @@ % [LD,p] = ldlchol (A) similar [R,p] = chol(A), but for L*D*L' % [LD,p,q] = ldlchol (A) factorizes A(q,q) into L*D*L', where q is a % fill-reducing ordering -% % LD = ldlchol (A,beta) return the LDL' factorization of A*A'+beta*I % [LD,p] = ldlchol (A,beta) like [R,p] = chol(A*A'+beta+I) % [LD,p,q] = ldlchol (A,beta) factorizes A(q,:)*A(q,:)'+beta*I into L*D*L' diff --git a/CHOLMOD/Makefile b/CHOLMOD/Makefile index decdc1f00d..97911ef39a 100644 --- a/CHOLMOD/Makefile +++ b/CHOLMOD/Makefile @@ -2,7 +2,7 @@ # CHOLMOD Makefile #------------------------------------------------------------------------------- -VERSION = 2.0.0 +VERSION = 2.0.1 # Note: If you do not have METIS, or do not wish to use it in CHOLMOD, you must # compile CHOLMOD with the -DNPARTITION flag. diff --git a/CHOLMOD/Supernodal/t_cholmod_gpu.c b/CHOLMOD/Supernodal/t_cholmod_gpu.c index ddb80ad1f8..e978799c05 100644 --- a/CHOLMOD/Supernodal/t_cholmod_gpu.c +++ b/CHOLMOD/Supernodal/t_cholmod_gpu.c @@ -25,7 +25,9 @@ #define L_ENTRY 2 #endif -//#define GPU_Printf printf +/* +#define GPU_Printf printf +*/ #define GPU_Printf #define PAGE_SIZE (4*1024) @@ -43,16 +45,16 @@ void TEMPLATE (CHOLMOD (gpu_init)) ) { Int i ; + cublasStatus_t cublasError ; + cudaError_t cudaErr ; + size_t maxBytesSize, HostPinnedSize ; Common->GemmUsed = 0 ; + GPU_Printf ("gpu_init : %p\n", (void *) ((size_t) Cwork & ~(PAGE_SIZE-1))) ; + if (!(Common->cublasHandle)) { -#ifndef NTIMER - double start = SuiteSparse_time ( ) ; -#endif - cublasStatus_t cublasError ; - cudaError_t cudaErr ; /* ------------------------------------------------------------------ */ /* create the CUDA BLAS handle */ @@ -104,7 +106,7 @@ void TEMPLATE (CHOLMOD (gpu_init)) /* create each CUDA event */ /* ------------------------------------------------------------------ */ - for (i=0 ; i< 2 ; i++) + for (i = 0 ; i < 2 ; i++) { cudaErr = cudaEventCreateWithFlags (&(Common->cublasEventPotrf [i]), cudaEventDisableTiming) ; @@ -114,27 +116,29 @@ void TEMPLATE (CHOLMOD (gpu_init)) return ; } } + } - /* ------------------------------------------------------------------ */ - /* pin the Host memory */ - /* ------------------------------------------------------------------ */ + /* ---------------------------------------------------------------------- */ + /* pin the Host memory */ + /* ---------------------------------------------------------------------- */ - Common->HostPinnedMemory = (void *) ((size_t) Cwork & ~(PAGE_SIZE-1)) ; - size_t maxBytesSize = sizeof (double)*L_ENTRY*maxSize ; + Common->HostPinnedMemory = (void *) ((size_t) Cwork & ~(PAGE_SIZE-1)) ; + maxBytesSize = sizeof (double)*L_ENTRY*maxSize ; - /* Align on a 4K page boundary (it is no more necessary in 4.1 */ - size_t HostPinnedSize = - (((size_t) Cwork + maxBytesSize + PAGE_SIZE-1) & ~(PAGE_SIZE-1)) - - (size_t) (Common->HostPinnedMemory) ; + /* Align on a 4K page boundary (it is no more necessary in 4.1 */ + HostPinnedSize = + (((size_t) Cwork + maxBytesSize + PAGE_SIZE-1) & ~(PAGE_SIZE-1)) + - (size_t) (Common->HostPinnedMemory) ; - cudaErr = cudaHostRegister (Common->HostPinnedMemory, - HostPinnedSize, 0) ; + GPU_Printf ("gpu HostPinnedSize: %g %p\n", (double) HostPinnedSize, + Common->HostPinnedMemory) ; + cudaErr = cudaHostRegister (Common->HostPinnedMemory, + HostPinnedSize, 0) ; - if (cudaErr != cudaSuccess) - { - ERROR (CHOLMOD_GPU_PROBLEM, "CUDA Pinning Memory") ; - Common->HostPinnedMemory = NULL ; - } + if (cudaErr != cudaSuccess) + { + ERROR (CHOLMOD_GPU_PROBLEM, "CUDA Pinning Memory") ; + Common->HostPinnedMemory = NULL ; } } @@ -149,6 +153,7 @@ void TEMPLATE (CHOLMOD (gpu_end)) ) { /* unpin the Host memory */ + GPU_Printf ("gpu_end %p\n", Common->HostPinnedMemory) ; cudaError_t cudaErr = cudaHostUnregister (Common->HostPinnedMemory) ; if (cudaErr != cudaSuccess) { @@ -187,8 +192,10 @@ int TEMPLATE (CHOLMOD (gpu_updateC)) ) { double *devPtrLx, *devPtrC ; + double alpha, beta ; cublasStatus_t cublasStatus ; cudaError_t cudaStat [2] ; + Int ndrow3 ; Common->SyrkUsed = 0 ; Common->GemmUsed = 0 ; @@ -199,7 +206,7 @@ int TEMPLATE (CHOLMOD (gpu_updateC)) return (0) ; } - Int ndrow3 = ndrow2 - ndrow1 ; + ndrow3 = ndrow2 - ndrow1 ; #ifndef NTIMER Common->syrkStart = SuiteSparse_time ( ) ; @@ -221,7 +228,7 @@ int TEMPLATE (CHOLMOD (gpu_updateC)) /* one or both cudaMalloc's failed */ if (devPtrLx) cudaFree (devPtrLx) ; if (devPtrC) cudaFree (devPtrC) ; - GPU_Printf ("cudaMalloc failed =%d,%d ndrow1=%d ndrow2=%d ndcol=%d\n", + GPU_Printf ("gpu malloc failed =%d,%d ndrow1=%d ndrow2=%d ndcol=%d\n", cudaStat [0], cudaStat [1], (int) ndrow1, (int) ndrow2, (int) ndcol) ; /* cudaMalloc failure is not an error, just bypass the GPU */ @@ -273,8 +280,8 @@ int TEMPLATE (CHOLMOD (gpu_updateC)) ERROR (CHOLMOD_GPU_PROBLEM, "GPU CUBLAS stream") ; } - double alpha = 1.0 ; - double beta = 0.0 ; + alpha = 1.0 ; + beta = 0.0 ; #ifdef REAL cublasStatus = cublasDsyrk (Common->cublasHandle, CUBLAS_FILL_MODE_LOWER, CUBLAS_OP_N, @@ -317,6 +324,11 @@ int TEMPLATE (CHOLMOD (gpu_updateC)) if (ndrow3 > 0) { +#ifndef REAL + cuDoubleComplex calpha = {1.0,0.0} ; + cuDoubleComplex cbeta = {0.0,0.0} ; +#endif + #ifndef NTIMER Common->CHOLMOD_GPU_GEMM_CALLS++ ; #endif @@ -332,8 +344,8 @@ int TEMPLATE (CHOLMOD (gpu_updateC)) /* ------------------------------------------------------------------ */ #ifdef REAL - double alpha = 1.0 ; - double beta = 0.0 ; + alpha = 1.0 ; + beta = 0.0 ; cublasStatus = cublasDgemm (Common->cublasHandle, CUBLAS_OP_N, CUBLAS_OP_T, ndrow3, ndrow1, ndcol, /* M, N, K */ @@ -346,17 +358,15 @@ int TEMPLATE (CHOLMOD (gpu_updateC)) devPtrC + L_ENTRY*ndrow1, /* C, LDC: C2 */ ndrow2) ; #else - cuDoubleComplex alpha = {1.0,0.0} ; - cuDoubleComplex beta = {0.0,0.0} ; cublasStatus = cublasZgemm (Common->cublasHandle, CUBLAS_OP_N, CUBLAS_OP_C, ndrow3, ndrow1, ndcol, /* M, N, K */ - &alpha, /* ALPHA: 1 */ + &calpha, /* ALPHA: 1 */ (const cuDoubleComplex *) devPtrLx + ndrow1, /* A, LDA: L2, ndrow */ ndrow2, (const cuDoubleComplex *) devPtrLx, /* B, LDB: L1, ndrow */ ndrow2, - &beta, /* BETA: 0 */ + &cbeta, /* BETA: 0 */ (cuDoubleComplex *)devPtrC + ndrow1, /* C, LDC: C2 */ ndrow2) ; #endif @@ -465,8 +475,14 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) ) { double *devPtrA, *devPtrB, *A ; + double alpha, beta ; cudaError_t cudaStat ; cublasStatus_t cublasStatus ; + Int j, nsrow2, nb, n, gpu_lda, lda, gpu_ldb ; + int ilda, ijb, iinfo ; +#ifndef NTIMER + double tstart = SuiteSparse_time ( ) ; +#endif if (nscol2 < 256) { @@ -474,25 +490,20 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) return (0) ; } - Int nsrow2 = nsrow - nscol2 ; - Int j ; + nsrow2 = nsrow - nscol2 ; /* ---------------------------------------------------------------------- */ /* heuristic to get the block size depending of the problem size */ /* ---------------------------------------------------------------------- */ - Int nb = 128 ; + nb = 128 ; if (nscol2 > 4096) nb = 256 ; if (nscol2 > 8192) nb = 384 ; - Int n = nscol2 ; - Int gpu_lda = ((nscol2+31)/32)*32 ; - Int lda = nsrow ; + n = nscol2 ; + gpu_lda = ((nscol2+31)/32)*32 ; + lda = nsrow ; A = Lx + L_ENTRY*psx ; -#ifndef NTIMER - double start = SuiteSparse_time ( ) ; -#endif - /* ---------------------------------------------------------------------- */ /* free the dpotrf workspace, if allocated */ /* ---------------------------------------------------------------------- */ @@ -507,7 +518,7 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) /* determine the GPU leading dimension of B */ /* ---------------------------------------------------------------------- */ - Int gpu_ldb = 0 ; + gpu_ldb = 0 ; if (nsrow2 > 0) { gpu_ldb = ((nsrow2+31)/32)*32 ; @@ -604,8 +615,8 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) /* do the CUDA BLAS dsyrk */ /* ------------------------------------------------------------------ */ - double alpha = -1.0 ; - double beta = 1.0 ; + alpha = -1.0 ; + beta = 1.0 ; #ifdef REAL cublasStatus = cublasDsyrk (Common->cublasHandle, CUBLAS_FILL_MODE_LOWER, CUBLAS_OP_N, jb, j, @@ -671,8 +682,8 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) if ((j+jb) < n) { #ifdef REAL - double alpha = -1.0 ; - double beta = 1.0 ; + alpha = -1.0 ; + beta = 1.0 ; cublasStatus = cublasDgemm (Common->cublasHandle, CUBLAS_OP_N, CUBLAS_OP_T, (n-j-jb), jb, j, @@ -682,15 +693,15 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) &beta, devPtrA + (j+jb + j*gpu_lda), gpu_lda) ; #else - cuDoubleComplex alpha = {-1.0,0.0} ; - cuDoubleComplex beta = { 1.0,0.0} ; - cublasStatus = cublasZgemm (Common->cublasHandle, + cuDoubleComplex calpha = {-1.0,0.0} ; + cuDoubleComplex cbeta = { 1.0,0.0} ; + cublasStatus = cublasZgemm (Common->cublasHandle, CUBLAS_OP_N, CUBLAS_OP_C, (n-j-jb), jb, j, - &alpha, + &calpha, (cuDoubleComplex*)devPtrA + (j+jb), gpu_lda, (cuDoubleComplex*)devPtrA + (j) , gpu_lda, - &beta, + &cbeta, (cuDoubleComplex*)devPtrA + (j+jb + j*gpu_lda), gpu_lda) ; #endif if (cublasStatus != CUBLAS_STATUS_SUCCESS) @@ -709,9 +720,8 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) /* compute the Cholesky factorization of the jbxjb block on the CPU */ /* ------------------------------------------------------------------ */ - int ilda = (int) lda ; - int ijb = jb ; - int iinfo ; + ilda = (int) lda ; + ijb = jb ; #ifdef REAL LAPACK_DPOTRF ("L", &ijb, A + L_ENTRY * (j + j*lda), &ilda, &iinfo) ; #else @@ -747,7 +757,7 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) if ((j+jb) < n) { #ifdef REAL - double alpha = 1.0 ; + alpha = 1.0 ; cublasStatus = cublasDtrsm (Common->cublasHandle, CUBLAS_SIDE_RIGHT, CUBLAS_FILL_MODE_LOWER, CUBLAS_OP_T, CUBLAS_DIAG_NON_UNIT, @@ -756,12 +766,12 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) devPtrA + (j + j*gpu_lda), gpu_lda, devPtrA + (j+jb + j*gpu_lda), gpu_lda) ; #else - cuDoubleComplex alpha = {1.0,0.0}; + cuDoubleComplex calpha = {1.0,0.0}; cublasStatus = cublasZtrsm (Common->cublasHandle, CUBLAS_SIDE_RIGHT, CUBLAS_FILL_MODE_LOWER, CUBLAS_OP_C, CUBLAS_DIAG_NON_UNIT, (n-j-jb), jb, - &alpha, + &calpha, (cuDoubleComplex *)devPtrA + (j + j*gpu_lda), gpu_lda, (cuDoubleComplex *)devPtrA + (j+jb + j*gpu_lda), gpu_lda) ; #endif @@ -780,7 +790,7 @@ int TEMPLATE (CHOLMOD (gpu_lower_potrf)) } #ifndef NTIMER - Common->CHOLMOD_GPU_POTRF_TIME += SuiteSparse_time ( ) - start ; + Common->CHOLMOD_GPU_POTRF_TIME += SuiteSparse_time ( ) - tstart ; #endif return (1) ; } @@ -812,6 +822,16 @@ int TEMPLATE (CHOLMOD (gpu_triangular_solve)) double *devPtrA, *devPtrB ; cudaError_t cudaStat ; cublasStatus_t cublasStatus ; + Int gpu_lda, gpu_ldb ; +#ifdef REAL + double alpha = 1.0 ; +#else + cuDoubleComplex calpha = {1.0,0.0} ; +#endif +#ifndef NTIMER + double tstart = SuiteSparse_time ( ) ; + Common->CHOLMOD_GPU_TRSM_CALLS++ ; +#endif if (!Common->devPotrfWork) { @@ -819,13 +839,8 @@ int TEMPLATE (CHOLMOD (gpu_triangular_solve)) return (0) ; } - Int gpu_lda = ((nscol2+31)/32)*32 ; - Int gpu_ldb = ((nsrow2+31)/32)*32 ; - -#ifndef NTIMER - Common->CHOLMOD_GPU_TRSM_CALLS++ ; - double start = SuiteSparse_time ( ) ; -#endif + gpu_lda = ((nscol2+31)/32)*32 ; + gpu_ldb = ((nsrow2+31)/32)*32 ; devPtrA = Common->devPotrfWork ; devPtrB = devPtrA + gpu_lda * gpu_lda * L_ENTRY ; @@ -846,7 +861,6 @@ int TEMPLATE (CHOLMOD (gpu_triangular_solve)) /* ---------------------------------------------------------------------- */ #ifdef REAL - double alpha = 1.0 ; cublasStatus = cublasDtrsm (Common->cublasHandle, CUBLAS_SIDE_RIGHT, CUBLAS_FILL_MODE_LOWER, CUBLAS_OP_T, CUBLAS_DIAG_NON_UNIT, @@ -855,12 +869,11 @@ int TEMPLATE (CHOLMOD (gpu_triangular_solve)) devPtrA, gpu_lda, /* A, LDA */ devPtrB, gpu_ldb) ; /* B, LDB */ #else - cuDoubleComplex alpha = {1.0,0.0} ; cublasStatus = cublasZtrsm (Common->cublasHandle, CUBLAS_SIDE_RIGHT, CUBLAS_FILL_MODE_LOWER, CUBLAS_OP_C, CUBLAS_DIAG_NON_UNIT, nsrow2, nscol2, /* M, N */ - &alpha, /* ALPHA: 1 */ + &calpha, /* ALPHA: 1 */ (const cuDoubleComplex *) devPtrA, gpu_lda, /* A, LDA */ (cuDoubleComplex *) devPtrB, gpu_ldb) ; /* B, LDB: nsrow2 */ #endif @@ -900,7 +913,7 @@ int TEMPLATE (CHOLMOD (gpu_triangular_solve)) cudaFree (Common->devPotrfWork) ; Common->devPotrfWork = NULL ; #ifndef NTIMER - Common->CHOLMOD_GPU_TRSM_TIME += SuiteSparse_time ( ) - start ; + Common->CHOLMOD_GPU_TRSM_TIME += SuiteSparse_time ( ) - tstart ; #endif return (1) ; } diff --git a/CHOLMOD/Supernodal/t_cholmod_super_numeric.c b/CHOLMOD/Supernodal/t_cholmod_super_numeric.c index 54cb0b8a0f..676ff61857 100644 --- a/CHOLMOD/Supernodal/t_cholmod_super_numeric.c +++ b/CHOLMOD/Supernodal/t_cholmod_super_numeric.c @@ -107,7 +107,7 @@ static int TEMPLATE (cholmod_super_numeric) cholmod_common *Common ) { - double one [2], zero [2], fjk [2] ; + double one [2], zero [2], fjk [2], tstart ; double *Lx, *Ax, *Fx, *Az, *Fz, *C ; Int *Super, *Head, *Ls, *Lpi, *Lpx, *Map, *SuperMap, *RelativeMap, *Next, *Lpos, *Fp, *Fi, *Fnz, *Ap, *Ai, *Anz, *Iwork, *Next_save, *Lpos_save ; @@ -473,7 +473,7 @@ static int TEMPLATE (cholmod_super_numeric) { #ifndef NTIMER Common->CHOLMOD_CPU_SYRK_CALLS++ ; - double start = SuiteSparse_time () ; + tstart = SuiteSparse_time () ; #endif #ifdef REAL BLAS_dsyrk ("L", "N", @@ -491,7 +491,7 @@ static int TEMPLATE (cholmod_super_numeric) C, ndrow2) ; /* C, LDC: C1 */ #endif #ifndef NTIMER - Common->CHOLMOD_CPU_SYRK_TIME += SuiteSparse_time () - start ; + Common->CHOLMOD_CPU_SYRK_TIME += SuiteSparse_time () - tstart ; #endif /* compute remaining (ndrow2-ndrow1)-by-ndrow1 block of C, * C2 = L2*L1' */ @@ -499,7 +499,7 @@ static int TEMPLATE (cholmod_super_numeric) { #ifndef NTIMER Common->CHOLMOD_CPU_GEMM_CALLS++ ; - double start = SuiteSparse_time () ; + tstart = SuiteSparse_time () ; #endif #ifdef REAL BLAS_dgemm ("N", "C", @@ -526,7 +526,7 @@ static int TEMPLATE (cholmod_super_numeric) #endif #ifndef NTIMER Common->CHOLMOD_CPU_GEMM_TIME += - SuiteSparse_time () - start ; + SuiteSparse_time () - tstart ; #endif } } @@ -577,7 +577,7 @@ static int TEMPLATE (cholmod_super_numeric) { /* GPU version when ndrow3 > zero, splits into two parts */ #ifndef NTIMER - double start = SuiteSparse_time () ; + tstart = SuiteSparse_time () ; #endif pj = 0 ; for (j = 0 ; j < ndrow1 ; j++) /* cols k1:k2-1 */ @@ -596,7 +596,7 @@ static int TEMPLATE (cholmod_super_numeric) pj += ndrow2 ; } #ifndef NTIMER - Common->CHOLMOD_ASSEMBLE_TIME2 += SuiteSparse_time () - start ; + Common->CHOLMOD_ASSEMBLE_TIME2 += SuiteSparse_time () - tstart ; #endif /* wait for dgemm to finish */ TEMPLATE (CHOLMOD (gpu_syncGemm)) (Common) ; @@ -617,7 +617,7 @@ static int TEMPLATE (cholmod_super_numeric) pj += ndrow2 ; } #ifndef NTIMER - Common->CHOLMOD_ASSEMBLE_TIME += SuiteSparse_time () - start ; + Common->CHOLMOD_ASSEMBLE_TIME += SuiteSparse_time () - tstart ; #endif } #endif @@ -676,7 +676,7 @@ static int TEMPLATE (cholmod_super_numeric) { #ifndef NTIMER Common->CHOLMOD_CPU_POTRF_CALLS++ ; - double start = SuiteSparse_time () ; + tstart = SuiteSparse_time () ; #endif #ifdef REAL LAPACK_dpotrf ("L", @@ -690,7 +690,7 @@ static int TEMPLATE (cholmod_super_numeric) info) ; /* INFO */ #endif #ifndef NTIMER - Common->CHOLMOD_CPU_POTRF_TIME += SuiteSparse_time ()- start ; + Common->CHOLMOD_CPU_POTRF_TIME += SuiteSparse_time ()- tstart ; #endif } @@ -766,6 +766,9 @@ static int TEMPLATE (cholmod_super_numeric) * zero. Also, info will be 1 if integer overflow occured in * the BLAS. */ Head [s] = EMPTY ; +#ifdef GPU_BLAS + TEMPLATE (CHOLMOD (gpu_end)) (Common) ; +#endif return (Common->status >= CHOLMOD_OK) ; } else @@ -802,7 +805,7 @@ static int TEMPLATE (cholmod_super_numeric) { #ifndef NTIMER Common->CHOLMOD_CPU_TRSM_CALLS++ ; - double start = SuiteSparse_time () ; + tstart = SuiteSparse_time () ; #endif #ifdef REAL BLAS_dtrsm ("R", "L", "C", "N", @@ -820,7 +823,7 @@ static int TEMPLATE (cholmod_super_numeric) nsrow) ; #endif #ifndef NTIMER - Common->CHOLMOD_CPU_TRSM_TIME += SuiteSparse_time ()- start ; + Common->CHOLMOD_CPU_TRSM_TIME += SuiteSparse_time () - tstart ; #endif } @@ -856,16 +859,19 @@ static int TEMPLATE (cholmod_super_numeric) { /* matrix is not positive definite; finished clean-up for supernode * containing negative diagonal */ + +#ifdef GPU_BLAS + TEMPLATE (CHOLMOD (gpu_end)) (Common) ; +#endif return (Common->status >= CHOLMOD_OK) ; } } + /* success; matrix is positive definite */ + L->minor = n ; #ifdef GPU_BLAS TEMPLATE (CHOLMOD (gpu_end)) (Common) ; #endif - - /* success; matrix is positive definite */ - L->minor = n ; return (Common->status >= CHOLMOD_OK) ; } diff --git a/CHOLMOD/Tcov/Makefile b/CHOLMOD/Tcov/Makefile index ffe6b1d97e..d6c3c544d5 100644 --- a/CHOLMOD/Tcov/Makefile +++ b/CHOLMOD/Tcov/Makefile @@ -32,6 +32,13 @@ C = $(CC) $(CF) $(CHOLMOD_CONFIG) $(NANTESTS) # Solaris # LIB = $(METIS) -xlic_lib=sunperf +#------------------------------------------------------------------------------- +# With the CUDA BLAS: +ifneq ($(GPU_CONFIG),) +LIB += $(GPU_BLAS_PATH)/lib64/libcudart.so $(GPU_BLAS_PATH)/lib64/libcublas.so +endif +#------------------------------------------------------------------------------- + # Use "grep" only, if you do not have "indent" # PRETTY = grep -v "^\#" | indent -bl -nce -ss -bli0 -i4 -sob -l120 PRETTY = grep -v "^\#" | indent -bl -nce -bli0 -i4 -sob -l120 @@ -1003,7 +1010,8 @@ z_updown.o: ../Modify/cholmod_updown.c \ #------------------------------------------------------------------------------- z_super_numeric.o: ../Supernodal/cholmod_super_numeric.c \ - ../Supernodal/t_cholmod_super_numeric.c + ../Supernodal/t_cholmod_super_numeric.c \ + ../Supernodal/t_cholmod_gpu.c $(C) -E $(I) $< | $(PRETTY) > z_super_numeric.c $(C) -c $(I) z_super_numeric.c diff --git a/CSparse/Doc/ChangeLog b/CSparse/Doc/ChangeLog index f92cd198dd..c9af6d4175 100644 --- a/CSparse/Doc/ChangeLog +++ b/CSparse/Doc/ChangeLog @@ -1,3 +1,7 @@ +Jun 20, 2012: verison 3.1.1 + + * minor update for Windows (removed filesep) + Jun 1, 2012: version 3.1.0 * minor changes to enable the creation of CXSparse 3.1.0 diff --git a/CSparse/MATLAB/CSparse/cs_make.m b/CSparse/MATLAB/CSparse/cs_make.m index 3bf9ffa90c..29689d28c1 100644 --- a/CSparse/MATLAB/CSparse/cs_make.m +++ b/CSparse/MATLAB/CSparse/cs_make.m @@ -141,7 +141,7 @@ kk, details, mexcmd) ; CS = ['cs_mex' obj] ; if (nargout > 0) - objfiles = ['..' filesep 'CSparse' filesep 'cs_mex' obj] ; + objfiles = ['../CSparse/cs_mex' obj] ; end for i = 1:length (cs) [s t kk] = compile_source (srcdir, cs {i}, obj, hfile, force, ... @@ -150,7 +150,7 @@ anysrc = anysrc | s ; %#ok CS = [CS ' ' cs{i} obj] ; %#ok if (nargout > 0) - objfiles = [objfiles ' ..' filesep 'CSparse' filesep cs{i} obj] ; %#ok + objfiles = [objfiles ' ../CSparse/' cs{i} obj] ; %#ok end end @@ -189,7 +189,6 @@ %------------------------------------------------------------------------------- function kk = do_cmd (s, kk, details) %DO_CMD: evaluate a command, and either print it or print a "." -s = strrep (s, '/', filesep) ; if (details) fprintf ('%s\n', s) ; else diff --git a/CSparse/MATLAB/Demo/cs_demo1.m b/CSparse/MATLAB/Demo/cs_demo1.m index 07b6dc64cc..a2c586b50c 100644 --- a/CSparse/MATLAB/Demo/cs_demo1.m +++ b/CSparse/MATLAB/Demo/cs_demo1.m @@ -17,7 +17,7 @@ function cs_demo1 (matrixpath) try % older versions of MATLAB do not have an input argument to mfilename p = mfilename ('fullpath') ; - t = strfind (p, filesep) ; + t = strfind (p, '/') ; matrixpath = [ p(1:t(end)) '../../Matrix' ] ; catch % assume we are in the C*Sparse/MATLAB/CSparse/Demo directory diff --git a/CSparse/MATLAB/Demo/cs_demo2.m b/CSparse/MATLAB/Demo/cs_demo2.m index 6bfbb5060a..72ae2f5438 100644 --- a/CSparse/MATLAB/Demo/cs_demo2.m +++ b/CSparse/MATLAB/Demo/cs_demo2.m @@ -16,7 +16,7 @@ function cs_demo2 (do_pause, matrixpath) try % older versions of MATLAB do not have an input argument to mfilename p = mfilename ('fullpath') ; - t = strfind (p, filesep) ; + t = strfind (p, '/') ; matrixpath = [ p(1:t(end)) '../../Matrix' ] ; catch % assume we are in the C*Sparse/MATLAB/CSparse/Demo directory diff --git a/CSparse/MATLAB/Demo/cs_demo3.m b/CSparse/MATLAB/Demo/cs_demo3.m index 1df6817d73..a40c271910 100644 --- a/CSparse/MATLAB/Demo/cs_demo3.m +++ b/CSparse/MATLAB/Demo/cs_demo3.m @@ -16,7 +16,7 @@ function cs_demo3 (do_pause, matrixpath) try % older versions of MATLAB do not have an input argument to mfilename p = mfilename ('fullpath') ; - t = strfind (p, filesep) ; + t = strfind (p, '/') ; matrixpath = [ p(1:t(end)) '../../Matrix' ] ; catch % assume we are in the C*Sparse/MATLAB/CSparse/Demo directory diff --git a/CSparse/MATLAB/Demo/private/get_problem.m b/CSparse/MATLAB/Demo/private/get_problem.m index 7829ae8312..32ac4168ed 100644 --- a/CSparse/MATLAB/Demo/private/get_problem.m +++ b/CSparse/MATLAB/Demo/private/get_problem.m @@ -19,8 +19,6 @@ if (isempty (s)) s = 0 ; end -% f = sprintf ('%s..%s..%sMatrix%s%s', ... -% prefix, filesep, filesep, filesep, name (s+1:end)) ; % load the triplet version of the matrix T = load ([ prefix '/' name(s+1:end) ]) ; diff --git a/CSparse/MATLAB/UFget/mat/UF_Index.mat b/CSparse/MATLAB/UFget/mat/UF_Index.mat index 3ebcb0990a..6ec593a03f 100644 Binary files a/CSparse/MATLAB/UFget/mat/UF_Index.mat and b/CSparse/MATLAB/UFget/mat/UF_Index.mat differ diff --git a/CSparse/MATLAB/UFget/matrices/UFstats.csv b/CSparse/MATLAB/UFget/matrices/UFstats.csv index 5a24289890..2c40799645 100644 --- a/CSparse/MATLAB/UFget/matrices/UFstats.csv +++ b/CSparse/MATLAB/UFget/matrices/UFstats.csv @@ -1,5 +1,5 @@ -2558 -06-Mar-2012 12:31:24 +2567 +03-Jul-2012 15:03:14 HB,1138_bus,1138,1138,4054,1,0,0,1,1,1,power network problem HB,494_bus,494,494,1666,1,0,0,1,1,1,power network problem HB,662_bus,662,662,2474,1,0,0,1,1,1,power network problem @@ -2558,3 +2558,12 @@ Chevron,Chevron1,37365,37365,330633,0,0,0,0,0.994503321194266,0.7103673090824775 Chevron,Chevron2,90249,90249,803173,0,0,0,0,0.9963698795383519,0.6400065084076283,other problem Chevron,Chevron3,381381,381381,3413113,0,0,0,0,0.998180577966654,0.5728441696033818,other problem Chevron,Chevron4,711450,711450,6376412,0,0,0,0,0.9986570077610406,0.5561276492234193,other problem +CPM,cz148,148,148,1527,1,0,1,0,0.4263959390862944,0.2306018854242204,2D/3D problem +CPM,cz308,308,308,3182,1,0,1,0,0.4342379958246347,0.2219902574808629,2D/3D problem +CPM,cz628,628,628,6346,1,0,1,0,0.441413081497027,0.2308499475341028,2D/3D problem +CPM,cz1268,1268,1268,12786,1,0,1,0,0.4386178155929849,0.2340684146553221,2D/3D problem +CPM,cz2548,2548,2548,25674,1,0,1,0,0.4322407679667906,0.2349736227622589,2D/3D problem +CPM,cz5108,5108,5108,51412,1,0,1,0,0.433914996544575,0.2362214927436075,2D/3D problem +CPM,cz10228,10228,10228,102876,1,0,1,0,0.4358431914342458,0.2371988602020551,2D/3D problem +CPM,cz20468,20468,20468,206076,1,0,1,0,0.4354769190983147,0.2377052713245119,2D/3D problem +CPM,cz40948,40948,40948,412148,1,0,1,0,0.4349030172413793,0.2372683189655172,2D/3D problem diff --git a/CSparse/MATLAB/cs_install.m b/CSparse/MATLAB/cs_install.m index 4b58066ba8..9f35a4791e 100644 --- a/CSparse/MATLAB/cs_install.m +++ b/CSparse/MATLAB/cs_install.m @@ -33,13 +33,13 @@ function cs_install (do_pause) if (do_pause) input ('Hit enter to continue: ') ; end -addpath ([pwd filesep 'CSparse']) ; -addpath ([pwd filesep 'Demo']) ; +addpath ([pwd '/CSparse']) ; +addpath ([pwd '/Demo']) ; if (verLessThan ('matlab', '7.0')) fprintf ('UFget not installed (MATLAB 7.0 or later required)\n') ; else - addpath ([pwd filesep 'UFget']) ; + addpath ([pwd '/UFget']) ; end cd ('CSparse') ; diff --git a/CSparse/Makefile b/CSparse/Makefile index b121b694e6..fd1bb8db86 100644 --- a/CSparse/Makefile +++ b/CSparse/Makefile @@ -2,7 +2,7 @@ # CSparse Makefile #------------------------------------------------------------------------------ -VERSION = 3.1.0 +VERSION = 3.1.1 C: ( cd Lib ; $(MAKE) ) diff --git a/CSparse/README.txt b/CSparse/README.txt index 71c323a92f..65dafef6ab 100644 --- a/CSparse/README.txt +++ b/CSparse/README.txt @@ -1,5 +1,5 @@ CSparse: a Concise Sparse Matrix package. -VERSION 3.1.0, Copyright (c) 2006-2012, Timothy A. Davis, Jun 1, 2012. +VERSION 3.1.1, Copyright (c) 2006-2012, Timothy A. Davis, Jun 20, 2012. http://www.suitesparse.com Refer to "Direct Methods for Sparse Linear Systems," Timothy A. Davis, diff --git a/CSparse/Tcov/Makefile b/CSparse/Tcov/Makefile index eba31ffbd7..7c823297c7 100644 --- a/CSparse/Tcov/Makefile +++ b/CSparse/Tcov/Makefile @@ -7,7 +7,7 @@ CC = gcc CFLAGS = -O -g -fprofile-arcs -ftest-coverage \ -Wall -W -Wshadow -Wmissing-prototypes -Wstrict-prototypes \ -Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi \ - -Wno-unused-parameter -Werror -I../Include -I../Demo + -Wno-unused-parameter -I../Include -I../Demo run: all run1 runbook run3 runtest ./covall diff --git a/CXSparse/Demo/cs_demo.out b/CXSparse/Demo/cs_demo.out index c8c174d86a..0a58a73f5d 100644 --- a/CXSparse/Demo/cs_demo.out +++ b/CXSparse/Demo/cs_demo.out @@ -424,8 +424,8 @@ QR amd(A'*A) time: 0.00 resid: 1.61e-02 --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 -QR natural time: 0.05 resid: nan -QR amd(A'*A) time: 0.05 resid: nan +QR natural time: 0.04 resid: nan +QR amd(A'*A) time: 0.06 resid: nan ./cs_demo2 < ../Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 @@ -456,10 +456,10 @@ downdate: time: 0.00 (incl solve) resid: 3.74e-17 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 blocks: 75 singletons: 74 structural rank: 4884 -QR amd(A'*A) time: 0.58 resid: 2.01e-22 -LU amd(A+A') time: 0.29 resid: 1.10e-22 +QR amd(A'*A) time: 0.57 resid: 2.01e-22 +LU amd(A+A') time: 0.30 resid: 1.10e-22 LU amd(S'*S) time: 0.30 resid: 1.28e-22 -LU amd(A'*A) time: 0.32 resid: 1.78e-22 +LU amd(A'*A) time: 0.31 resid: 1.78e-22 Chol amd(A+A') time: 0.10 resid: 1.19e-22 ./cs_demo3 < ../Matrix/bcsstk16 @@ -472,9 +472,9 @@ solve chol time 0.00 original: resid: 1.19e-22 update: time: 0.00 update: time: 0.00 (incl solve) resid: 1.12e-23 -rechol: time: 0.10 (incl solve) resid: 1.17e-23 +rechol: time: 0.08 (incl solve) resid: 1.17e-23 downdate: time: 0.00 -downdate: time: 0.00 (incl solve) resid: 4.09e-22 +downdate: time: 0.01 (incl solve) resid: 4.09e-22 ./cs_di_demo1 < ../Matrix/t1 T: CXSparse Version 2.3.0, Jun 1, 2012. Copyright (c) Timothy A. Davis, 2006-2012 @@ -564,7 +564,7 @@ tiny entries dropped: 10 blocks: 38 singletons: 37 structural rank: 183 QR natural time: 0.00 resid: 1.42e-27 QR amd(A'*A) time: 0.00 resid: 3.35e-28 -LU natural time: 0.00 resid: 6.20e-28 +LU natural time: 0.01 resid: 6.20e-28 LU amd(A+A') time: 0.00 resid: 1.55e-27 LU amd(S'*S) time: 0.00 resid: 6.98e-28 LU amd(A'*A) time: 0.00 resid: 6.98e-28 @@ -594,8 +594,8 @@ QR amd(A'*A) time: 0.00 resid: 1.61e-02 --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 -QR natural time: 0.05 resid: nan -QR amd(A'*A) time: 0.05 resid: nan +QR natural time: 0.04 resid: nan +QR amd(A'*A) time: 0.06 resid: nan ./cs_di_demo2 < ../Matrix/bcsstk01 --- Matrix: 48-by-48, nnz: 224 (sym: -1: nnz 400), norm: 3.57e+09 @@ -626,8 +626,8 @@ downdate: time: 0.00 (incl solve) resid: 3.74e-17 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 blocks: 75 singletons: 74 structural rank: 4884 -QR amd(A'*A) time: 0.58 resid: 2.01e-22 -LU amd(A+A') time: 0.29 resid: 1.10e-22 +QR amd(A'*A) time: 0.57 resid: 2.01e-22 +LU amd(A+A') time: 0.30 resid: 1.10e-22 LU amd(S'*S) time: 0.30 resid: 1.28e-22 LU amd(A'*A) time: 0.31 resid: 1.78e-22 Chol amd(A+A') time: 0.09 resid: 1.19e-22 @@ -642,7 +642,7 @@ solve chol time 0.00 original: resid: 1.19e-22 update: time: 0.00 update: time: 0.00 (incl solve) resid: 1.12e-23 -rechol: time: 0.10 (incl solve) resid: 1.17e-23 +rechol: time: 0.09 (incl solve) resid: 1.17e-23 downdate: time: 0.00 downdate: time: 0.00 (incl solve) resid: 4.09e-22 ./cs_dl_demo1 < ../Matrix/t1 @@ -796,23 +796,23 @@ downdate: time: 0.00 (incl solve) resid: 3.74e-17 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 blocks: 75 singletons: 74 structural rank: 4884 -QR amd(A'*A) time: 0.57 resid: 2.01e-22 +QR amd(A'*A) time: 0.58 resid: 2.01e-22 LU amd(A+A') time: 0.30 resid: 1.10e-22 LU amd(S'*S) time: 0.30 resid: 1.28e-22 -LU amd(A'*A) time: 0.32 resid: 1.78e-22 +LU amd(A'*A) time: 0.31 resid: 1.78e-22 Chol amd(A+A') time: 0.10 resid: 1.19e-22 ./cs_dl_demo3 < ../Matrix/bcsstk16 --- Matrix: 4884-by-4884, nnz: 147631 (sym: -1: nnz 290378), norm: 7.01e+09 chol then update/downdate amd(A+A') -symbolic chol time 0.01 -numeric chol time 0.09 -solve chol time 0.00 +symbolic chol time 0.00 +numeric chol time 0.10 +solve chol time 0.01 original: resid: 1.19e-22 update: time: 0.00 -update: time: 0.01 (incl solve) resid: 1.12e-23 -rechol: time: 0.09 (incl solve) resid: 1.17e-23 +update: time: 0.00 (incl solve) resid: 1.12e-23 +rechol: time: 0.10 (incl solve) resid: 1.17e-23 downdate: time: 0.00 downdate: time: 0.00 (incl solve) resid: 4.09e-22 ./cs_ci_demo1 < ../Matrix/t2 @@ -944,9 +944,9 @@ LU amd(A'*A) time: 0.01 resid: 3.37e-16 --- Matrix: 324-by-324, nnz: 26730 (sym: 0: nnz 0), norm: 1.71e+00 blocks: 1 singletons: 0 structural rank: 324 -QR natural time: 0.02 resid: 9.42e-17 -QR amd(A'*A) time: 0.04 resid: 8.94e-17 -LU natural time: 0.00 resid: 6.01e-17 +QR natural time: 0.03 resid: 9.42e-17 +QR amd(A'*A) time: 0.03 resid: 8.94e-17 +LU natural time: 0.01 resid: 6.01e-17 LU amd(A+A') time: 0.02 resid: 4.05e-17 LU amd(S'*S) time: 0.01 resid: 4.71e-17 LU amd(A'*A) time: 0.01 resid: 4.71e-17 @@ -989,8 +989,8 @@ downdate: time: 0.00 (incl solve) resid: 5.85e-17 --- Matrix: 1280-by-1280, nnz: 11963 (sym: -1: nnz 22646), norm: 8.00e+01 tiny entries dropped: 66 blocks: 20 singletons: 14 structural rank: 1280 -QR amd(A'*A) time: 0.01 resid: 6.15e-25 -LU amd(A+A') time: 0.00 resid: 2.33e-25 +QR amd(A'*A) time: 0.00 resid: 6.15e-25 +LU amd(A+A') time: 0.01 resid: 2.33e-25 LU amd(S'*S) time: 0.00 resid: 3.96e-25 LU amd(A'*A) time: 0.00 resid: 3.96e-25 Chol amd(A+A') time: 0.00 resid: 1.58e-25 @@ -1004,7 +1004,7 @@ numeric chol time 0.00 solve chol time 0.00 original: resid: 1.51e-25 update: time: 0.00 -update: time: 0.01 (incl solve) resid: 1.75e-25 +update: time: 0.00 (incl solve) resid: 1.75e-25 rechol: time: 0.00 (incl solve) resid: 1.71e-25 downdate: time: 0.00 downdate: time: 0.00 (incl solve) resid: 5.85e-25 @@ -1122,26 +1122,26 @@ LU amd(A'*A) time: 0.00 resid: 4.76e-17 --- Matrix: 492-by-490, nnz: 49920 (sym: 0: nnz 0), norm: 9.29e-01 blocks: 10 singletons: 8 structural rank: 448 QR natural time: 0.17 resid: nan -QR amd(A'*A) time: 0.19 resid: nan +QR amd(A'*A) time: 0.18 resid: nan ./cs_cl_demo2 < ../Matrix/young1c --- Matrix: 841-by-841, nnz: 4089 (sym: 0: nnz 0), norm: 7.30e+02 blocks: 1 singletons: 0 structural rank: 841 -QR natural time: 0.00 resid: 1.81e-16 +QR natural time: 0.01 resid: 1.81e-16 QR amd(A'*A) time: 0.01 resid: 1.57e-16 -LU natural time: 0.01 resid: 1.39e-16 -LU amd(A+A') time: 0.00 resid: 2.95e-16 -LU amd(S'*S) time: 0.01 resid: 3.37e-16 -LU amd(A'*A) time: 0.00 resid: 3.37e-16 +LU natural time: 0.00 resid: 1.39e-16 +LU amd(A+A') time: 0.01 resid: 2.95e-16 +LU amd(S'*S) time: 0.00 resid: 3.37e-16 +LU amd(A'*A) time: 0.01 resid: 3.37e-16 ./cs_cl_demo2 < ../Matrix/qc324 --- Matrix: 324-by-324, nnz: 26730 (sym: 0: nnz 0), norm: 1.71e+00 blocks: 1 singletons: 0 structural rank: 324 QR natural time: 0.02 resid: 9.42e-17 -QR amd(A'*A) time: 0.04 resid: 8.94e-17 +QR amd(A'*A) time: 0.03 resid: 8.94e-17 LU natural time: 0.01 resid: 6.01e-17 LU amd(A+A') time: 0.01 resid: 4.05e-17 -LU amd(S'*S) time: 0.01 resid: 4.71e-17 +LU amd(S'*S) time: 0.02 resid: 4.71e-17 LU amd(A'*A) time: 0.01 resid: 4.71e-17 ./cs_cl_demo2 < ../Matrix/neumann @@ -1149,8 +1149,8 @@ LU amd(A'*A) time: 0.01 resid: 4.71e-17 blocks: 1 singletons: 0 structural rank: 1600 QR amd(A'*A) time: 0.02 resid: 1.04e-15 LU amd(A+A') time: 0.00 resid: 3.55e-16 -LU amd(S'*S) time: 0.01 resid: 4.03e-16 -LU amd(A'*A) time: 0.01 resid: 4.03e-16 +LU amd(S'*S) time: 0.02 resid: 4.03e-16 +LU amd(A'*A) time: 0.00 resid: 4.03e-16 ./cs_cl_demo2 < ../Matrix/c4 --- Matrix: 4-by-4, nnz: 10 (sym: -1: nnz 16), norm: 7.37e+01 @@ -1196,8 +1196,8 @@ symbolic chol time 0.00 numeric chol time 0.00 solve chol time 0.00 original: resid: 1.51e-25 -update: time: 0.01 -update: time: 0.01 (incl solve) resid: 1.75e-25 +update: time: 0.00 +update: time: 0.00 (incl solve) resid: 1.75e-25 rechol: time: 0.00 (incl solve) resid: 1.71e-25 downdate: time: 0.00 downdate: time: 0.00 (incl solve) resid: 5.85e-25 diff --git a/CXSparse/Doc/ChangeLog b/CXSparse/Doc/ChangeLog index f92cd198dd..c9af6d4175 100644 --- a/CXSparse/Doc/ChangeLog +++ b/CXSparse/Doc/ChangeLog @@ -1,3 +1,7 @@ +Jun 20, 2012: verison 3.1.1 + + * minor update for Windows (removed filesep) + Jun 1, 2012: version 3.1.0 * minor changes to enable the creation of CXSparse 3.1.0 diff --git a/CXSparse/MATLAB/CSparse/private/cs_make_helper.m b/CXSparse/MATLAB/CSparse/private/cs_make_helper.m index 57e944427d..264c698a22 100644 --- a/CXSparse/MATLAB/CSparse/private/cs_make_helper.m +++ b/CXSparse/MATLAB/CSparse/private/cs_make_helper.m @@ -121,7 +121,7 @@ mexcmd, kk, details) ; CS = ['cs_mex' obj] ; if (nargout > 0) - objfiles = ['..' filesep 'CSparse' filesep 'cs_mex' obj] ; + objfiles = ['../CSparse/cs_mex' obj] ; end for i = 1:length (cs) @@ -131,7 +131,7 @@ anysrc = anysrc | s ; %#ok CS = [CS ' ' cs{i} obj] ; %#ok if (nargout > 0) - objfiles = [objfiles ' ..' filesep 'CSparse' filesep cs{i} obj] ; %#ok + objfiles = [objfiles ' ../CSparse/' cs{i} obj] ; %#ok end % complex version: @@ -140,7 +140,7 @@ csrc = [ 'cs_cl_' csrc(4:end) ] ; CS = [CS ' ' csrc obj] ; %#ok if (nargout > 0) - objfiles = [objfiles ' ..' filesep 'CSparse' filesep csrc obj] ;%#ok + objfiles = [objfiles ' ../CSparse/' csrc obj] ;%#ok end if (s) cpfile (['../../Source/' cs{i} '.c'], [csrc '.c']) ; @@ -187,7 +187,6 @@ %------------------------------------------------------------------------------- function kk = do_cmd (s, kk, details) %DO_CMD: evaluate a command, and either print it or print a "." -s = strrep (s, '/', filesep) ; if (details) fprintf ('%s', s) ; else diff --git a/CXSparse/MATLAB/Demo/cs_demo1.m b/CXSparse/MATLAB/Demo/cs_demo1.m index 07b6dc64cc..a2c586b50c 100644 --- a/CXSparse/MATLAB/Demo/cs_demo1.m +++ b/CXSparse/MATLAB/Demo/cs_demo1.m @@ -17,7 +17,7 @@ function cs_demo1 (matrixpath) try % older versions of MATLAB do not have an input argument to mfilename p = mfilename ('fullpath') ; - t = strfind (p, filesep) ; + t = strfind (p, '/') ; matrixpath = [ p(1:t(end)) '../../Matrix' ] ; catch % assume we are in the C*Sparse/MATLAB/CSparse/Demo directory diff --git a/CXSparse/MATLAB/Demo/cs_demo2.m b/CXSparse/MATLAB/Demo/cs_demo2.m index 6bfbb5060a..72ae2f5438 100644 --- a/CXSparse/MATLAB/Demo/cs_demo2.m +++ b/CXSparse/MATLAB/Demo/cs_demo2.m @@ -16,7 +16,7 @@ function cs_demo2 (do_pause, matrixpath) try % older versions of MATLAB do not have an input argument to mfilename p = mfilename ('fullpath') ; - t = strfind (p, filesep) ; + t = strfind (p, '/') ; matrixpath = [ p(1:t(end)) '../../Matrix' ] ; catch % assume we are in the C*Sparse/MATLAB/CSparse/Demo directory diff --git a/CXSparse/MATLAB/Demo/cs_demo3.m b/CXSparse/MATLAB/Demo/cs_demo3.m index 1df6817d73..a40c271910 100644 --- a/CXSparse/MATLAB/Demo/cs_demo3.m +++ b/CXSparse/MATLAB/Demo/cs_demo3.m @@ -16,7 +16,7 @@ function cs_demo3 (do_pause, matrixpath) try % older versions of MATLAB do not have an input argument to mfilename p = mfilename ('fullpath') ; - t = strfind (p, filesep) ; + t = strfind (p, '/') ; matrixpath = [ p(1:t(end)) '../../Matrix' ] ; catch % assume we are in the C*Sparse/MATLAB/CSparse/Demo directory diff --git a/CXSparse/MATLAB/Demo/private/get_problem.m b/CXSparse/MATLAB/Demo/private/get_problem.m index 7829ae8312..32ac4168ed 100644 --- a/CXSparse/MATLAB/Demo/private/get_problem.m +++ b/CXSparse/MATLAB/Demo/private/get_problem.m @@ -19,8 +19,6 @@ if (isempty (s)) s = 0 ; end -% f = sprintf ('%s..%s..%sMatrix%s%s', ... -% prefix, filesep, filesep, filesep, name (s+1:end)) ; % load the triplet version of the matrix T = load ([ prefix '/' name(s+1:end) ]) ; diff --git a/CXSparse/MATLAB/Test/cs_test_make.m b/CXSparse/MATLAB/Test/cs_test_make.m index 111a5f8cb5..a2a4aa3504 100644 --- a/CXSparse/MATLAB/Test/cs_test_make.m +++ b/CXSparse/MATLAB/Test/cs_test_make.m @@ -33,9 +33,8 @@ function cs_test_make (force) [s t tobj] = cs_must_compile ('', mexfunc{i}, '_mex', ... ['.' mexext], 'cs_test_make.m', force) ; if (s | tobj < timestamp) %#ok - cmd = [mexcmd ' -O -output ' mexfunc{i} ' ' mexfunc{i} '_mex.c -I..' ... - filesep '..' filesep 'Include -I..' ... - filesep 'CSparse ' object_files] ; + cmd = [mexcmd ' -O -output ' mexfunc{i} ' ' mexfunc{i} '_mex.c' ... + ' -I../../Include -I../CSparse ' object_files] ; fprintf ('%s\n', cmd) ; eval (cmd) ; end diff --git a/CXSparse/MATLAB/UFget/mat/UF_Index.mat b/CXSparse/MATLAB/UFget/mat/UF_Index.mat index 3ebcb0990a..6ec593a03f 100644 Binary files a/CXSparse/MATLAB/UFget/mat/UF_Index.mat and b/CXSparse/MATLAB/UFget/mat/UF_Index.mat differ diff --git a/CXSparse/MATLAB/UFget/matrices/UFstats.csv b/CXSparse/MATLAB/UFget/matrices/UFstats.csv index 5a24289890..2c40799645 100644 --- a/CXSparse/MATLAB/UFget/matrices/UFstats.csv +++ b/CXSparse/MATLAB/UFget/matrices/UFstats.csv @@ -1,5 +1,5 @@ -2558 -06-Mar-2012 12:31:24 +2567 +03-Jul-2012 15:03:14 HB,1138_bus,1138,1138,4054,1,0,0,1,1,1,power network problem HB,494_bus,494,494,1666,1,0,0,1,1,1,power network problem HB,662_bus,662,662,2474,1,0,0,1,1,1,power network problem @@ -2558,3 +2558,12 @@ Chevron,Chevron1,37365,37365,330633,0,0,0,0,0.994503321194266,0.7103673090824775 Chevron,Chevron2,90249,90249,803173,0,0,0,0,0.9963698795383519,0.6400065084076283,other problem Chevron,Chevron3,381381,381381,3413113,0,0,0,0,0.998180577966654,0.5728441696033818,other problem Chevron,Chevron4,711450,711450,6376412,0,0,0,0,0.9986570077610406,0.5561276492234193,other problem +CPM,cz148,148,148,1527,1,0,1,0,0.4263959390862944,0.2306018854242204,2D/3D problem +CPM,cz308,308,308,3182,1,0,1,0,0.4342379958246347,0.2219902574808629,2D/3D problem +CPM,cz628,628,628,6346,1,0,1,0,0.441413081497027,0.2308499475341028,2D/3D problem +CPM,cz1268,1268,1268,12786,1,0,1,0,0.4386178155929849,0.2340684146553221,2D/3D problem +CPM,cz2548,2548,2548,25674,1,0,1,0,0.4322407679667906,0.2349736227622589,2D/3D problem +CPM,cz5108,5108,5108,51412,1,0,1,0,0.433914996544575,0.2362214927436075,2D/3D problem +CPM,cz10228,10228,10228,102876,1,0,1,0,0.4358431914342458,0.2371988602020551,2D/3D problem +CPM,cz20468,20468,20468,206076,1,0,1,0,0.4354769190983147,0.2377052713245119,2D/3D problem +CPM,cz40948,40948,40948,412148,1,0,1,0,0.4349030172413793,0.2372683189655172,2D/3D problem diff --git a/CXSparse/MATLAB/cs_install.m b/CXSparse/MATLAB/cs_install.m index 40ee0b20bd..78381192a5 100644 --- a/CXSparse/MATLAB/cs_install.m +++ b/CXSparse/MATLAB/cs_install.m @@ -33,13 +33,13 @@ function cs_install (do_pause) if (do_pause) input ('Hit enter to continue: ') ; end -addpath ([pwd filesep 'CSparse']) ; -addpath ([pwd filesep 'Demo']) ; +addpath ([pwd '/CSparse']) ; +addpath ([pwd '/Demo']) ; if (verLessThan ('matlab', '7.0')) fprintf ('UFget not installed (MATLAB 7.0 or later required)\n') ; else - addpath ([pwd filesep 'UFget']) ; + addpath ([pwd '/UFget']) ; end cd ('CSparse') ; diff --git a/CXSparse/Makefile b/CXSparse/Makefile index 9080297fbe..b5184cddca 100644 --- a/CXSparse/Makefile +++ b/CXSparse/Makefile @@ -2,7 +2,7 @@ # CXSparse Makefile #------------------------------------------------------------------------------ -VERSION = 3.1.0 +VERSION = 3.1.1 default: C diff --git a/CXSparse/Tcov/Makefile b/CXSparse/Tcov/Makefile index a5f565778c..d64ade8144 100644 --- a/CXSparse/Tcov/Makefile +++ b/CXSparse/Tcov/Makefile @@ -8,7 +8,7 @@ CC = gcc CFLAGS = -O -g -fprofile-arcs -ftest-coverage \ -Wall -W -Wshadow -Wmissing-prototypes -Wstrict-prototypes \ -Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi \ - -Wno-unused-parameter -Werror -I../Include \ + -Wno-unused-parameter -I../Include \ -I../Demo -I../../SuiteSparse_config C = $(CC) $(CFLAGS) diff --git a/CXSparse_newfiles.tar.gz b/CXSparse_newfiles.tar.gz index 3ac0cd27fa..3cc50c8c84 100644 Binary files a/CXSparse_newfiles.tar.gz and b/CXSparse_newfiles.tar.gz differ diff --git a/CXSparse_newfiles/MATLAB/CSparse/private/cs_make_helper.m b/CXSparse_newfiles/MATLAB/CSparse/private/cs_make_helper.m index 57e944427d..264c698a22 100644 --- a/CXSparse_newfiles/MATLAB/CSparse/private/cs_make_helper.m +++ b/CXSparse_newfiles/MATLAB/CSparse/private/cs_make_helper.m @@ -121,7 +121,7 @@ mexcmd, kk, details) ; CS = ['cs_mex' obj] ; if (nargout > 0) - objfiles = ['..' filesep 'CSparse' filesep 'cs_mex' obj] ; + objfiles = ['../CSparse/cs_mex' obj] ; end for i = 1:length (cs) @@ -131,7 +131,7 @@ anysrc = anysrc | s ; %#ok CS = [CS ' ' cs{i} obj] ; %#ok if (nargout > 0) - objfiles = [objfiles ' ..' filesep 'CSparse' filesep cs{i} obj] ; %#ok + objfiles = [objfiles ' ../CSparse/' cs{i} obj] ; %#ok end % complex version: @@ -140,7 +140,7 @@ csrc = [ 'cs_cl_' csrc(4:end) ] ; CS = [CS ' ' csrc obj] ; %#ok if (nargout > 0) - objfiles = [objfiles ' ..' filesep 'CSparse' filesep csrc obj] ;%#ok + objfiles = [objfiles ' ../CSparse/' csrc obj] ;%#ok end if (s) cpfile (['../../Source/' cs{i} '.c'], [csrc '.c']) ; @@ -187,7 +187,6 @@ %------------------------------------------------------------------------------- function kk = do_cmd (s, kk, details) %DO_CMD: evaluate a command, and either print it or print a "." -s = strrep (s, '/', filesep) ; if (details) fprintf ('%s', s) ; else diff --git a/CXSparse_newfiles/MATLAB/Test/cs_test_make.m b/CXSparse_newfiles/MATLAB/Test/cs_test_make.m index 111a5f8cb5..a2a4aa3504 100644 --- a/CXSparse_newfiles/MATLAB/Test/cs_test_make.m +++ b/CXSparse_newfiles/MATLAB/Test/cs_test_make.m @@ -33,9 +33,8 @@ function cs_test_make (force) [s t tobj] = cs_must_compile ('', mexfunc{i}, '_mex', ... ['.' mexext], 'cs_test_make.m', force) ; if (s | tobj < timestamp) %#ok - cmd = [mexcmd ' -O -output ' mexfunc{i} ' ' mexfunc{i} '_mex.c -I..' ... - filesep '..' filesep 'Include -I..' ... - filesep 'CSparse ' object_files] ; + cmd = [mexcmd ' -O -output ' mexfunc{i} ' ' mexfunc{i} '_mex.c' ... + ' -I../../Include -I../CSparse ' object_files] ; fprintf ('%s\n', cmd) ; eval (cmd) ; end diff --git a/CXSparse_newfiles/MATLAB/cs_install.m b/CXSparse_newfiles/MATLAB/cs_install.m index 40ee0b20bd..78381192a5 100644 --- a/CXSparse_newfiles/MATLAB/cs_install.m +++ b/CXSparse_newfiles/MATLAB/cs_install.m @@ -33,13 +33,13 @@ function cs_install (do_pause) if (do_pause) input ('Hit enter to continue: ') ; end -addpath ([pwd filesep 'CSparse']) ; -addpath ([pwd filesep 'Demo']) ; +addpath ([pwd '/CSparse']) ; +addpath ([pwd '/Demo']) ; if (verLessThan ('matlab', '7.0')) fprintf ('UFget not installed (MATLAB 7.0 or later required)\n') ; else - addpath ([pwd filesep 'UFget']) ; + addpath ([pwd '/UFget']) ; end cd ('CSparse') ; diff --git a/CXSparse_newfiles/Makefile b/CXSparse_newfiles/Makefile index 9080297fbe..b5184cddca 100644 --- a/CXSparse_newfiles/Makefile +++ b/CXSparse_newfiles/Makefile @@ -2,7 +2,7 @@ # CXSparse Makefile #------------------------------------------------------------------------------ -VERSION = 3.1.0 +VERSION = 3.1.1 default: C diff --git a/CXSparse_newfiles/Tcov/Makefile b/CXSparse_newfiles/Tcov/Makefile index a5f565778c..d64ade8144 100644 --- a/CXSparse_newfiles/Tcov/Makefile +++ b/CXSparse_newfiles/Tcov/Makefile @@ -8,7 +8,7 @@ CC = gcc CFLAGS = -O -g -fprofile-arcs -ftest-coverage \ -Wall -W -Wshadow -Wmissing-prototypes -Wstrict-prototypes \ -Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi \ - -Wno-unused-parameter -Werror -I../Include \ + -Wno-unused-parameter -I../Include \ -I../Demo -I../../SuiteSparse_config C = $(CC) $(CFLAGS) diff --git a/KLU/Doc/ChangeLog b/KLU/Doc/ChangeLog index 76e61797be..be040a82d4 100644 --- a/KLU/Doc/ChangeLog +++ b/KLU/Doc/ChangeLog @@ -1,3 +1,7 @@ +Jun 20, 2012: verison 1,2,1 + + * minor update for Windows (removed filesep) + Jun 1, 2012: version 1.2.0 * changed from UFconfig to SuiteSparse_config diff --git a/KLU/Doc/KLU_UserGuide.pdf b/KLU/Doc/KLU_UserGuide.pdf index c84f696953..e94864c5a0 100644 Binary files a/KLU/Doc/KLU_UserGuide.pdf and b/KLU/Doc/KLU_UserGuide.pdf differ diff --git a/KLU/Doc/KLU_UserGuide.tex b/KLU/Doc/KLU_UserGuide.tex index 053019b3f6..778ff9c014 100644 --- a/KLU/Doc/KLU_UserGuide.tex +++ b/KLU/Doc/KLU_UserGuide.tex @@ -26,7 +26,7 @@ } \and Eka Palamadai Natarajan} -\date{VERSION 1.2.0, Jun 1, 2012} +\date{VERSION 1.2.1, Jun 20, 2012} \maketitle %------------------------------------------------------------------------------ diff --git a/KLU/Include/klu.h b/KLU/Include/klu.h index e91c9e6234..283efe10b1 100644 --- a/KLU/Include/klu.h +++ b/KLU/Include/klu.h @@ -829,11 +829,11 @@ void *klu_l_realloc (size_t, size_t, size_t, void *, klu_l_common *) ; * #endif */ -#define KLU_DATE "Jun 1, 2012" +#define KLU_DATE "Jun 20, 2012" #define KLU_VERSION_CODE(main,sub) ((main) * 1000 + (sub)) #define KLU_MAIN_VERSION 1 #define KLU_SUB_VERSION 2 -#define KLU_SUBSUB_VERSION 0 +#define KLU_SUBSUB_VERSION 1 #define KLU_VERSION KLU_VERSION_CODE(KLU_MAIN_VERSION,KLU_SUB_VERSION) #ifdef __cplusplus diff --git a/KLU/MATLAB/klu_make.m b/KLU/MATLAB/klu_make.m index fcb6f786fd..cec47d3afa 100644 --- a/KLU/MATLAB/klu_make.m +++ b/KLU/MATLAB/klu_make.m @@ -62,8 +62,6 @@ include = ['-DNCHOLMOD ' include] ; end -include = strrep (include, '/', filesep) ; - amd_src = { ... '../../AMD/Source/amd_1', ... '../../AMD/Source/amd_2', ... @@ -277,8 +275,8 @@ end for f = source - fs = strrep (f {1}, '/', filesep) ; - slash = strfind (fs, filesep) ; + fs = f {1} ; + slash = strfind (fs, '/') ; if (isempty (slash)) slash = 1 ; else @@ -291,8 +289,8 @@ end for k = 1:length(klu_zlsrc) - ff = strrep (klu_zlsrc {k}, '/', filesep) ; - slash = strfind (ff, filesep) ; + ff = klu_zlsrc {k} ; + slash = strfind (ff, '/') ; if (isempty (slash)) slash = 1 ; else diff --git a/KLU/Makefile b/KLU/Makefile index 4808c0477c..de1d395199 100644 --- a/KLU/Makefile +++ b/KLU/Makefile @@ -2,7 +2,7 @@ # KLU Makefile #------------------------------------------------------------------------------ -VERSION = 1.2.0 +VERSION = 1.2.1 default: all diff --git a/MATLAB_Tools/Factorize/Test/test_all_output.txt b/MATLAB_Tools/Factorize/Test/test_all_output.txt deleted file mode 100644 index 73dd29cc58..0000000000 --- a/MATLAB_Tools/Factorize/Test/test_all_output.txt +++ /dev/null @@ -1 +0,0 @@ -diary off diff --git a/MATLAB_Tools/UFcollection/Doc/ChangeLog b/MATLAB_Tools/UFcollection/Doc/ChangeLog index bf9d10e3e5..b24cdb321d 100644 --- a/MATLAB_Tools/UFcollection/Doc/ChangeLog +++ b/MATLAB_Tools/UFcollection/Doc/ChangeLog @@ -1,3 +1,7 @@ +Jun 20, 2012: verison 1.6.2 + + * minor update for Windows (removed filesep) + May 15, 2012: version 1.6.1 * added test to exploit property of symmetric binary matrices (McKay et al) diff --git a/MATLAB_Tools/UFcollection/UFexport.m b/MATLAB_Tools/UFcollection/UFexport.m index e0742fffbe..77d0c4497d 100644 --- a/MATLAB_Tools/UFcollection/UFexport.m +++ b/MATLAB_Tools/UFcollection/UFexport.m @@ -72,9 +72,9 @@ function UFexport (list, check, tmp) fprintf ('Reading %s format ...\n', format {k}) ; try if (isempty (tmp)) - P2 = UFread ([topdir format{k} filesep Problem.name]) ; + P2 = UFread ([topdir format{k} '/' Problem.name]) ; else - P2 = UFread ([topdir format{k} filesep Problem.name], tmp) ; + P2 = UFread ([topdir format{k} '/' Problem.name], tmp) ; end catch % The Problem may be too large for two copies to be in the diff --git a/MATLAB_Tools/UFcollection/UFindex.m b/MATLAB_Tools/UFcollection/UFindex.m index e7c4c6433b..9e77297362 100644 --- a/MATLAB_Tools/UFcollection/UFindex.m +++ b/MATLAB_Tools/UFcollection/UFindex.m @@ -74,7 +74,7 @@ % load the filenames [url topdir] = UFlocation ; -files = textread ([topdir 'mat' filesep 'UF_Listing.txt'], '%s') ; +files = textread ([topdir 'mat/UF_Listing.txt'], '%s') ; % if no input, assume we have to do the whole file list create_new = 0 ; @@ -207,7 +207,7 @@ % group is the first part of the string up to the character before % the last file separator - gi = find (ffile == filesep) ; + gi = find (ffile == '/') ; gi = gi (end) ; groupN = char (ffile (1:gi-1)) ; @@ -215,7 +215,7 @@ matrixN = char (ffile (gi+1:end)) ; % get the directory info of the .mat file - fileInfo = dir ([topdir 'mat' filesep ffile '.mat']) ; + fileInfo = dir ([topdir 'mat/' ffile '.mat']) ; % set the file's data into the data arrays UF_Index.Name {i} = matrixN ; @@ -269,7 +269,7 @@ fprintf ('skip this file\n') ; continue ; end - load ([topdir 'mat' filesep ffile]) ; + load ([topdir 'mat/' ffile]) ; % display the Problem struct disp (Problem) ; diff --git a/MATLAB_Tools/UFcollection/UFlist.m b/MATLAB_Tools/UFcollection/UFlist.m index 673108649e..7e24fa630f 100644 --- a/MATLAB_Tools/UFcollection/UFlist.m +++ b/MATLAB_Tools/UFcollection/UFlist.m @@ -46,13 +46,13 @@ function UFlist (what, group) if (by_group) fprintf ('group: %s\n', group) ; loc = '../' ; - if (~exist ([matrices filesep group], 'dir')) - mkdir ([matrices filesep group]) ; + if (~exist ([matrices '/' group], 'dir')) + mkdir ([matrices '/' group]) ; end - f = fopen ([matrices filesep group filesep 'index.html'], 'w') ; + f = fopen ([matrices '/' group '/index.html'], 'w') ; else fprintf ('list: %s\n', what) ; - f = fopen ([matrices filesep 'list_by_' what '.html'], 'w') ; + f = fopen ([matrices '/list_by_' what '.html'], 'w') ; loc = '' ; end if (f < 0) diff --git a/MATLAB_Tools/UFcollection/UFlists.m b/MATLAB_Tools/UFcollection/UFlists.m index a0af4d994b..0782e1a9f4 100644 --- a/MATLAB_Tools/UFcollection/UFlists.m +++ b/MATLAB_Tools/UFcollection/UFlists.m @@ -33,7 +33,7 @@ end % create the groups.html file -f = fopen ([matrices filesep 'groups.html'], 'w') ; +f = fopen ([matrices '/groups.html'], 'w') ; if (f < 0) error ('unable to create groups.html file\n') ; end @@ -79,13 +79,13 @@ fprintf (f, '