Reuse matrix and vector

2009-11-10 Thread jaru...@ascomp.ch
Yes, thank you for the advice. I will modify this. But MatSetValues() is not efficient with a big problem. It takes much time. No, either you are inserting values that have not been preallocated (check with -info | grep mallocs) or you are inserting single values. You should insert a full

use of VecPlaceArray in parallel with fortran

2009-11-10 Thread Wienand Drenth
We are having some difficulty understanding your question and what exactly you want to do? Hello Barry, Apologies I am a bit unclear. I am relatively new to PetSc and the proper terminology, so thank you for your time and help. Currently we have a two Fortran arrays B and X, being the

Reuse matrix and vector

2009-11-10 Thread Jed Brown
communication, it has to be preallocation. Jed -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091110

Reuse matrix and vector

2009-11-10 Thread Matthew Knepley
is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091110/35a51c31/attachment-0001.htm

Reuse matrix and vector

2009-11-10 Thread Jed Brown
://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091110/c2355211/attachment.pgp

Reuse matrix and vector

2009-11-10 Thread jaru...@ascomp.ch
Quoting Jed Brown jed at 59A2.org: jarunan at ascomp.ch wrote: Total number of cells is 744872, divided into 40 blocks. In one processor, MatCreateMPIAIJWithArrays() takes 0.097 sec but 280 sec with 4 processors. Usually, this routine has no problem with small test case. It works the same

Reuse matrix and vector

2009-11-10 Thread Matthew Knepley
is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091110/1a5e92f7/attachment.htm

Reuse matrix and vector

2009-11-10 Thread Jed Brown
with MatMPIAIJSetPreallocation() and use MatSetValues(). Jed -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091110

use of VecPlaceArray in parallel with fortran

2009-11-10 Thread Wienand Drenth
As a follow-up of my previous email, I have tried the following: bvec is a Fortran array bseq2 is a sequential PetSc vector created only on processor 0 b is the parallel PetSc vector I use in KSPSolve I fill bvec with bvec(i) = i, and b gets initialized to all ones. then I do if

use of VecPlaceArray in parallel with fortran

2009-11-10 Thread Matthew Knepley
their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091110/91a210dc/attachment.htm

A problem on compiling a petsc code.

2009-11-10 Thread Yin Feng
part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091110/c75e523c/attachment.htm