[Facets-devel] PETSC ERROR

Lisandro Dalcin dalcinl at gmail.com
Thu Jun 4 17:33:49 CDT 2009

On Thu, Jun 4, 2009 at 6:17 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> This doesn't work - as some of the options are required during
> PetscIntialize().

This behaviour had always bothered my, but never invested time to try
to fix that. Currently, I'm doing a lot of hackery in  petsc4py for
being able to use command line.

In the bootstrapping script for a simulation, I have to do first:

>>> import sys, petsc4py
>>> petsc4py.init(sys.argv)

and then next I'm able to do

>>> from petsc4py import PETSc

and being able to make PETSc use my args.

In short, It would be realy nice to split PetscInitialize() in two:
the fist part initializes everything without looking at command line
stuff, and then a second part command line options initialization and
some more initialization stuff. Something like

PetscInitalize(argc,argv, file) {
    PetscSetUp(argc,argv, file)

The argc,argv to PetscInitializeBasic() just in case PETSc still
supports (does it?) MPI-1 implementations requiring argc,argv.

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

More information about the petsc-dev mailing list