README
1README
2************************************************************************
3* This MATLAB interface to MUMPS is provided to you free of charge. *
4* It is part of the MUMPS package (see ../Conditions_of_use) and is *
5* public domain. Up-to-date copies can be obtained from the Web *
6* pages http://mumps.enseeiht.fr/ or *
7* http://graal.ens-lyon.fr/MUMPS *
8* *
9* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY *
10* EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. *
11* *
12* More info is available in the main MUMPS users' guide and in: *
13* *
14* [2006] Aurelia Fevre, Jean-Yves L'Excellent and Stephane Pralet *
15* MATLAB and Scilab interfaces to MUMPS. LIP Report RR2006-06. *
16* Also available as an INRIA and an ENSEEIHT-IRIT Technical Report. *
17* *
18************************************************************************
19
20
21************************************************************************
22 COMPATIBILITY WITH OCTAVE:
23 Thanks to the Octave MEX compatibility, it is pretty straightforward
24 to generate an Octave interface for MUMPS. Please refer to the comments
25 inside the make.inc file for instructions on how to do it. Everything
26 said below applies for both cases where a MATLAB or an Octave interface
27 is needed.
28 Thanks to Carlo De Falco from "Politecnico di Milano" for support
29 provided on the usage of Octave.
30************************************************************************
31
32
33 CONTENT OF DIRECTORY:
34
35 README
36 Makefile
37 make.inc
38 initmumps.m
39 mumps.m
40 other *.m files: examples of usage
41 mumpsmex.c : MATLAB CMEX-file to let you use sequential MUMPS
42 in double precision from MATLAB.
43
44
45
46 USAGE:
47 see example below and MUMPS documentation
48
49
50
51 INSTALLATION:
52 You need
53 1-
54 to have compiled/linked a sequential version of MUMPS with both double
55 precision and double complex arithmetics ("make d" and "make z",
56 or "make all"). The code must be position-independent (with gfortran,
57 please add the option -fPIC in both FC, CC, and FL of the main
58 Makefile.inc). Note that this also applies to other external
59 libraries, such as METIS, SCOTCH, BLAS, etc.
60
61
62 2-
63 to edit make.inc.
64 Modify paths for orderings and BLAS. You should also
65 give the path to the runtime libraries of your FORTRAN 90
66 compiler. Some commented examples are provided.
67
68 You can use something like
69 nm -o /opt/intel/compiler80/lib/*.a | grep <name of missing compiler symbol>
70 to find which libraries should be added
71
72 3-
73 to run the make command
74
75 4- We advise you to run the 4 examples
76 simple_example.m, multiplerhs_example.m, sparserhs_example.m and
77 schurrhs_example.m
78 and to check that everything runs smoothly.
79
80******************************************************************************
81
82 LIMITATION:
83
84 This interface enables you to call MUMPS from MATLAB only
85 in sequential for double precision and double complex versions.
86 For example it does not support:
87 - other versions (single precision arithmetic, parallel version...)
88 - elemental format
89
90******************************************************************************
91
92
93%Example of using MUMPS in matlab
94% initialization of a matlab MUMPS structure
95id = initmumps;
96% here JOB = -1, the call to MUMPS will initialize C and fortran MUMPS structure
97id = dmumps(id);
98% load a sparse matrix
99load lhr01;
100mat = Problem.A;
101% JOB = 6 means analysis+facto+solve
102id.JOB = 6;
103id.ICNTL(6) = 0;
104% we set the rigth hand side
105id.RHS = ones(size(mat,1),1);
106%call to mumps
107id = dmumps(id,mat);
108% we see that there is a memory problem in INFO(1) and INFO(2)
109id.INFOG(1)
110id.INFOG(2)
111% we activate the numerical maximum transversal
112id.ICNTL(6) = 6;
113id = dmumps(id,mat);
114norm(mat*id.SOL - ones(size(mat,1),1),'inf')
115% solution OK
116% destroy mumps instance
117id.JOB = -2;
118id = dmumps(id)
119
120