-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 22/09/15 19:07, Justin Chang wrote:
> Hi everyone,
>
> Some general questions about Firedrake:
>
> 1) I ran the poisson_mixed.py example and noticed in the Memory
> Usage section of -log_summary that there are more creations than
> destructions. In my experience, not properly destroying PETSc
> objects can inhibit performance. Is this an issue for you guys? As
> in, are you guys properly taking care of the memory allocation and
> related issues?
I think we are, yes. At exit, we still have some objects live that
have not been collected by the python garbage collector and therefore
do not get destroyed before petsc's log summary prints. Effectively
what happens is that the DM object (and the sections/SFs inside it)
doesn't get destroyed before log_summary is printed. However, I think
it's not a performance inhibiting problem.
> 2) How do I read in an auxiliary data from a datafile? In FEniCS I
> could load data as a numpy array and use CellFunction() to "align"
> the data with the connectivity/ordering of the cells.
This is still a messy aspect that we can't do well yet. A (slow) way
to do this is to write a python expression and do the interpolation in
numpy or similar:
I assume you want to assign to a scalar function, if you want a
vector-valued function, things are similar but you need to supply some
more info (see the docstring of Expression for details:
http://firedrakeproject.org/firedrake.html#firedrake.expression.Expression)
import numpy as np
class MyInit(Expression):
def __init__(self):
self.data = ... # load data from file into numpy array
def eval(self, val, x):
# x[0..d-1] are the d coordinate values (x, y, z)
val[0] = ... # compute correct value from self.data based on x.
init = MyInit()
function = Function(V)
function.interpolate(init)
I think Miklos may have been thinking about (at least) better ways of
doing this, but I don't know the details.
> 3) Is there any update regarding adding parallel IO? Last I spoke
> with Matt he said that he and one or two of you Firedrake folks
> (Michael Lange I think?) were working on this.
I'm not sure, maybe Michael can chip in.
Cheers,
Lawrence
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJWAnLkAAoJECOc1kQ8PEYvOYYH/3aKfeMmKLe8UtPdbSi9dGTY
OJd4a8KdSf50lGEkhvXwslg2NBQc1gzdtX72Cq8AUM4csDhGb88Pi6voOeozqhmq
NXzW9fcZi03XR6yD9+nTzMw5ie41YletZEqFrKaJ2ul7pYehlJ+GJjyBTyReKtfW
/jQ/YJSFSzH4HRIPLyhpnoV5HCXMkWOWV3pQGWeYw4tD8gOHn5ZbcqFJHRES4/4K
mJAv/n0VFPm9oLAZ5q6Q6JEfMbZSCqNgatgfjfbKDyv6Zgf0Q3SUdUoqiUN0FST9
nSnxdPovbi5eAqDX5EIJsIEQD6H/whCY/iNG7dpQgm/kzPpmY2fcOWjU4XUJb2I=
=MsQk
-----END PGP SIGNATURE-----
_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake