A different kind of lagged preconditioner

2009-03-23 Thread Rafael Santos Coelho
Hi, Barry thanks a lot for the help :D P.S.: It did sucked, bit time! -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/ed661bc3/attachment.htm>

KSPSolve() and mutliple rhs

2009-03-23 Thread Satish Balay
For an example - check src/ksp/ksp/examples/tutorials/ex16.c Satish On Mon, 23 Mar 2009, Matthew Knepley wrote: > I would just write a loop over rhs. > > Matt > > On Mon, Mar 23, 2009 at 9:00 PM, Yujie wrote: > > > Hi, PETSc developers > > > > I know KSPSolve() can't support multiple rhs.

KSPSolve() and mutliple rhs

2009-03-23 Thread Matthew Knepley
--- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/f427b6bf/attachment.htm>

A different kind of lagged preconditioner

2009-03-23 Thread Rafael Santos Coelho
ery "p" linear iterations to make it less costlier. Rafael -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/435996ef/attachment.htm>

PetscMalloc petsc-3.0.0-p4

2009-03-23 Thread Lisandro Dalcin
1) Which system are you running on? 2) are you completely sure BOTH things happens, I mean... that malloc returns null AND the error code is zero? On Mon, Mar 23, 2009 at 7:49 PM, David Fuentes wrote: > In 3.0.0-p4 > > PetscMalloc doesn't seem to return an error code if the requested memory > w

PetscMalloc petsc-3.0.0-p4

2009-03-23 Thread Matthew Knepley
n't seem to return an error code if the requested memory >>>> wasn't allocated ? Is this correct ? >>>> >>>> I'm trying to allocate a dense matrix for which there was not enough >>>> memory >>>> and PetscMalloc is returning a null pointer but no errorcode to >>>> catch. which is causing seg faults later. >>>> >>>> >>>> >>>> thanks, >>>> df >>>> >>>> >>>> >>> >>> >>> -- >>> Lisandro Dalc?n >>> --- >>> Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC) >>> Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC) >>> Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET) >>> PTLC - G?emes 3450, (3000) Santa Fe, Argentina >>> Tel/Fax: +54-(0)342-451.1594 >>> >>> > -- What most experimenters take for granted before they begin 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/20090323/8cb77832/attachment-0001.htm>

PetscMalloc petsc-3.0.0-p4

2009-03-23 Thread Barry Smith
[anlextwls097-161:~/Documents/RandD-100] barrysmith% python >>> npixel = 256*256*5 >>> print npixel 327,680 >>> print npixel*npixel 107,374,182,400 The problem is that your n is too big to fit into a PetscInt hence bad stuff happens. This is a fatal flaw of C, it doesn't generation exceptio

A different kind of lagged preconditioner

2009-03-23 Thread Barry Smith
Just use VecCopy() for the times you skip the application of the preconditioner; if you do nothing for those times, it will fail as it does. As Matt says, you need to use KSPFGMRES if you use a different preconditioner on different iterations. BTW: your plan will suck. Barry

KSPSolve() and mutliple rhs

2009-03-23 Thread Yujie
t was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/00c0ebcf/attachment.htm>

PetscMalloc petsc-3.0.0-p4

2009-03-23 Thread David Fuentes
running on ubuntu 8.04. the following code should reproduce the problem. static char help[] = "MatCreateSeqDense\n\n"; #include "petscpc.h" #undef __FUNCT__ #define __FUNCT__ "main" int main(int argc,char **args) { Matmat; PetscErrorCode ierr; PetscInt npixel = 25

PetscMalloc petsc-3.0.0-p4

2009-03-23 Thread Matthew Knepley
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/20090323/bace8f71/attachment-0001.htm>

PetscMalloc petsc-3.0.0-p4

2009-03-23 Thread David Fuentes
In 3.0.0-p4 PetscMalloc doesn't seem to return an error code if the requested memory wasn't allocated ? Is this correct ? I'm trying to allocate a dense matrix for which there was not enough memory and PetscMalloc is returning a null pointer but no errorcode to catch. which is causing seg faults

A different kind of lagged preconditioner

2009-03-23 Thread Rafael Santos Coelho
//lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/5ddb1f21/attachment.htm>

A different kind of lagged preconditioner

2009-03-23 Thread Rafael Santos Coelho
d... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/d39d4fa3/attachment.htm>

A different kind of lagged preconditioner

2009-03-23 Thread Rafael Santos Coelho
d... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/2d54ed35/attachment.htm>

A different kind of lagged preconditioner

2009-03-23 Thread Barry Smith
On Mar 23, 2009, at 2:06 PM, Rafael Santos Coelho wrote: > Barry, > > sorry if I'm coming off stubborn or something, but I think I'm not > following your reasoning. > > NO. > > If you are using LU to construct a preconditioner then you ARE > providing the Jacobian explicitly (as a sparse) m

A different kind of lagged preconditioner

2009-03-23 Thread Matthew Knepley
experiments lead. -- Norbert Wiener -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/06e0f582/attachment.htm>

A different kind of lagged preconditioner

2009-03-23 Thread Barry Smith
On Mar 23, 2009, at 1:42 PM, Rafael Santos Coelho wrote: > Hey, Barry > > > Lagging the preconditioner does NOT mean applying the > preconditioner every p non-linear iterations. It means RECOMPUTING > the preconditioner (with LU that means doing a new LU numerical > factorization) every p

A different kind of lagged preconditioner

2009-03-23 Thread Rafael Santos Coelho
r solve did not converge due to DIVERGED_NULL iterations 1 Nonlinear solve did not converge due to DIVERGED_LINEAR_SOLVE What's wrong with this? Rafael -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/29beb435/attachment.htm>

A different kind of lagged preconditioner

2009-03-23 Thread Barry Smith
Lagging the preconditioner does NOT mean applying the preconditioner every p non-linear iterations. It means RECOMPUTING the preconditioner (with LU that means doing a new LU numerical factorization) every p nonlinear iterations. The preconditioner is still APPLIED at every iteration o

A different kind of lagged preconditioner

2009-03-23 Thread Rafael Santos Coelho
want to apply it every "p" linear iterations within each non-linear iteration. How can I do that? Thanks in advance, Rafael -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/c22fa7ba/attachment.htm>

A different kind of lagged preconditioner

2009-03-23 Thread Matthew Knepley
they begin 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/20090323/6b4760f8/attachment.htm>