Comment 5 for bug 892714

Revision history for this message
Garth Wells (garth-wells) wrote : Re: [Bug 892714] Re: JIT can fail silently - seems to happen when there is a problem in dolfin.pc

On 20 November 2011 20:37, Garth N. Wells <email address hidden> wrote:
> On 20 November 2011 20:00, Anders Logg <email address hidden> wrote:
>> On Sun, Nov 20, 2011 at 07:06:31PM -0000, Garth Wells wrote:
>>> On 20 November 2011 18:03, Anders Logg <email address hidden> wrote:
>>> > Can you provide an example?
>>>
>>> No, which is the problem. I get it on a particular machine, and it
>>> seems to be related to when I link libraries, like PETSc and Trilinos,
>>> to shared libs which are not in default locations. C++ is fine.
>>>
>>> Do we have a test for JIT that does not involve FFC? I suspect that
>>> our rubbish dolfin.pc is part of the problem.
>>
>> You can either JIT-compile an Expression which does not involve FFC,
>> or you can set the form compiler to SFC and see if that changes
>> anything.
>>
>
> Expressions seem to be fine. It's going to require some deep digging.
>

After a of digging, it's numpy that fails silently. It was failing
when FIAT tried to solve a linear system. I can reproduce the failure
with

    from dolfin import *
    import numpy
    A = numpy.array([[3,1], [1,2]])
    b = numpy.array([9,8])
    x = numpy.linalg.solve(A, b)
    print x

but it works if I switch the import order,

    import numpy
    from dolfin import *
    A = numpy.array([[3,1], [1,2]])
    b = numpy.array([9,8])
    x = numpy.linalg.solve(A, b)
    print x

I suspect that it's related to numpy and DOLFIN linking to different
BLAS libraries.

Garth

> Garth
>
>> --
>> Anders
>>
>> --
>> You received this bug notification because you are a member of DOLFIN
>> Core Team, which is subscribed to DOLFIN.
>> https://bugs.launchpad.net/bugs/892714
>>
>> Title:
>>  JIT can fail silently - seems to happen when there is a problem in
>>  dolfin.pc
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/dolfin/+bug/892714/+subscriptions
>>