Chapter 1 parallel sparse solver - freeFEM.org
Chapter 1 parallel sparse solver - freeFEM.org
Chapter 1 parallel sparse solver - freeFEM.org
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
2 CHAPTER 1. PARALLEL SPARSE SOLVER<br />
To use <strong>parallel</strong> <strong>solver</strong> in FreeFem++, we need to load the dynamic library corresponding to this<br />
<strong>solver</strong>. For example to use MUMPS <strong>solver</strong> as <strong>parallel</strong> <strong>solver</strong> in FreeFem, write in the .edp file load<br />
”MUMPS FreeFem”.<br />
When we not load libraries, the default <strong>sparse</strong> <strong>solver</strong> change (default <strong>sparse</strong> <strong>solver</strong> is umfpack).<br />
The table 1.1 gives this new value for the different libraries.<br />
default <strong>sparse</strong> <strong>solver</strong><br />
Libraries real complex<br />
MUMPS FreeFem mumps mumps<br />
real SuperLU DIST FreeFem SuperLU DIST previous <strong>solver</strong><br />
complex SuperLU DIST FreeFem previous <strong>solver</strong> SuperLU DIST<br />
real pastix FreeFem pastix previous <strong>solver</strong><br />
complex pastix FreeFem previous <strong>solver</strong> pastix<br />
hips FreeFem hips previous <strong>solver</strong><br />
hypre FreeFem hypre previous <strong>solver</strong><br />
parms FreeFem parms previous <strong>solver</strong><br />
Table 1.1: Default <strong>sparse</strong> <strong>solver</strong> for real and complex arithmetics when we load a <strong>parallel</strong> <strong>sparse</strong><br />
<strong>solver</strong> library<br />
We also add functions (see Table 1.2) with no parameter to change the default <strong>sparse</strong> <strong>solver</strong> in the<br />
.edp file. To used these functions, we need to load the library corresponding to the <strong>solver</strong>. An example<br />
of using different <strong>parallel</strong> <strong>sparse</strong> <strong>solver</strong> for the same problem is given in testdirect<strong>solver</strong>s.edp<br />
(directory example+ + −mpi).<br />
default <strong>sparse</strong> <strong>solver</strong><br />
function real complex<br />
defaulttoMUMPS() mumps mumps<br />
realdefaulttoSuperLUdist() SuperLU DIST previous <strong>solver</strong><br />
complexdefaulttoSuperLUdist() previous <strong>solver</strong> SuperLU DIST<br />
realdefaultopastix() pastix previous <strong>solver</strong><br />
complexdefaulttopastix() previous <strong>solver</strong> pastix<br />
defaulttohips() hips previous <strong>solver</strong><br />
defaulttohypre() hypre previous <strong>solver</strong><br />
defaulttoparms() parms previous <strong>solver</strong><br />
Table 1.2: Functions that allow to change default <strong>sparse</strong> <strong>solver</strong> for real and complex arithmetics<br />
and the result of these functions<br />
Example 1.1 (testdirect<strong>solver</strong>s.edp)<br />
load "../src/<strong>solver</strong>/MUMPS_FreeFem"<br />
// default <strong>solver</strong> : real-> MUMPS, complex -> MUMPS<br />
load "../src/<strong>solver</strong>/real_SuperLU_DIST_FreeFem"<br />
// default <strong>solver</strong> : real-> SuperLU DIST, complex -> MUMPS<br />
load "../src/<strong>solver</strong>/real_pastix_FreeFem"<br />
// default <strong>solver</strong> : real-> pastix, complex -> MUMPS<br />
// solving with pastix