Subject: [Ffc] New handling of form compiler parameters

From: Anders Logg <[email-masked]>
Date: Mon, 1 Feb 2010 10:21:23 +0100

I have simplified the access to form compiler parameters from DOLFIN.
Here's a summary.

1. 'options' --> 'parameters' in FFC

2. DOLFIN stores form compiler parameters in parameters["form_compiler"]
and the values are easily accessible by

  info(parameters, True)

or

  info(parameters["form_compiler"])

3. DOLFIN reads the default values at startup by calling

  form_compiler.default_parameters()

4. The 'options' parameter to jit, assemble and Form have has been
renamed 'form_compiler_parameters'.

5. Before calling the form compiler, DOLFIN first reads the global
parameters from parameters["form_compiler"], then overrides the values
with any local values provided by the form_compiler_parameters
argument.

6. To see more output from the form compiler, *decrease* the log level
of the form compiler by form example setting it to INFO:

  parameters["form_compiler"]["log_level"] = INFO

This is the default log level in FFC, but DOLFIN changes it to INFO + 5
at startup to hide messages from the form compiler by default.

Have a go and see if it works as expected.

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Mon, 01 Feb 2010 09:30:16 +0000

> Have a go and see if it works as expected.

How can I have FFC report its parameters? I've set the logging level to
'INFO', but I can't tell whether or not FFC is using optimisation for
the generated code (the -O flag).

Garth

> --
> Anders
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp

---

From: "Garth N. Wells" <[email-masked]>
Date: Mon, 01 Feb 2010 09:45:02 +0000

> Have a go and see if it works as expected.

Doesn't look to me that FFC is picking up the parameters via, for example,

  parameters["form_compiler"]["cpp_optimize"] = True

I can take a look, but it won't be for a while.

Garth

---

From: Anders Logg <[email-masked]>
Date: Mon, 1 Feb 2010 10:52:01 +0100

> the generated code (the -O flag).

We could let FFC print the parameters it gets, but that's not much use
if they are ignored in the code generation anyway. Instead, FFC should
print a message when it actually uses an option (like it does for
representation). So the quadrature optimizations need to write some
message that it's generating optimized code. (Something for Kristian
to add where he thinks it appropriate.)

That aside, there seems to be a bug in passing the parameters to FFC
so they are in fact ignored. I'm looking into it.

--
Anders

---

From: Anders Logg <[email-masked]>
Date: Mon, 1 Feb 2010 10:57:15 +0100

> I can take a look, but it won't be for a while.

Should be fixed now.

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Mon, 01 Feb 2010 10:18:34 +0000

>> I can take a look, but it won't be for a while.

Thanks. Looks good now.

Garth