[firedrake] problems with notebook
Francis Poulin
fpoulin at uwaterloo.ca
Mon Feb 27 03:24:29 GMT 2017
Hello again,
I was looking over the firedrake notebooks (thanks for putting those together!) and decided to try running the one that involves adjoint.
https://nbviewer.jupyter.org/github/firedrakeproject/firedrake/blob/master/docs/notebooks/example-stokes-bc-control.ipynb
I did install scipy and adjoint, as requested, but get an error when I try plotting u_init
axes = plot(u_init);
The error is copied below. Is there something else that I need to install for this to work?
Cheers, Francis
---------------------------------------------------------------------------
CompilationError Traceback (most recent call last)
<ipython-input-11-ab90b4141777> in <module>()
1 u_init, p_init = w.split()
----> 2 axes = plot(u_init);
3 #axes.set_aspect("equal")
4 #axes.set_title("Velocity")
5 #axes = plot(p_init)
/home/fpoulin/software/firedrake/src/firedrake/firedrake/plot.pyc in plot(function_or_mesh, num_sample_points, axes, plot3d, **kwargs)
293 coords = function.ufl_domain().coordinates.dat.data_ro
294 X, Y = coords.T
--> 295 vals = np.asarray(function.at(coords))
296 C = np.linalg.norm(vals, axis=1)
297 U, V = vals.T
/home/fpoulin/software/firedrake/src/firedrake/firedrake/function.pyc in at(self, arg, *args, **kwargs)
532 else:
533 p_result = np.empty(value_shape, dtype=float)
--> 534 single_eval(points[i:i+1], p_result)
535 l_result.append((i, p_result))
536 except PointNotInDomainError:
/home/fpoulin/software/firedrake/src/firedrake/firedrake/function.pyc in single_eval(x, buf)
510 def single_eval(x, buf):
511 """Helper function to evaluate at a single point."""
--> 512 err = self._c_evaluate(self._ctypes,
513 x.ctypes.data_as(POINTER(c_double)),
514 buf.ctypes.data_as(POINTER(c_double)))
/home/fpoulin/software/firedrake/src/PyOP2/pyop2/utils.pyc in __get__(self, obj, cls)
62 if obj is None:
63 return self
---> 64 obj.__dict__[self.__name__] = result = self.fget(obj)
65 return result
66
/home/fpoulin/software/firedrake/src/firedrake/firedrake/function.pyc in _c_evaluate(self)
460 @utils.cached_property
461 def _c_evaluate(self):
--> 462 result = make_c_evaluate(self)
463 result.argtypes = [POINTER(_CFunction), POINTER(c_double), POINTER(c_double)]
464 result.restype = c_int
/home/fpoulin/software/firedrake/src/firedrake/firedrake/function.pyc in make_c_evaluate(function, c_name, ldargs)
610 ["-I%s/include" % d for d in get_petsc_dir()],
611 ldargs=ldargs,
--> 612 comm=function.comm)
/home/fpoulin/software/firedrake/src/PyOP2/pyop2/compilation.pyc in load(src, extension, fn_name, cppargs, ldargs, argtypes, restype, compiler, comm)
328 raise CompilationError("Don't know what compiler to use for platform '%s'" %
329 platform)
--> 330 dll = compiler.get_so(src, extension)
331
332 fn = getattr(dll, fn_name)
/home/fpoulin/software/firedrake/src/PyOP2/pyop2/compilation.pyc in get_so(self, src, extension)
166 Unable to compile code
167 Compile log in %s
--> 168 Compile errors in %s""" % (e.cmd, e.returncode, logfile, errfile))
169 else:
170 cc = [self._cc] + self._cppargs + \
CompilationError: Command "['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', '-fno-ivopts', '-I/home/fpoulin/software/firedrake/src/firedrake/firedrake', '-I/usr/include', '-I/home/fpoulin/software/firedrake/lib/python2.7/site-packages/petsc/include', '-o', '/tmp/pyop2-cache-uid1000/7137338dc043a2dcfd35bcc4ecc64e90_p6844.so.tmp', '/tmp/pyop2-cache-uid1000/7137338dc043a2dcfd35bcc4ecc64e90_p6844.c', '-shared', '-L/usr/lib', '-lspatialindex_c', '-Wl,-rpath,/usr/lib']" return error status 1.
Unable to compile code
Compile log in /tmp/pyop2-cache-uid1000/7137338dc043a2dcfd35bcc4ecc64e90_p6844.log
Compile errors in /tmp/pyop2-cache-uid1000/7137338dc043a2dcfd35bcc4ecc64e90_p6844.err
------------------
Francis Poulin
Associate Professor
Department of Applied Mathematics
University of Waterloo
email: fpoulin at uwaterloo.ca
Web: https://uwaterloo.ca/poulin-research-group/
Telephone: +1 519 888 4567 x32637
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the firedrake
mailing list