[petsc-users] To slow just in first step of SNES

behzad baghapour behzad.baghapour at gmail.com
Sun Dec 18 13:11:47 CST 2011


Dear Developers,

I tried to following optimized matrix data setup for a block-sparse mat
solver but when I run the code, too much time is taken "just" for the first
step of SNES procedure (about 20 to 30 times than the next steps ?! ).

I did above as follows:

1- Allocate matrix( matrices ):

MatSetType ( JAC, MATSEQBAIJ );
MatSetSizes ( JAC, PETSC_DECIDE, PETSC_DECIDE, nt, nt );
MatSeqBAIJSetPreallocation ( JAC, tot, 0, nnz );
MatSetFromOptions ( JAC );

where nnz[] is account regarded to connectivity

2- Matrix Data calculation:

MatSetValues( JAC, tot, IDX, tot, JDX, VAL, ADD_VALUES );

where IDX, JDX, VAL are blocks of data with size tot.

3- Did the same for preconditioning matrix.

4- used PCILU for preconditioning.

I also print out log_summary but I actually can't find out if I set the
memory optimized ( I don't no how to follow the logfile and check what
parameters ).

Please let me know how would be the failure in my procedure...

Thanks a lot,
BehZad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111218/abffd824/attachment.htm>


More information about the petsc-users mailing list