Where? https://github.com/firedrakeproject/gusto/blob/master/gusto/advection.py On 17 November 2016 at 14:46, T. M. Bendall <t.bendall15@imperial.ac.uk> wrote:
It's imported all things from firedrake as *
So I guess so?
Tom On 17/11/16 14:40, Lawrence Mitchell wrote:
On 17/11/16 14:37, T. M. Bendall wrote:
../gusto/advection.py:244: in apply self.limit_slope(self.D1)
Has this advection.py file imported the par_loop name?
Lawrence
_______________________________________________ firedrake mailing listfiredrake@imperial.ac.ukhttps://mailman.ic.ac.uk/mailman/listinfo/firedrake
heh, yes, Andrew and I were talking about this yesterday. I'm not entirely sure why we don't use from firedrake import * in gusto - would anyone like to convince me that we should/shouldn't? ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Andrew McRae <A.T.T.McRae@bath.ac.uk> Sent: 17 November 2016 14:49:09 To: firedrake Subject: Re: [firedrake] par_loop error Where? https://github.com/firedrakeproject/gusto/blob/master/gusto/advection.py On 17 November 2016 at 14:46, T. M. Bendall <t.bendall15@imperial.ac.uk<mailto:t.bendall15@imperial.ac.uk>> wrote: It's imported all things from firedrake as * So I guess so? Tom On 17/11/16 14:40, Lawrence Mitchell wrote: On 17/11/16 14:37, T. M. Bendall wrote: ../gusto/advection.py:244: in apply self.limit_slope(self.D1) Has this advection.py file imported the par_loop name? Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 17/11/16 14:53, Shipton, Jemma wrote:
heh, yes, Andrew and I were talking about this yesterday. I'm not entirely sure why we don't use from firedrake import * in gusto - would anyone like to convince me that we should/shouldn't?
You don't get to control what variables we put in the namespace. Therefore it's safer for you to import what you need. Or else use: import firedrake and access everything as firedrake.Foo Lawrence
OK, thanks, that's what I thought, and I'd prefer not to have to keep typing firedrake so I'll leave it as is. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: 17 November 2016 15:03:13 To: firedrake Subject: Re: [firedrake] par_loop error On 17/11/16 14:53, Shipton, Jemma wrote:
heh, yes, Andrew and I were talking about this yesterday. I'm not entirely sure why we don't use from firedrake import * in gusto - would anyone like to convince me that we should/shouldn't?
You don't get to control what variables we put in the namespace. Therefore it's safer for you to import what you need. Or else use: import firedrake and access everything as firedrake.Foo Lawrence
I don't like that because then flake8 can no longer whether a name has been defined or not, so it cannot report mistyped names. If I don't want to type pkg.foo every time, then I rather do from pkg import (foo, bar, spam, ..., egg, ham) i.e. listing all the stuff I use from the package. On 17/11/16 14:53, Shipton, Jemma wrote:
heh, yes, Andrew and I were talking about this yesterday. I'm not entirely sure why we don't use from firedrake import * in gusto - would anyone like to convince me that we should/shouldn't?
------------------------------------------------------------------------ *From:* firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Andrew McRae <A.T.T.McRae@bath.ac.uk> *Sent:* 17 November 2016 14:49:09 *To:* firedrake *Subject:* Re: [firedrake] par_loop error Where?
https://github.com/firedrakeproject/gusto/blob/master/gusto/advection.py
On 17 November 2016 at 14:46, T. M. Bendall <t.bendall15@imperial.ac.uk <mailto:t.bendall15@imperial.ac.uk>> wrote:
It's imported all things from firedrake as *
So I guess so?
Tom
On 17/11/16 14:40, Lawrence Mitchell wrote:
On 17/11/16 14:37, T. M. Bendall wrote:
../gusto/advection.py:244: in apply self.limit_slope(self.D1)
Has this advection.py file imported the par_loop name?
Lawrence
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk <mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake <https://mailman.ic.ac.uk/mailman/listinfo/firedrake>
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (4)
- 
                
                Andrew McRae
- 
                
                Lawrence Mitchell
- 
                
                Miklós Homolya
- 
                
                Shipton, Jemma