PETScMatrix doesn't work properly from Python

Bug #706330 reported by Garth Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
Critical
Johan Hake

Bug Description

Some Python demos (e.g. la/eigenvalue/python) are failing because of a problem with the use of PETScMatrix (Matrix seems to be fine).

The error during assembly is weird:

python: /home/garth/code/fenics/dolfin.d/dolfin-all/dolfin/la/PETScMatrix.cpp:271: virtual void dolfin::PETScMatrix::setrow(dolfin::uint, ....

PETScMatrix::setrow shouldn't be called. Is there a problem with the SWIG typemaps (that is't trying to copy data)?

Changed in dolfin:
importance: Undecided → Critical
status: New → Confirmed
assignee: nobody → Johan Hake (johan-hake)
Revision history for this message
Garth Wells (garth-wells) wrote :

Could it be an issue that PETScMatrix is a subclass of PETScBaseMatrix as well as GenericMatrix? (in terms of the SWIG wrappers)

Revision history for this message
Garth Wells (garth-wells) wrote :
Changed in dolfin:
status: Confirmed → Fix Committed
Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 706330] [NEW] PETScMatrix doesn't work properly from Python

Great you manage to solve it.

It worked fine here so I did not know where to start.

Johan

On Saturday January 22 2011 08:15:52 Garth Wells wrote:
> Public bug reported:
>
> Some Python demos (e.g. la/eigenvalue/python) are failing because of a
> problem with the use of PETScMatrix (Matrix seems to be fine).
>
> The error during assembly is weird:
>
> python: /home/garth/code/fenics/dolfin.d/dolfin-
> all/dolfin/la/PETScMatrix.cpp:271: virtual void
> dolfin::PETScMatrix::setrow(dolfin::uint, ....
>
> PETScMatrix::setrow shouldn't be called. Is there a problem with the
> SWIG typemaps (that is't trying to copy data)?
>
> ** Affects: dolfin
> Importance: Critical
> Assignee: Johan Hake (johan-hake)
> Status: Confirmed
>
> ** Changed in: dolfin
> Importance: Undecided => Critical
>
> ** Changed in: dolfin
> Status: New => Confirmed
>
> ** Changed in: dolfin
> Assignee: (unassigned) => Johan Hake (johan-hake)

Revision history for this message
Garth Wells (garth-wells) wrote :

On 22/01/11 20:16, Johan Hake wrote:
> Great you manage to solve it.
>
> It worked fine here so I did not know where to start.
>

Do you have Swig version 2?

Garth

> Johan
>
> On Saturday January 22 2011 08:15:52 Garth Wells wrote:
>> Public bug reported:
>>
>> Some Python demos (e.g. la/eigenvalue/python) are failing because of a
>> problem with the use of PETScMatrix (Matrix seems to be fine).
>>
>> The error during assembly is weird:
>>
>> python: /home/garth/code/fenics/dolfin.d/dolfin-
>> all/dolfin/la/PETScMatrix.cpp:271: virtual void
>> dolfin::PETScMatrix::setrow(dolfin::uint, ....
>>
>> PETScMatrix::setrow shouldn't be called. Is there a problem with the
>> SWIG typemaps (that is't trying to copy data)?
>>
>> ** Affects: dolfin
>> Importance: Critical
>> Assignee: Johan Hake (johan-hake)
>> Status: Confirmed
>>
>> ** Changed in: dolfin
>> Importance: Undecided => Critical
>>
>> ** Changed in: dolfin
>> Status: New => Confirmed
>>
>> ** Changed in: dolfin
>> Assignee: (unassigned) => Johan Hake (johan-hake)
>

Anders Logg (logg)
Changed in dolfin:
milestone: none → 0.9.10
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.