This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Check that optimization flags are accepted

+1 vote

Hi,

I suspect that the optimization flags do not work on my implementation of Fenics/Dolfin. I have

dl.parameters['form_compiler']['cpp_optimize'] = True
dl.parameters['form_compiler']['cpp_optimize_flags'] = '-O2'
dl.parameters['form_compiler']['optimize'] = True
ffc.parameters.FFC_PARAMETERS['optimize'] = True
ffc.parameters.FFC_PARAMETERS['cpp_optimize'] = True
ffc.parameters.FFC_PARAMETERS['cpp_optimize_flags'] = '-O2'
...
self.MGv.axpy(fact, assemble(self.wkformgrad, form_compiler_parameters={'optimize':True, 'representation':'quadrature'}))

and none of these lines made any difference to my profile log.

How can I test whether the optimization flags work?
Would there be a demo for which optimization flags are known to have a significant impact?

I'm using Fenics 1.6.0. My code contains a lot of different features (PDE solve, assembly of linear forms,...) so I would expect to save time at least somewhere.

Thanks a lot!

asked Apr 1, 2016 by BC FEniCS Novice (790 points)
...