{"action":"opened","issue":{"url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/637","labels_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/637/labels{/name}","comments_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/637/comments","events_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/637/events","html_url":"https://github.com/firedrakeproject/firedrake/issues/637","id":117772012,"number":637,"title":"Simple Poisson equation","user":{"login":"kharasov","id":15629250,"avatar_url":"https://avatars.githubusercontent.com/u/15629250?v=3","gravatar_id":"","url":"https://api.github.com/users/kharasov","html_url":"https://github.com/kharasov","followers_url":"https://api.github.com/users/kharasov/followers","following_url":"https://api.github.com/users/kharasov/following{/other_user}","gists_url":"https://api.github.com/users/kharasov/gists{/gist_id}","starred_url":"https://api.github.com/users/kharasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kharasov/subscriptions","organizations_url":"https://api.github.com/users/kharasov/orgs","repos_url":"https://api.github.com/users/kharasov/repos","events_url":"https://api.github.com/users/kharasov/events{/privacy}","received_events_url":"https://api.github.com/users/kharasov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-19T09:19:22Z","updated_at":"2015-11-19T09:19:22Z","closed_at":null,"body":"Hi, dear all!\r\nI'm trying to start using firedrake and to do that -- to solve simle poisson equation with zero boundary conditions on unitary interval. The right hand side is f = x* cosx\r\n\r\nAccording to example in the paper http://arxiv.org/pdf/1501.01809.pdf, I've written a simple code, but it doesn't work for me. \r\n```python\r\nfrom firedrake import *\r\nncells = 100\r\nmesh = UnitIntervalMesh(ncells)\r\nV = FunctionSpace ( mesh ,\"DG\", 1)\r\nbc = DirichletBC (V , 0.0 , [1 , 2]) # Boundary condition \r\nu = TrialFunction ( V )\r\nv = TestFunction ( V )\r\nf = Function ( V ) . interpolate ( Expression (\r\n\"x*cos(x)\" ) )\r\n\r\na = inner ( grad ( u ) , grad ( v ) ) * dx\r\nL = f * v * dx\r\nu = Function ( V )\r\nA = assemble (a , bcs = bc )\r\nb = assemble ( L )\r\nbc.apply(b)\r\nsolve (A, u, b, solver_parameters ={\"ksp_type\": \"preonly\", \"pc_type\": \"lu\"})\r\n```\r\nBut the last string gave me that message:\r\n```python\r\npyop2:INFO   Compiling wrapper...\r\nINFO:pyop2:  Compiling wrapper...\r\n\r\n---------------------------------------------------------------------------\r\nCompilationError                          Traceback (most recent call last)\r\n<ipython-input-52-65be4258f7de> in <module>()\r\n----> 1 solve (A, u, b, solver_parameters ={\"ksp_type\": \"preonly\", \"pc_type\": \"lu\"})\r\n\r\n/home/danil/.local/lib/python2.7/site-packages/firedrake/solving.pyc in solve(*args, **kwargs)\r\n    121     else:\r\n    122         # Solve pre-assembled system\r\n--> 123         return _la_solve(*args, **kwargs)\r\n    124 \r\n    125 \r\n\r\n/home/danil/.local/lib/python2.7/site-packages/firedrake/solving.pyc in _la_solve(A, x, b, **kwargs)\r\n    209                              options_prefix=options_prefix)\r\n    210 \r\n--> 211     solver.solve(x, b)\r\n    212 \r\n    213 \r\n\r\n/home/danil/.local/lib/python2.7/site-packages/firedrake/linear_solver.pyc in solve(self, x, b)\r\n    134             # don't want to write into b itself, because that would confuse user\r\n    135             b = b_bc\r\n--> 136         with b.dat.vec_ro as rhs:\r\n    137             with x.dat.vec as solution:\r\n    138                 self.ksp.solve(rhs, solution)\r\n\r\n/home/danil/anaconda/lib/python2.7/contextlib.pyc in __enter__(self)\r\n     15     def __enter__(self):\r\n     16         try:\r\n---> 17             return self.gen.next()\r\n     18         except StopIteration:\r\n     19             raise RuntimeError(\"generator didn't yield\")\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/petsc_base.pyc in vec_context(self, readonly)\r\n    228         acc = (lambda d: d.data_ro) if readonly else (lambda d: d.data)\r\n    229         # Getting the Vec needs to ensure we've done all current computation.\r\n--> 230         self._force_evaluation()\r\n    231         if not hasattr(self, '_vec'):\r\n    232             size = (self.dataset.size * self.cdim, None)\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/base.pyc in _force_evaluation(self, read, write)\r\n   1564         reads = self if read else None\r\n   1565         writes = self if write else None\r\n-> 1566         _trace.evaluate(reads, writes)\r\n   1567 \r\n   1568 \r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/base.pyc in evaluate(self, reads, writes)\r\n    168             to_run = fuse('from_trace', to_run, 0)\r\n    169         for comp in to_run:\r\n--> 170             comp._run()\r\n    171 \r\n    172 \r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/base.pyc in _run(self)\r\n   4040 \r\n   4041     def _run(self):\r\n-> 4042         return self.compute()\r\n   4043 \r\n   4044     def prepare_arglist(self, iterset, *args):\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/base.pyc in compute(self)\r\n   4081         iterset = self.iterset\r\n   4082         arglist = self.prepare_arglist(iterset, *self.args)\r\n-> 4083         fun = self._jitmodule\r\n   4084         self._compute(iterset.core_part, fun, *arglist)\r\n   4085         self.halo_exchange_end()\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/utils.pyc in __get__(self, obj, cls)\r\n     62         if obj is None:\r\n     63             return self\r\n---> 64         obj.__dict__[self.__name__] = result = self.fget(obj)\r\n     65         return result\r\n     66 \r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/sequential.pyc in _jitmodule(self)\r\n    149     def _jitmodule(self):\r\n    150         return JITModule(self.kernel, self.it_space, *self.args,\r\n--> 151                          direct=self.is_direct, iterate=self.iteration_region)\r\n    152 \r\n    153     @collective\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/caching.pyc in __new__(cls, *args, **kwargs)\r\n    201             return cls._cache_lookup(key)\r\n    202         except (KeyError, IOError):\r\n--> 203             obj = make_obj()\r\n    204             cls._cache_store(key, obj)\r\n    205             return obj\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/caching.pyc in make_obj()\r\n    191             # subclass.  But that one should hit the cache and return\r\n    192             # straight away.\r\n--> 193             obj.__init__(*args, **kwargs)\r\n    194             return obj\r\n    195 \r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/host.pyc in __init__(self, kernel, itspace, *args, **kwargs)\r\n    698         self._system_headers = dcopy(type(self)._system_headers)\r\n    699         self.set_argtypes(itspace.iterset, *args)\r\n--> 700         self.compile()\r\n    701 \r\n    702     @collective\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/host.pyc in compile(self)\r\n    799                                      argtypes=self._argtypes,\r\n    800                                      restype=None,\r\n--> 801                                      compiler=compiler.get('name'))\r\n    802         # Blow away everything we don't need any more\r\n    803         del self._args\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/compilation.pyc in load(src, extension, fn_name, cppargs, ldargs, argtypes, restype, compiler)\r\n    290         raise CompilationError(\"Don't know what compiler to use for platform '%s'\" %\r\n    291                                platform)\r\n--> 292     dll = compiler.get_so(src, extension)\r\n    293 \r\n    294     fn = getattr(dll, fn_name)\r\n\r\n/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2/compilation.pyc in get_so(self, src, extension)\r\n    144 Unable to compile code\r\n    145 Compile log in %s\r\n--> 146 Compile errors in %s\"\"\" % (e.cmd, e.returncode, logfile, errfile))\r\n    147                     else:\r\n    148                         cc = [self._cc] + self._cppargs + \\\r\n\r\nCompilationError: Command \"['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', '-fno-ivopts', '-I/home/danil/anaconda/lib/python2.7/site-packages/petsc/include', '-I/home/danil/anaconda/lib/python2.7/site-packages/PyOP2-0.11.0_422_gd3fc1f6-py2.7-linux-x86_64.egg/pyop2', '-msse', '-o', '/tmp/pyop2-cache-uid1000/b722ec253060c548c64eaa9e8e592e02_p3649.so.tmp', '/tmp/pyop2-cache-uid1000/b722ec253060c548c64eaa9e8e592e02_p3649.c', '-shared', '-L/home/danil/anaconda/lib/python2.7/site-packages/petsc/lib', '-Wl,-rpath,/home/danil/anaconda/lib/python2.7/site-packages/petsc/lib', '-lpetsc', '-lm']\" return error status 1.\r\nUnable to compile code\r\nCompile log in /tmp/pyop2-cache-uid1000/b722ec253060c548c64eaa9e8e592e02_p3649.log\r\nCompile errors in /tmp/pyop2-cache-uid1000/b722ec253060c548c64eaa9e8e592e02_p3649.err\r\n```\r\n\r\nWhat am I doing wrong? \r\n\r\n\r\n"}}