Coder Social home page Coder Social logo

Comments (8)

dham avatar dham commented on July 25, 2024

What does n.dat.data_ro look like in each case?

from firedrake.

lrtfm avatar lrtfm commented on July 25, 2024

The output of print(n.dat.data_ro) are same

(array([0., 0., 0., 0., 0., 0., 0., 0., 0.]), array([[ 0.30901699, -0.80901699,  0.5       ],
       [-0.30901699, -0.80901699,  0.5       ],
       [ 0.        , -0.52573111,  0.85065081],
       [ 0.5       , -0.30901699,  0.80901699],
       [-0.5       , -0.30901699,  0.80901699],
       [-0.80901699, -0.5       ,  0.30901699],
       [-0.85065081,  0.        ,  0.52573111],
       [ 0.5       ,  0.30901699,  0.80901699],
       [ 0.        ,  0.        ,  1.        ],
       [ 0.        ,  0.52573111,  0.85065081],
       [-0.5       ,  0.30901699,  0.80901699],
       [-1.        ,  0.        ,  0.        ],
       [ 0.30901699,  0.80901699,  0.5       ],
       [-0.80901699,  0.5       ,  0.30901699],
       [-0.30901699,  0.80901699,  0.5       ],
       [ 0.        , -1.        ,  0.        ],
       [ 0.52573111, -0.85065081,  0.        ],
       [-0.52573111, -0.85065081,  0.        ],
       [ 0.80901699, -0.5       ,  0.30901699],
       [ 0.85065081,  0.        ,  0.52573111],
       [-0.80901699, -0.5       , -0.30901699],
       [-0.85065081,  0.        , -0.52573111],
       [ 0.80901699,  0.5       ,  0.30901699],
       [ 0.52573111,  0.85065081,  0.        ],
       [-0.52573111,  0.85065081,  0.        ],
       [-0.80901699,  0.5       , -0.30901699],
       [ 0.        ,  1.        ,  0.        ]]))
(array([0., 0., 0.]), array([[ 0.30901699,  0.80901699, -0.5       ],
       [-0.30901699,  0.80901699, -0.5       ],
       [ 0.        ,  0.52573111, -0.85065081],
       [-0.5       ,  0.30901699, -0.80901699],
       [ 0.80901699,  0.5       , -0.30901699],
       [ 0.5       ,  0.30901699, -0.80901699],
       [ 0.85065081,  0.        , -0.52573111],
       [ 0.5       , -0.30901699, -0.80901699],
       [ 0.        ,  0.        , -1.        ],
       [ 0.        , -0.52573111, -0.85065081],
       [-0.5       , -0.30901699, -0.80901699],
       [ 1.        ,  0.        ,  0.        ],
       [ 0.30901699, -0.80901699, -0.5       ],
       [ 0.80901699, -0.5       , -0.30901699],
       [-0.30901699, -0.80901699, -0.5       ]]))

from firedrake.

connorjward avatar connorjward commented on July 25, 2024

What about n.subfunctions[1].dat.halo_valid in both cases? This could be an issue with some of the tricks I used in assign to avoid halo exchanges. I may not have given full enough consideration to halo validity for mixed dats.

from firedrake.

ksagiyam avatar ksagiyam commented on July 25, 2024

I think this feature in undertested as Firedrake assembles block-by-block. For instance, do we not need MixedDatKernelArg here https://github.com/OP2/PyOP2/blob/da14715cca2d2174d6f5554444e84f1a5d92cdf9/pyop2/parloop.py#L317 to have halo exchanges happen?

from firedrake.

lrtfm avatar lrtfm commented on July 25, 2024

What about n.subfunctions[1].dat.halo_valid in both cases? This could be an issue with some of the tricks I used in assign to avoid halo exchanges. I may not have given full enough consideration to halo validity for mixed dats.

The values are all False in both cases.

from firedrake.

connorjward avatar connorjward commented on July 25, 2024

I think this feature in undertested as Firedrake assembles block-by-block. For instance, do we not need MixedDatKernelArg here https://github.com/OP2/PyOP2/blob/da14715cca2d2174d6f5554444e84f1a5d92cdf9/pyop2/parloop.py#L317 to have halo exchanges happen?

Great spot! This does look like it could be responsible.

from firedrake.

connorjward avatar connorjward commented on July 25, 2024

I think this feature in undertested as Firedrake assembles block-by-block. For instance, do we not need MixedDatKernelArg here https://github.com/OP2/PyOP2/blob/da14715cca2d2174d6f5554444e84f1a5d92cdf9/pyop2/parloop.py#L317 to have halo exchanges happen?

Great spot! This does look like it could be responsible.

Turns out that this is a little trickier to change than I thought it would be. Would it be OK to mark this issue as "wontfix"? The issue appears to stem from the fact that MixedDat and Dat have slightly different implementations and in pyop3 I make no distinction between the two, resulting in a single code path, so the issue should go away.

On second thought, I don't think that would be the right thing to do. We should at least find out why this is happening (and perhaps submit an xfailing test).

from firedrake.

connorjward avatar connorjward commented on July 25, 2024

This is fixed by OP2/PyOP2#710

from firedrake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.