[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Lisandro Dalcin
After working hard on mpi4py, this week I'll spend my time cleaning-up and adding features to the new Cython-based petsc4py. Then, I'll be asking questions to this list requesting for advise. In all calls that create new PETSc objects, I've decided to make the 'comm' argument optional. If the

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Barry Smith
What about a PETSC_COMM_DEFAULT that lives in the same place as PETSC_COMM_WORLD and PETSC_COMM_SELF.? You could have it default to PETSC_COMM_whatever and the user could change it immediately after PetscInitialize() to whatever they chose. For simplicity I wouldn't have a setter like

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Matthew Knepley
I would still maintain that PETSC_COMM_WORLD is the correct default. There are better paradigms for embarassingly parallel operation, like Condor. PETSc is intended for parallel, domain decomposition runs. Matt On Mon, Aug 25, 2008 at 10:54 AM, Lisandro Dalcin dalcinl at gmail.com wrote:

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Lisandro Dalcin
On Mon, Aug 25, 2008 at 1:08 PM, Matthew Knepley knepley at gmail.com wrote: I would still maintain that PETSC_COMM_WORLD is the correct default. There are better paradigms for embarassingly parallel operation, like Condor. PETSc is intended for parallel, domain decomposition runs. Yes, you

Mat and row/column ownership ranges

2008-08-25 Thread Lisandro Dalcin
Now that we can get Mat ownership range/reanges from rows and cols, would it make sense to condensate the calls into a single MatGetOwnershipRange[s] able to return all the ranges? Something like: MatGetOwnershipRange(Mat A, PetscInt* rlow, PetscInt *rhigh, PetscInt *clow, PetscInt *chigh);

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Matthew Knepley
On Mon, Aug 25, 2008 at 1:22 PM, Lisandro Dalcin dalcinl at gmail.com wrote: On Mon, Aug 25, 2008 at 1:08 PM, Matthew Knepley knepley at gmail.com wrote: I would still maintain that PETSC_COMM_WORLD is the correct default. There are better paradigms for embarassingly parallel operation, like

possible bug in MatGetOwnershipRanges() and MatGetOwnershipRangesColumns()

2008-08-25 Thread Lisandro Dalcin
Barry/Matt/Shatish. Could any of you review the implementation of MatGetOwnershipRanges() and MatGetOwnershipRangesColumns(). I believe a MatPreallocated() call is missing in both functions? The companion ones, MatGetOwnershipRange() and MatGetOwnershipRangeColumns() DO HAVE the call to

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Lisandro Dalcin
On Mon, Aug 25, 2008 at 6:22 PM, Matthew Knepley knepley at gmail.com wrote: I agree that people will do this, I just don't agree that it should be the default. Would you agree with the following: At petsc4py initialization (and after calling PetscInitialize()), I define PETSC_COMM_DEFAULT =

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Barry Smith
This is fine for me, except I vote against the setter/getter. Just let the power user access the variable PETSC_COMM_DEFAULT directly. Barry On Aug 25, 2008, at 4:43 PM, Lisandro Dalcin wrote: On Mon, Aug 25, 2008 at 6:22 PM, Matthew Knepley knepley at gmail.com wrote: I agree

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Matthew Knepley
I am cool with this. Matt On Mon, Aug 25, 2008 at 4:48 PM, Barry Smith bsmith at mcs.anl.gov wrote: This is fine for me, except I vote against the setter/getter. Just let the power user access the variable PETSC_COMM_DEFAULT directly. Barry On Aug 25, 2008, at 4:43 PM, Lisandro

possible bug in MatGetOwnershipRanges() and MatGetOwnershipRangesColumns()

2008-08-25 Thread Barry Smith
I'm changing those two routines to also preallocate. Barry On Aug 25, 2008, at 4:27 PM, Lisandro Dalcin wrote: Barry/Matt/Shatish. Could any of you review the implementation of MatGetOwnershipRanges() and MatGetOwnershipRangesColumns(). I believe a MatPreallocated() call is missing

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Lisandro Dalcin
On Mon, Aug 25, 2008 at 6:48 PM, Barry Smith bsmith at mcs.anl.gov wrote: This is fine for me, except I vote against the setter/getter. Just let the power user access the variable PETSC_COMM_DEFAULT directly. Barry, sorry, I do not completely understand your comments. All my concern about

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Barry Smith
On Aug 25, 2008, at 5:40 PM, Lisandro Dalcin wrote: On Mon, Aug 25, 2008 at 6:48 PM, Barry Smith bsmith at mcs.anl.gov wrote: This is fine for me, except I vote against the setter/getter. Just let the power user access the variable PETSC_COMM_DEFAULT directly. Barry, sorry, I do

[petsc4py] What should be the 'default' communicator?

2008-08-25 Thread Matthew Knepley
On Mon, Aug 25, 2008 at 8:13 PM, Barry Smith bsmith at mcs.anl.gov wrote: On Aug 25, 2008, at 5:40 PM, Lisandro Dalcin wrote: On Mon, Aug 25, 2008 at 6:48 PM, Barry Smith bsmith at mcs.anl.gov wrote: This is fine for me, except I vote against the setter/getter. Just let the power user