← Back to team overview

ffc team mailing list archive

Re: error in compiling

 

On Mon, Jun 22, 2009 at 09:57:13AM -0400, Shawn Walker wrote:
> My paths are probably not set correctly.  But I am not sure how to fix it. 
> I just realized this is the first time I have tried to compile a form with 
> UFL.  Is there some special connection that I need to make between UFL and 
> FFC?

No, FFC handles that. Just write a .ufl file and call FFC by

  ffc -l dolfin formname.ufl

-- 
Anders


> - Shawn
> 
> On Sun, 21 Jun 2009, Kristian Oelgaard wrote:
> 
> > Quoting Shawn Walker <walker@xxxxxxxxxxxxxxx>:
> >
> >> This is what I tried to compile:
> >>
> >> # Compile this form with FFC: ffc -l dolfin Poisson.ufl
> >>
> >> element = FiniteElement("Lagrange", triangle, 2)
> >>
> >> v = TestFunction(element)
> >> u = TrialFunction(element)
> >> f = Function(element)
> >>
> >> a = inner(grad(v), grad(u))*dx
> >> L = v*f*dx
> >
> > It works fine here, I think you just need to use the latest versions of FFC, UFL
> > and DOLFIN and make sure you're paths are set correctly.
> >
> > Kristian
> >
> >> - Shawn
> >>
> >> On Sun, 21 Jun 2009, Kristian Oelgaard wrote:
> >>
> >>> Quoting Shawn Walker <walker@xxxxxxxxxxxxxxx>:
> >>>
> >>>> I get the following error when trying run ffc on a simple P2 lagrange
> >>>> laplace form:
> >>>
> >>> Are you using development versions of FFC/UFL and DOLFIN?
> >>>
> >>> Could you send the *.ufl file?
> >>>
> >>> Kristian
> >>>
> >>>> Compiler stage 5: Formatting code
> >>>> ---------------------------------
> >>>>    Formatting code for UFC 1.0.
> >>>>    Writing DOLFIN wrappers.
> >>>> Traceback (most recent call last):
> >>>>    File "/home/walker/build/bin/ffc", line 186, in <module>
> >>>>      sys.exit(main(sys.argv[1:]))
> >>>>    File "/home/walker/build/bin/ffc", line 130, in main
> >>>>      execfile(script, {})
> >>>>    File "Poisson.py", line 31, in <module>
> >>>>      compile([a, L, M, element], "Poisson", {'log_level': 20, 'format':
> >>>> 'dolfin', 'form_postfix': True, 'quadrature_order': 'auto', 'precision':
> >>>> '15', 'cpp optimize': False, 'cache_dir': None, 'split': False,
> >>>> 'representation': 'auto', 'optimize': False, 'output_dir': '.'},
> >>>> globals())
> >>>>    File
> >>>> "/home/walker/build/lib/python2.5/site-packages/ffc/compiler/compiler.py",
> >>>> line 109, in compile
> >>>>      format_code(generated_forms, prefix, format, options)
> >>>>    File
> >>>> "/home/walker/build/lib/python2.5/site-packages/ffc/compiler/compiler.py",
> >>>> line 214, in format_code
> >>>>      format.write(generated_forms, prefix, options)
> >>>>    File
> >>>>
> >>>
> >>
> > "/home/walker/build/lib/python2.5/site-packages/ffc/compiler/format/ufcformat.py",
> >>>> line 267, in write
> >>>>      output += _generate_dolfin_wrappers(generated_forms, prefix, options,
> >>>> self.format)
> >>>>    File
> >>>>
> >>>
> >>
> > "/home/walker/build/lib/python2.5/site-packages/ffc/compiler/format/ufcformat.py",
> >>>> line 663, in _generate_dolfin_wrappers
> >>>>      return generate_dolfin_code(prefix, "", form_names, common_space,
> >>>> False) + "\n\n"
> >>>> TypeError: generate_dolfin_code() takes exactly 3 arguments (5 given)
> >>>>
> >>>> - Shawn
> >>>> _______________________________________________
> >>>> FFC-dev mailing list
> >>>> FFC-dev@xxxxxxxxxx
> >>>> http://www.fenics.org/mailman/listinfo/ffc-dev
> >>>>
> >>>
> >>>
> >>>
> >>
> >
> >
> >
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev

Attachment: signature.asc
Description: Digital signature


References