~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to CHOLMOD/MATLAB/cholmod_install.m

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-05-29 09:36:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529093629-zowquo0b7slkk6nc
Tags: 3.0.0-2
* suitesparse builds properly twice in a row
* Bug fix: "suitesparse - FTBFS: Broken build depens: libgfortran1-dev",
  thanks to Bastian Blank (Closes: #426349).
* Bug fix: "suitesparse_3.0.0-1: FTBFS: build-depends on
  libgfortran1-dev", thanks to Steve Langasek (Closes: #426354).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function cholmod_install (metis_path)
 
2
%CHOLMOD_INSTALL compile and install CHOLMOD, AMD, COLAMD, CCOLAMD, CAMD
 
3
%
 
4
% Example:
 
5
%   cholmod_install                 % compiles using ../../metis-4.0
 
6
%   cholmod_install ('/my/metis')   % using non-default path to METIS
 
7
%   cholmod_install ('no metis')    % do not use METIS at all
 
8
%
 
9
% CHOLMOD relies on AMD and COLAMD, for its ordering options, and can
 
10
% optionally use CCOLAMD, CAMD, and METIS as well.  By default, CCOLAMD, CAMD,
 
11
% and METIS are used.  METIS is assumed to be in the ../../metis-4.0 directory.
 
12
%
 
13
% See http://www-users.cs.umn.edu/~karypis/metis for a copy of METIS 4.0.1.
 
14
%
 
15
% You can only use cholmod_install while in the CHOLMOD/MATLAB directory.
 
16
%
 
17
% See also analyze, bisect, chol2, cholmod2, etree2, lchol, ldlchol, ldlsolve,
 
18
%   ldlupdate, metis, spsym, nesdis, septree, resymbol, sdmult, sparse2,
 
19
%   symbfact2, mread, mwrite, amd2, colamd2, camd, ccolamd
 
20
 
 
21
%   Copyright 2006-2007, Timothy A. Davis
 
22
 
 
23
if (nargin < 1)
 
24
    metis_path = '../../metis-4.0' ;
 
25
end
 
26
 
 
27
% compile CHOLMOD and add to the path
 
28
cholmod_make (metis_path) ;
 
29
cholmod_path = pwd ;
 
30
addpath (cholmod_path)
 
31
 
 
32
fprintf ('\nNow compiling the AMD, COLAMD, CCOLAMD, and CAMD mexFunctions:\n') ;
 
33
 
 
34
% compile AMD and add to the path
 
35
cd ../../AMD/MATLAB
 
36
amd_make
 
37
amd_path = pwd ;
 
38
addpath (amd_path)
 
39
 
 
40
% compile COLAMD and add to the path
 
41
cd ../../COLAMD/MATLAB
 
42
colamd_make
 
43
colamd_path = pwd ;
 
44
addpath (colamd_path)
 
45
 
 
46
% compile CCOLAMD and add to the path
 
47
cd ../../CCOLAMD/MATLAB
 
48
ccolamd_make
 
49
ccolamd_path = pwd ;
 
50
addpath (ccolamd_path)
 
51
 
 
52
% compile CAMD and add to the path
 
53
cd ../../CAMD/MATLAB
 
54
camd_make
 
55
camd_path = pwd ;
 
56
addpath (camd_path)
 
57
 
 
58
cd (cholmod_path)
 
59
 
 
60
fprintf ('\nThe following paths have been added.  You may wish to add them\n') ;
 
61
fprintf ('permanently, using the MATLAB pathtool command.\n') ;
 
62
fprintf ('%s\n', cholmod_path) ;
 
63
fprintf ('%s\n', amd_path) ;
 
64
fprintf ('%s\n', colamd_path) ;
 
65
fprintf ('%s\n', ccolamd_path) ;
 
66
fprintf ('%s\n', camd_path) ;
 
67
 
 
68
fprintf ('\nTo try your new mexFunctions, cut-and-paste this command:\n') ;
 
69
fprintf ('amd_demo, colamd_demo, ccolamd_demo, camd_demo, graph_demo, cholmod_demo\n') ;
 
70