22.09.2013 Views

Chapter 1 parallel sparse solver - freeFEM.org

Chapter 1 parallel sparse solver - freeFEM.org

Chapter 1 parallel sparse solver - freeFEM.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8 CHAPTER 1. PARALLEL SPARSE SOLVER<br />

example A simple example of calling MUMPS in FreeFem++ with this two methods is given<br />

in the file test<strong>solver</strong> MUMPS.edp in the directory examples++-mpi.<br />

1.2.2 SuperLU distributed <strong>solver</strong><br />

The package SuperLU DIST [9, 10] solve linear system using LU factorization. It a free scientific<br />

library under BSD license. The web site of this project is http://crd.lbl.gov/∼xiaoye/SuperLU. This<br />

library provide routines to handle square or rectangular matrix in real and complex arithmetics. The<br />

method implemented in SuperLU DIST is a supernodal method [10]. New release of this package<br />

include a <strong>parallel</strong> symbolic factorization [9]. This scientific library is written in C and using MPI<br />

for communication.<br />

Installation of SuperLU DIST: To used SuperLU DIST in FreeFem++ , you have to install<br />

SuperLU DIST package. We need MPI and ParMetis library to do this compilation. An installation<br />

procedure to obtain this package is given in the file README COMPILE in the directory<br />

src/<strong>solver</strong>/ of the freefem++ package.<br />

Creating Library of SuperLU DIST interface for FreeFem++ : The FreeFem++ interface<br />

to SuperLU DIST for real (resp. complex) arithmetics is given in file<br />

real SuperLU DIST FreeFem.cpp (resp. complex SuperLU DIST FreeFem.cpp). These files are<br />

in the directory src/<strong>solver</strong>/. These interfaces are compatible with the release 3.2.1 of SuperLU DIST.<br />

To used SuperLU DIST in FreeFem++ , we need libraries corresponding to these interfaces.<br />

A description to obtain these libraries is given in the file README COMPILE in the directory<br />

src/<strong>solver</strong> of FreeFem++ . We recall here the procedure. Go to the directory src/<strong>solver</strong> in<br />

FreeFem++ package. Edit the file makefile-<strong>sparse</strong><strong>solver</strong>.inc to yours system : comment Section<br />

1, comment line corresponding to libraries BLAS, Metis, ParMetis in Section 2 and comment<br />

in Section 3 the paragraph corresponding to SuperLU DIST <strong>solver</strong>. And just type make rsludist<br />

(resp. make csludist) in the terminal to obtain the dynamic library of interface for real (resp.<br />

complex) arithmetics.<br />

Now we give a short description of SuperLU DIST parameters before describing the method to<br />

call SuperLU DIST in FreeFem++ .<br />

SuperLU DIST parameters: We describe now some parameters of SuperLU DIST. The SuperLU<br />

DIST library used a 2D-logical process group. This process grid is specifies by nprow<br />

(process row) and npcol (process column) such that Np = nprow npcol where Np is the number of<br />

all process allocated for SuperLU DIST.<br />

The input matrix parameter is controlled by ”matrix= ” in sparams for internal parameter or in the<br />

third line of parameter file. The different value are<br />

matrix = assembled global matrix are available on all process<br />

matrix = distributedglobal the global matrix is distributed among all the process<br />

matrix = distributed the input matrix is distributed (not yet implemented)<br />

The option arguments of SuperLU DIST are describe in the section Users-callable routine of [11].<br />

The parameter Fact and TRANS are specifies in FreeFem++ interfaces to SuperLU DIST during<br />

the different steps. For this reason, the value given by the user for this option is not considered.<br />

The factorization LU is calculated in SuperLU DIST on the matrix Ap.<br />

Ap = Pc Pr Dr A Dc P t c

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!