You can use the firedrake.op2.MPI.rank_zero decorator to make a function
which will only execute on rank 0.
On 8 November 2014 18:53, Cotter, Colin J <colin.cotter(a)imperial.ac.uk>
wrote:
> Dear Firedrakers,
> What's the best way to modify a print statement so that only one MPI
> process does the print?
>
> cheers
> --cjc
>
--
Dr David Ham
Departments of Mathematics and Computing
Imperial College London
http://www.imperial.ac.uk/people/david.ham
Dear firedrakers,
when I store the local DG mass matrix in a PyOP2 dat of 3x3 matrices by hand, why do I need to specify the op2.i[0] iteration space as in here
V = FunctionSpace(mesh,'DG',1)
V_DG0 = FunctionSpace(mesh,'DG',0)
u = TestFunction(V)
v = TrialFunction(V)
mass = u*v*dx
mass_kernel = compile_form(mass, 'mass')[0][6]
mass_matrix = Function(V_DG0, val=op2.Dat(V_DG0.node_set**(3*3)))
op2.par_loop(mass_kernel,
mass_matrix.cell_set,
mass_matrix.dat(op2.INC, mass_matrix.cell_node_map()[op2.i[0]]),
mesh.coordinates.dat(op2.READ,mesh.coordinates.cell_node_map(),flatten=True),
mesh.coordinates.dat(op2.READ,mesh.coordinates.cell_node_map(),flatten=True))
When I print out mass_kernel.code I get
static inline void mass_cell_integral_0_otherwise (double A[3][3] , double **vertex_coordinates , double **w0 ) {
[…]
}
i.e. on each cell the kernel gets passed a 3x3 matrix (= array with 9 elements). If I leave out the "[op2.i[0]]” I only get zeros in mass_matrix.
Also, why do the coordinates have to be passed with flatten=True keyword?
Thanks a lot,
Eike
--
Dr Eike Hermann Mueller
Research Associate (PostDoc)
Department of Mathematical Sciences
University of Bath
Bath BA2 7AY, United Kingdom
+44 1225 38 5803
e.mueller(a)bath.ac.uk
http://people.bath.ac.uk/em459/
On 31 October 2014 10:18, Cotter, Colin J <colin.cotter(a)imperial.ac.uk>
wrote:
> I still think that the install instructions for different systems should
> be on entirely different pages.
>
This simply means having multiple sets of almost identical instructions to
maintain. Are you volunteering to do the maintenance?
>
> --cjc
>
> On 30/10/14 09:56, Lawrence Mitchell wrote:
> > Hi Brian,
> >
> > On 30/10/14 09:28, Brian Weston wrote:
> >> Hello,
> >>
> >> I am trying to install PyOp2 on my Macbook (10.9) and I'm having an
> >> issue. In my terminal, I typed:
> >>
> >> wget -O - https://github.com/OP2/PyOP2/raw/master/install.sh | sudo
> bash
> >>
> >> and at the end of my install log file:
> >
> > Hmmm, I'm not sure that we believe the install script will work on
> > MacOS, it's pretty much specific to apt-based Linux systems, so I'm
> > somewhat surprised it got this far. On MacOS, we recommend obtaining a
> > build environment for PyOP2 using homebrew. Can you try following the
> > instructions for install given here:
> >
> >
> http://firedrakeproject.org/obtaining_pyop2.html#obtaining-a-build-environm…
> >
> > Suggestions as to how to make the different install descriptions clearer
> > very welcome.
> >
> > Unfortunately, this isn't an automated script, however, it's quite a
> > short list.
> >
> > Once you have the build environment you can then install PETSc and
> > petsc4py using pip. With the homebrew setup we describe, you don't need
> > to use sudo with pip. With that out of the way you can then follow the
> > instructions at
> >
> > http://firedrakeproject.org/obtaining_pyop2.html#building-pyop2
> >
> > To build PyOP2 itself.
> >
> > Cheers,
> >
> > Lawrence
> >
> > _______________________________________________
> > firedrake mailing list
> > firedrake(a)imperial.ac.uk
> > https://mailman.ic.ac.uk/mailman/listinfo/firedrake
> >
>
>
> _______________________________________________
> firedrake mailing list
> firedrake(a)imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
--
Dr David Ham
Departments of Mathematics and Computing
Imperial College London
http://www.imperial.ac.uk/people/david.ham
Hello,
I am trying to install PyOp2 on my Macbook (10.9) and I'm having an issue.
In my terminal, I typed:
wget -O - https://github.com/OP2/PyOP2/raw/master/install.sh | sudo bash
and at the end of my install log file:
"Successfully installed petsc4py
Cleaning up...
*** Installing PyOP2 ***
Cloning into 'PyOP2'...
Checking connectivity... done
Traceback (most recent call last):
File "setup.py", line 45, in <module>
import petsc4py
ImportError: No module named petsc4py"
Sincerely,
Brian
Dear all,
We are getting a memory leak in our slice model solver and we can't
work out where we are making it. The time loop pretty much just consists
of some solver calls and Function += calls.
To see our test, please check out
https://bitbucket.org/colinjcotter/slicemodels
and run test_linear.py.
We are observing a slow and steady increase in memory usage.
cheers
Colin and Hiroe
Yes, I forgot to push the website. It's up now.
On 19 October 2014 10:54, McRae, Andrew <a.mcrae12(a)imperial.ac.uk> wrote:
> I assume unintended, since it was updated in both the unattended install
> script and the buildbot script.
>
> I've done the commit --
> https://github.com/OP2/PyOP2/commit/e06ecaf41c8eea7803850e1085c0bd80e6005a4c
> -- but I think someone else needs to rebuild the website manually.
>
> On 19 October 2014 10:44, Eike Mueller <e.mueller(a)bath.ac.uk> wrote:
>
>> Hi Lawrence,
>>
>> this fixes it and it runs fine again on my laptop.
>>
>> As far as I can see the petsc4py installation instructions on
>>
>> http://www.firedrakeproject.org/obtaining_pyop2.html#petsc
>>
>> still point to https://bitbucket.org/petsc/petsc4py.git, is this
>> intended, or does the firedrake trunk indeed work with this setup?
>>
>> Thanks a lot,
>>
>> Eike
>>
>> --
>>
>> Dr Eike Hermann Mueller
>> Research Associate (PostDoc)
>>
>> Department of Mathematical Sciences
>> University of Bath
>> Bath BA2 7AY, United Kingdom
>>
>> +44 1225 38 5803
>> e.mueller(a)bath.ac.uk
>> http://people.bath.ac.uk/em459/
>>
>> On 17 Oct 2014, at 15:26, David Ham <David.Ham(a)imperial.ac.uk> wrote:
>>
>> Dear Firedrakers,
>>
>> Some of you have recently had problems with installing PETSc recently.
>> There is now a fix for this, and also new install URLs for PETSc and
>> petsc4py which will hopefully reduce the number of ongoing PETSc install
>> issues that people have.
>>
>> The short version is that the instructions for installing PETSc and
>> petsc4py on our websites have been updated, so if you are installing or
>> upgrading PETSc you should follow the new instructions:
>> http://www.firedrakeproject.org/obtaining_pyop2.html#petsc
>>
>> The ever so slightly longer version is that we now point to our own
>> fork of PETSc rather than the upstream master. We will update our forks as
>> necessary and only after checking that the version we update to appears to
>> work. This should hopefully reduce the number of random breakages users
>> encounter in PETSc.
>>
>> Cheers,
>>
>> David
>>
>> --
>> Dr David Ham
>> Departments of Mathematics and Computing
>> Imperial College London
>>
>> http://www.imperial.ac.uk/people/david.ham
>> _______________________________________________
>> firedrake mailing list
>> firedrake(a)imperial.ac.uk
>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>
>>
>>
>
--
Dr David Ham
Departments of Mathematics and Computing
Imperial College London
http://www.imperial.ac.uk/people/david.ham
I assume unintended, since it was updated in both the unattended install
script and the buildbot script.
I've done the commit --
https://github.com/OP2/PyOP2/commit/e06ecaf41c8eea7803850e1085c0bd80e6005a4c
-- but I think someone else needs to rebuild the website manually.
On 19 October 2014 10:44, Eike Mueller <e.mueller(a)bath.ac.uk> wrote:
> Hi Lawrence,
>
> this fixes it and it runs fine again on my laptop.
>
> As far as I can see the petsc4py installation instructions on
>
> http://www.firedrakeproject.org/obtaining_pyop2.html#petsc
>
> still point to https://bitbucket.org/petsc/petsc4py.git, is this
> intended, or does the firedrake trunk indeed work with this setup?
>
> Thanks a lot,
>
> Eike
>
> --
>
> Dr Eike Hermann Mueller
> Research Associate (PostDoc)
>
> Department of Mathematical Sciences
> University of Bath
> Bath BA2 7AY, United Kingdom
>
> +44 1225 38 5803
> e.mueller(a)bath.ac.uk
> http://people.bath.ac.uk/em459/
>
> On 17 Oct 2014, at 15:26, David Ham <David.Ham(a)imperial.ac.uk> wrote:
>
> Dear Firedrakers,
>
> Some of you have recently had problems with installing PETSc recently.
> There is now a fix for this, and also new install URLs for PETSc and
> petsc4py which will hopefully reduce the number of ongoing PETSc install
> issues that people have.
>
> The short version is that the instructions for installing PETSc and
> petsc4py on our websites have been updated, so if you are installing or
> upgrading PETSc you should follow the new instructions:
> http://www.firedrakeproject.org/obtaining_pyop2.html#petsc
>
> The ever so slightly longer version is that we now point to our own fork
> of PETSc rather than the upstream master. We will update our forks as
> necessary and only after checking that the version we update to appears to
> work. This should hopefully reduce the number of random breakages users
> encounter in PETSc.
>
> Cheers,
>
> David
>
> --
> Dr David Ham
> Departments of Mathematics and Computing
> Imperial College London
>
> http://www.imperial.ac.uk/people/david.ham
> _______________________________________________
> firedrake mailing list
> firedrake(a)imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
>
>