Thank you very much, Jed. I understand it now. Jarunan
Quoting Jed Brown <jed at 59A2.org>: > On Thu, 03 Dec 2009 11:40:14 +0100, jarunan at ascomp.ch wrote: >> Could I use BAIJ format if my block size is not the same in each >> block? > > No, but AIJ uses Inodes when you have adjacent rows with the same > nonzero pattern, this gives some advantages of BAIJ in sparse matrix > kernels (MatMult, MatSolve, MatRelax). > >> At the end of the day, would these 2 structures of matrix affect >> differently in solving performance such as speed up? > > This is very dependent on the preconditioner. BAIJ reduces memory usage > from 12 bytes per nonzero to about 8 (assuming scalar=double, 32-bit > indices), and makes memory access slightly more regular. Despite AIJ > using Inodes, I frequently see BAIJ being faster by this ratio (8/12). > BAIJ can reduce setup time (factorization) by a larger factor. > > Sometimes it is worth storing a small number of explicit zeros in order > to have constant block size. Note that many third-party preconditioners > can not use BAIJ, but if you insert values with MatSetValuesBlock, you > can still always run with -mat_type aij. > > Jed > -- Jarunan Panyasantisuk Development Engineer ASCOMP GmbH, Technoparkstr. 1 CH-8005 Zurich, Switzerland Phone : +41 44 445 4072 Fax : +41 44 445 4075 E-mail: jarunan at ascomp.ch www.ascomp.ch
