On 03/19/2012 09:13 AM, Kristian B. Ølgaard wrote:
> On 19 March 2012 07:35, Johan Hake<email address hidden> wrote:
>> On 03/18/2012 11:41 PM, Kristian B. Ølgaard wrote:
>>> On 16 March 2012 15:49, Johan Hake<email address hidden>
>>> wrote:
>>>> This is really a duplication of bug 897372, which compared FFc and
>>>> SFC, as SFC compiles the attached form just fine. The generated
>>>> code is much smaller. Talking with Martin, I get the impression
>>>> that FFC does not use the information UFL provides about the
>>>> internal structure of the different sub expressions. I got the
>>>> impression that FFC lump the whole expression into a large string.
>>>> Subdividing this string is probably suboptimal compared to using
>>>> the information already stored in UFL.
>>>
>>> FFC quadrature without any optimisation will simply take the UFL
>>> representation as is and generate code accordingly. Any of the
>>> optimisations will result in the line being split up in multiple
>>> lines. See the FEniCS book chapter for details. Notice that
>>> hyperelastic models are usually very heavy on memory when using the
>>> simply_expressions option, so if it takes very long, check the memory
>>> consumption.
>>
>> Yes, but if I am not simplifying it it generates lines which have 40M
>> characters in it, which eventually wont compile.
>
> Yes I know. I expect the best option for your case to be:
>
> -feliminate_zeros -fprecompute_basis_const
>
> which will result in code similar to what SFC will produce, but with
> loops over the A_ij indices (SFC unrolls the loops).
> Also remember to set the quadrature_degree manually as discussed previously.
These are already set to true. The quadrature degree is also set to 2.
How have you implemented the simplification? Is that after you have
expanded the expression to a single string? I suspect Python has problem
with that as that string is pretty big. Martin mention that SFC does the
simplification before the expansion of the expression, based on the
information UFL provides.
Johan
>>>> -- You received this bug notification because you are a member of
>>>> FFC Core Team, which is subscribed to FFC.
>>>> https://bugs.launchpad.net/bugs/956979
>>>>
>>>> Title: FFC generate code which cannot be compiled
>>>>
>>>> Status in FEniCS Form Compiler: New
>>>>
>>>> Bug description: I have a viscoelastic biomechanics form which
>>>> generate an .h file which is 45M large, with a single line length
>>>> of 44M characters long. This wont compile with gcc. No optimization
>>>> enabled at all.
>>>>
>>>> To manage notifications about this bug go to:
>>>> https://bugs.launchpad.net/ffc/+bug/956979/+subscriptions
>>>
>>
>> --
>> You received this bug notification because you are a member of FFC Core
>> Team, which is subscribed to FFC.
>> https://bugs.launchpad.net/bugs/956979
>>
>> Title:
>> FFC generate code which cannot be compiled
>>
>> Status in FEniCS Form Compiler:
>> New
>>
>> Bug description:
>> I have a viscoelastic biomechanics form which generate an .h file
>> which is 45M large, with a single line length of 44M characters long.
>> This wont compile with gcc. No optimization enabled at all.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/ffc/+bug/956979/+subscriptions
>
On 03/19/2012 09:13 AM, Kristian B. Ølgaard wrote: basis_const
> On 19 March 2012 07:35, Johan Hake<email address hidden> wrote:
>> On 03/18/2012 11:41 PM, Kristian B. Ølgaard wrote:
>>> On 16 March 2012 15:49, Johan Hake<email address hidden>
>>> wrote:
>>>> This is really a duplication of bug 897372, which compared FFc and
>>>> SFC, as SFC compiles the attached form just fine. The generated
>>>> code is much smaller. Talking with Martin, I get the impression
>>>> that FFC does not use the information UFL provides about the
>>>> internal structure of the different sub expressions. I got the
>>>> impression that FFC lump the whole expression into a large string.
>>>> Subdividing this string is probably suboptimal compared to using
>>>> the information already stored in UFL.
>>>
>>> FFC quadrature without any optimisation will simply take the UFL
>>> representation as is and generate code accordingly. Any of the
>>> optimisations will result in the line being split up in multiple
>>> lines. See the FEniCS book chapter for details. Notice that
>>> hyperelastic models are usually very heavy on memory when using the
>>> simply_expressions option, so if it takes very long, check the memory
>>> consumption.
>>
>> Yes, but if I am not simplifying it it generates lines which have 40M
>> characters in it, which eventually wont compile.
>
> Yes I know. I expect the best option for your case to be:
>
> -feliminate_zeros -fprecompute_
>
> which will result in code similar to what SFC will produce, but with
> loops over the A_ij indices (SFC unrolls the loops).
> Also remember to set the quadrature_degree manually as discussed previously.
These are already set to true. The quadrature degree is also set to 2.
How have you implemented the simplification? Is that after you have
expanded the expression to a single string? I suspect Python has problem
with that as that string is pretty big. Martin mention that SFC does the
simplification before the expansion of the expression, based on the
information UFL provides.
Johan
>>>> -- You received this bug notification because you are a member of /bugs.launchpad .net/bugs/ 956979 /bugs.launchpad .net/ffc/ +bug/956979/ +subscriptions /bugs.launchpad .net/bugs/ 956979 /bugs.launchpad .net/ffc/ +bug/956979/ +subscriptions
>>>> FFC Core Team, which is subscribed to FFC.
>>>> https:/
>>>>
>>>> Title: FFC generate code which cannot be compiled
>>>>
>>>> Status in FEniCS Form Compiler: New
>>>>
>>>> Bug description: I have a viscoelastic biomechanics form which
>>>> generate an .h file which is 45M large, with a single line length
>>>> of 44M characters long. This wont compile with gcc. No optimization
>>>> enabled at all.
>>>>
>>>> To manage notifications about this bug go to:
>>>> https:/
>>>
>>
>> --
>> You received this bug notification because you are a member of FFC Core
>> Team, which is subscribed to FFC.
>> https:/
>>
>> Title:
>> FFC generate code which cannot be compiled
>>
>> Status in FEniCS Form Compiler:
>> New
>>
>> Bug description:
>> I have a viscoelastic biomechanics form which generate an .h file
>> which is 45M large, with a single line length of 44M characters long.
>> This wont compile with gcc. No optimization enabled at all.
>>
>> To manage notifications about this bug go to:
>> https:/
>