[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython

2011-10-20 Thread Lisandro Dalcin
On 20 October 2011 19:34, Jeff Wiens wrote: > Lisandro, the shared library was the problem. I seem to have > everything working by including the --with-shared and --with-dynamic > options in my PetSc 3.1 configuration. > The --with-dynamic stuff should not be required, and I think it's better if

[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython

2011-10-20 Thread Lisandro Dalcin
On 20 October 2011 17:05, Jeff Wiens wrote: > > The problem seems to be that PetSc is no longer initialised when you > call a C function. If I initialise PETSc from C, the program works. > However, if I don't call init() from C, the program won't use the > python PetSc. Mmm... I bet you built PET

[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython

2011-10-20 Thread Jeff Wiens
s.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/dd128d8e/attachment.obj>

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Matthew Knepley
-- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/9a67d3f2/attachment.htm>

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Klaij, Christiaan
Thanks for all the answers! First, I would like to see something printed to stdout, right now I don't. Assuming my KSPMonitorSet call is correct, could it be that I don't see anything because I'm using FGMRES? Should I get a warning when using this monitor with any other KSP beside CG and GMRES?

[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython

2011-10-20 Thread Ethan Coon
On Thu, 2011-10-20 at 13:40 -0700, Jeff Wiens wrote: > The point of the example was to perform the PetSc operation in C. > Although you could do the dot product in Cython or Python, it defeats > my purpose. I am attempting to write a wrapper for an existing PetSc C > code base. I would like to setu

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Matthew Knepley
F +31 317 49 32 45, I www.marin.nl > > -- 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/20111020/56974d75/attachment.htm>

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Klaij, Christiaan
I'm confused about how to use KSPMonitorSingularValue in my fortran code (not using the options database) By looking at ex30.c I have: call KSPMonitorSet(ksp,KSPMonitorSingularValue,PETSC_NULL,PETSC_NULL,ierr); call KSPSetComputeSingularValues(ksp,PETSC_TRUE,ierr) in the part where I initialize

[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython

2011-10-20 Thread Ethan Coon
On Thu, 2011-10-20 at 13:05 -0700, Jeff Wiens wrote: > Eventually, I would like > to Initialise PETSc and construct my PETSc vectors in python and then > have my C code perform operations on them. Again, this yet another > test problem. > Maybe I don't completely understand your planned working m

[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython

2011-10-20 Thread Jeff Wiens
The point of the example was to perform the PetSc operation in C. Although you could do the dot product in Cython or Python, it defeats my purpose. I am attempting to write a wrapper for an existing PetSc C code base. I would like to setup PetSc and construct the initial conditions from python. I w

[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython

2011-10-20 Thread Jeff Wiens
I am in the process of learning PetSc 3.1 and petsc4py 1.2. Since there is so little documentation for petsc4py, I am resorting to the PetSc mailing list. If anyone knows any resources for petsc4py, it would be really helpful. I am attempting to make a simple test problem where I 1) Initialise Pe

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Richard Tran Mills
remeSingularValues(), for example. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/9bda4137/attachment.htm>

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Jed Brown
cErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr); } -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/4ec6fb76/attachment.htm>

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Jed Brown
ace could be losing orthogonality. You can try -ksp_gmres_modifiedgramschmidt. Are you losing a lot of progress in restarts? -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/03b48916/attachment.htm>

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Jed Brown
trix associated with last restart. If you want meaningful estimates with GMRES, you really can't use restarts. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/6aa37f28/attachment-0001.htm>

[petsc-users] KSPMonitorSingularValue

2011-10-20 Thread Jed Brown
to extract estimates of the singular values after KSPSolve has converged? You might be interested in KSPComputeExtremeSingularValues(), for example. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/4e84eea3/attachment.htm>

[petsc-users] Using ghosted vector as 'x' in KSPSolve

2011-10-20 Thread Алексей Рязанов
nters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > -- Best regards, Alexey Ryazanov __ Nuclear Safety Institute of Russian Academy of Sciences -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/d0699690/attachment.htm>

[petsc-users] VecSetType and ghosted vectors

2011-10-20 Thread Dominik Szczerba
it so here it is. > > > Barry > > > -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/0d006895/attachment.htm>