Skip to content

Commit

Permalink
klu and umfpack matlab interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Oct 23, 2023
1 parent fabbab7 commit a8fd114
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 51 deletions.
89 changes: 71 additions & 18 deletions KLU/MATLAB/klu_make.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,77 @@
'../../CCOLAMD/Source/ccolamd_l' } ;

cholmod_src = {
'../../CHOLMOD/Core/cholmod_l_aat', ...
'../../CHOLMOD/Core/cholmod_l_add', ...
'../../CHOLMOD/Core/cholmod_l_band', ...
'../../CHOLMOD/Core/cholmod_l_change_factor', ...
'../../CHOLMOD/Core/cholmod_l_common', ...
'../../CHOLMOD/Core/cholmod_l_complex', ...
'../../CHOLMOD/Core/cholmod_l_copy', ...
'../../CHOLMOD/Core/cholmod_l_dense', ...
'../../CHOLMOD/Core/cholmod_l_error', ...
'../../CHOLMOD/Core/cholmod_l_factor', ...
'../../CHOLMOD/Core/cholmod_l_memory', ...
'../../CHOLMOD/Core/cholmod_l_sparse', ...
'../../CHOLMOD/Core/cholmod_l_transpose', ...
'../../CHOLMOD/Core/cholmod_l_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_aat', ...
'../../CHOLMOD/Utility/cholmod_l_add', ...
'../../CHOLMOD/Utility/cholmod_l_add_size_t', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_dense', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_factor', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_work', ...
'../../CHOLMOD/Utility/cholmod_l_alloc_factor', ...
'../../CHOLMOD/Utility/cholmod_l_alloc_work', ...
'../../CHOLMOD/Utility/cholmod_l_band', ...
'../../CHOLMOD/Utility/cholmod_l_band_nnz', ...
'../../CHOLMOD/Utility/cholmod_l_calloc', ...
'../../CHOLMOD/Utility/cholmod_l_change_factor', ...
'../../CHOLMOD/Utility/cholmod_l_clear_flag', ...
'../../CHOLMOD/Utility/cholmod_l_copy', ...
'../../CHOLMOD/Utility/cholmod_l_copy_dense2', ...
'../../CHOLMOD/Utility/cholmod_l_copy_dense', ...
'../../CHOLMOD/Utility/cholmod_l_copy_factor', ...
'../../CHOLMOD/Utility/cholmod_l_copy_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_copy_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_cumsum', ...
'../../CHOLMOD/Utility/cholmod_l_dbound', ...
'../../CHOLMOD/Utility/cholmod_l_defaults', ...
'../../CHOLMOD/Utility/cholmod_l_dense_nnz', ...
'../../CHOLMOD/Utility/cholmod_l_dense_to_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_divcomplex', ...
'../../CHOLMOD/Utility/cholmod_l_ensure_dense', ...
'../../CHOLMOD/Utility/cholmod_l_error', ...
'../../CHOLMOD/Utility/cholmod_l_eye', ...
'../../CHOLMOD/Utility/cholmod_l_factor_to_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_finish', ...
'../../CHOLMOD/Utility/cholmod_l_free', ...
'../../CHOLMOD/Utility/cholmod_l_free_dense', ...
'../../CHOLMOD/Utility/cholmod_l_free_factor', ...
'../../CHOLMOD/Utility/cholmod_l_free_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_free_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_free_work', ...
'../../CHOLMOD/Utility/cholmod_l_hypot', ...
'../../CHOLMOD/Utility/cholmod_l_malloc', ...
'../../CHOLMOD/Utility/cholmod_l_maxrank', ...
'../../CHOLMOD/Utility/cholmod_l_mult_size_t', ...
'../../CHOLMOD/Utility/cholmod_l_nnz', ...
'../../CHOLMOD/Utility/cholmod_l_ones', ...
'../../CHOLMOD/Utility/cholmod_l_pack_factor', ...
'../../CHOLMOD/Utility/cholmod_l_ptranspose', ...
'../../CHOLMOD/Utility/cholmod_l_reallocate_column', ...
'../../CHOLMOD/Utility/cholmod_l_reallocate_factor', ...
'../../CHOLMOD/Utility/cholmod_l_reallocate_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_reallocate_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_realloc', ...
'../../CHOLMOD/Utility/cholmod_l_realloc_multiple', ...
'../../CHOLMOD/Utility/cholmod_l_sbound', ...
'../../CHOLMOD/Utility/cholmod_l_score_comp', ...
'../../CHOLMOD/Utility/cholmod_l_set_empty', ...
'../../CHOLMOD/Utility/cholmod_l_sort', ...
'../../CHOLMOD/Utility/cholmod_l_sparse_to_dense', ...
'../../CHOLMOD/Utility/cholmod_l_sparse_to_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_speye', ...
'../../CHOLMOD/Utility/cholmod_l_spzeros', ...
'../../CHOLMOD/Utility/cholmod_l_start', ...
'../../CHOLMOD/Utility/cholmod_l_transpose', ...
'../../CHOLMOD/Utility/cholmod_l_transpose_sym', ...
'../../CHOLMOD/Utility/cholmod_l_transpose_unsym', ...
'../../CHOLMOD/Utility/cholmod_l_triplet_to_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_version', ...
'../../CHOLMOD/Utility/cholmod_l_xtype', ...
'../../CHOLMOD/Utility/cholmod_l_zeros', ...
'../../CHOLMOD/Utility/cholmod_mult_uint64_t', ...
'../../CHOLMOD/Utility/cholmod_memdebug', ...
'../../CHOLMOD/Check/cholmod_l_check', ...
'../../CHOLMOD/Cholesky/cholmod_l_amd', ...
'../../CHOLMOD/Cholesky/cholmod_l_analyze', ...
'../../CHOLMOD/Cholesky/cholmod_l_colamd', ...
Expand Down Expand Up @@ -177,11 +234,7 @@
end

if (pc)
% Windows does not have drand48 and srand48, required by METIS. Use
% drand48 and srand48 in CHOLMOD/MATLAB/Windows/rand48.c instead.
obj_extension = '.obj' ;
cholmod_src = [cholmod_src {'../../CHOLMOD/MATLAB/Windows/rand48'}] ;
include = [include ' -I../../CHOLMOD/MATLAB/Windows'] ;
else
obj_extension = '.o' ;
end
Expand Down
115 changes: 82 additions & 33 deletions UMFPACK/MATLAB/umfpack_make.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,44 +191,93 @@
'../../CCOLAMD/Source/ccolamd' } ;

cholmod_src = {
'../../CHOLMOD/Core/cholmod_aat', ...
'../../CHOLMOD/Core/cholmod_add', ...
'../../CHOLMOD/Core/cholmod_band', ...
'../../CHOLMOD/Core/cholmod_change_factor', ...
'../../CHOLMOD/Core/cholmod_common', ...
'../../CHOLMOD/Core/cholmod_complex', ...
'../../CHOLMOD/Core/cholmod_copy', ...
'../../CHOLMOD/Core/cholmod_dense', ...
'../../CHOLMOD/Core/cholmod_error', ...
'../../CHOLMOD/Core/cholmod_factor', ...
'../../CHOLMOD/Core/cholmod_memory', ...
'../../CHOLMOD/Core/cholmod_sparse', ...
'../../CHOLMOD/Core/cholmod_transpose', ...
'../../CHOLMOD/Core/cholmod_triplet', ...
'../../CHOLMOD/Check/cholmod_check', ...
'../../CHOLMOD/Cholesky/cholmod_amd', ...
'../../CHOLMOD/Cholesky/cholmod_analyze', ...
'../../CHOLMOD/Cholesky/cholmod_colamd', ...
'../../CHOLMOD/Cholesky/cholmod_etree', ...
'../../CHOLMOD/Cholesky/cholmod_postorder', ...
'../../CHOLMOD/Cholesky/cholmod_rowcolcounts', ...
'../../CHOLMOD/Partition/cholmod_ccolamd', ...
'../../CHOLMOD/Partition/cholmod_csymamd', ...
'../../CHOLMOD/Partition/cholmod_camd', ...
'../../CHOLMOD/Partition/cholmod_metis', ...
'../../CHOLMOD/Utility/cholmod_l_aat', ...
'../../CHOLMOD/Utility/cholmod_l_add', ...
'../../CHOLMOD/Utility/cholmod_l_add_size_t', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_dense', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_factor', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_allocate_work', ...
'../../CHOLMOD/Utility/cholmod_l_alloc_factor', ...
'../../CHOLMOD/Utility/cholmod_l_alloc_work', ...
'../../CHOLMOD/Utility/cholmod_l_band', ...
'../../CHOLMOD/Utility/cholmod_l_band_nnz', ...
'../../CHOLMOD/Utility/cholmod_l_calloc', ...
'../../CHOLMOD/Utility/cholmod_l_change_factor', ...
'../../CHOLMOD/Utility/cholmod_l_clear_flag', ...
'../../CHOLMOD/Utility/cholmod_l_copy', ...
'../../CHOLMOD/Utility/cholmod_l_copy_dense2', ...
'../../CHOLMOD/Utility/cholmod_l_copy_dense', ...
'../../CHOLMOD/Utility/cholmod_l_copy_factor', ...
'../../CHOLMOD/Utility/cholmod_l_copy_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_copy_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_cumsum', ...
'../../CHOLMOD/Utility/cholmod_l_dbound', ...
'../../CHOLMOD/Utility/cholmod_l_defaults', ...
'../../CHOLMOD/Utility/cholmod_l_dense_nnz', ...
'../../CHOLMOD/Utility/cholmod_l_dense_to_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_divcomplex', ...
'../../CHOLMOD/Utility/cholmod_l_ensure_dense', ...
'../../CHOLMOD/Utility/cholmod_l_error', ...
'../../CHOLMOD/Utility/cholmod_l_eye', ...
'../../CHOLMOD/Utility/cholmod_l_factor_to_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_finish', ...
'../../CHOLMOD/Utility/cholmod_l_free', ...
'../../CHOLMOD/Utility/cholmod_l_free_dense', ...
'../../CHOLMOD/Utility/cholmod_l_free_factor', ...
'../../CHOLMOD/Utility/cholmod_l_free_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_free_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_free_work', ...
'../../CHOLMOD/Utility/cholmod_l_hypot', ...
'../../CHOLMOD/Utility/cholmod_l_malloc', ...
'../../CHOLMOD/Utility/cholmod_l_maxrank', ...
'../../CHOLMOD/Utility/cholmod_l_mult_size_t', ...
'../../CHOLMOD/Utility/cholmod_l_nnz', ...
'../../CHOLMOD/Utility/cholmod_l_ones', ...
'../../CHOLMOD/Utility/cholmod_l_pack_factor', ...
'../../CHOLMOD/Utility/cholmod_l_ptranspose', ...
'../../CHOLMOD/Utility/cholmod_l_reallocate_column', ...
'../../CHOLMOD/Utility/cholmod_l_reallocate_factor', ...
'../../CHOLMOD/Utility/cholmod_l_reallocate_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_reallocate_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_realloc', ...
'../../CHOLMOD/Utility/cholmod_l_realloc_multiple', ...
'../../CHOLMOD/Utility/cholmod_l_sbound', ...
'../../CHOLMOD/Utility/cholmod_l_score_comp', ...
'../../CHOLMOD/Utility/cholmod_l_set_empty', ...
'../../CHOLMOD/Utility/cholmod_l_sort', ...
'../../CHOLMOD/Utility/cholmod_l_sparse_to_dense', ...
'../../CHOLMOD/Utility/cholmod_l_sparse_to_triplet', ...
'../../CHOLMOD/Utility/cholmod_l_speye', ...
'../../CHOLMOD/Utility/cholmod_l_spzeros', ...
'../../CHOLMOD/Utility/cholmod_l_start', ...
'../../CHOLMOD/Utility/cholmod_l_transpose', ...
'../../CHOLMOD/Utility/cholmod_l_transpose_sym', ...
'../../CHOLMOD/Utility/cholmod_l_transpose_unsym', ...
'../../CHOLMOD/Utility/cholmod_l_triplet_to_sparse', ...
'../../CHOLMOD/Utility/cholmod_l_version', ...
'../../CHOLMOD/Utility/cholmod_l_xtype', ...
'../../CHOLMOD/Utility/cholmod_l_zeros', ...
'../../CHOLMOD/Utility/cholmod_mult_uint64_t', ...
'../../CHOLMOD/Utility/cholmod_memdebug', ...
'../../CHOLMOD/Check/cholmod_l_check', ...
'../../CHOLMOD/Cholesky/cholmod_l_amd', ...
'../../CHOLMOD/Cholesky/cholmod_l_analyze', ...
'../../CHOLMOD/Cholesky/cholmod_l_colamd', ...
'../../CHOLMOD/Cholesky/cholmod_l_etree', ...
'../../CHOLMOD/Cholesky/cholmod_l_postorder', ...
'../../CHOLMOD/Cholesky/cholmod_l_rowcolcounts', ...
'../../CHOLMOD/Partition/cholmod_l_ccolamd', ...
'../../CHOLMOD/Partition/cholmod_l_csymamd', ...
'../../CHOLMOD/Partition/cholmod_l_camd', ...
'../../CHOLMOD/Partition/cholmod_l_metis', ...
'../../CHOLMOD/Partition/cholmod_metis_wrapper', ...
'../../CHOLMOD/Partition/cholmod_nesdis' } ;
'../../CHOLMOD/Partition/cholmod_l_nesdis' } ;

other_source = [other_source cholmod_src ordering_src] ;
end

if (pc && with_cholmod)
% Windows does not have drand48 and srand48, required by METIS. Use
% drand48 and srand48 in CHOLMOD/MATLAB/Windows/rand48.c instead.
other_source = [other_source {'../../CHOLMOD/MATLAB/Windows/rand48'}] ;
incdir = [incdir ' -I../../CHOLMOD/MATLAB/Windows'] ;
end

%-------------------------------------------------------------------------------
% mex command
%-------------------------------------------------------------------------------
Expand Down

0 comments on commit a8fd114

Please sign in to comment.