problem compiling form with ffc

Asked by Chaffra Affouda

I have a form that compiles fine on a 1D mesh but when I try to compile on a 2D mesh, instant throws an errror. The compile.log says j is not delclared. I think I was able to pinpoint the problem to the function ffc.quadrature.quadraturegenerator._generate_integral_code, line 426. it is difficult for me the generator a simple example that reporduce the problem because my forms have too many dependencies. Maybe someone could guide me where the problem might be...

There is a for loop at the end that is not being generated correctly:

line 426 in ffc.quadrature.quadraturegenerator._generate_integral_code
# Write all the loops of basis functions.
    for loop, ops_lines in loops.items():
        ops, lines = ops_lines
        prim_ops = reduce(lambda i, j: i*j, [ops] + [l[2] for l in loop])
        # Add number of operations for current loop to total count.
        num_ops += prim_ops
        code += ["", f_comment("Number of operations for primary indices: %d" % prim_ops)]
        code += f_loop(lines, loop)

________________________compile.log__________
running build_ext
building '_b9efe4da2dfe08ba711dad4bb9a835b001730cd3' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include -I/home/chaffra/Projects/Fenics/Semifem/semifem/math -Iinclude -I/usr/include/python2.7 -c b9efe4da2dfe08ba711dad4bb9a835b001730cd3_wrap.cxx -o build/temp.linux-x86_64-2.7/b9efe4da2dfe08ba711dad4bb9a835b001730cd3_wrap.o -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from b9efe4da2dfe08ba711dad4bb9a835b001730cd3_wrap.cxx:3151:0:
ffc_form_b9efe4da2dfe08ba711dad4bb9a835b001730cd3.h: In member function ‘virtual void ffc_form_b9efe4da2dfe08ba711dad4bb9a835b001730cd3_cell_integral_0_0::tabulate_tensor(double*, const double* const*, const ufc::cell&) const’:
ffc_form_b9efe4da2dfe08ba711dad4bb9a835b001730cd3.h:2710:9: error: ‘j’ was not declared in this scope
error: command 'gcc' failed with exit status 1

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chaffra Affouda (chaffra) said :
#1

In FILE ffc_form_b9efe4da2dfe08ba711dad4bb9a835b001730cd3.h:2710:9: error: ‘j’ was not declared in this scope
.....
      // Number of operations: 4
      I[13] = F10*I[11]*I[12]*W6[ip]*det;

      // Number of operations for primary indices: 2
      // Number of operations to compute entry: 2

!!!!!!!!!!!!!!!This is line 2710, THE FOR LOOP IS NOT BEING GENERATED!!!!!!!!!!!!!!!!!!!!!!
      A[j] += FE1[ip][j]*I[13];
    }// end loop over 'ip'

Revision history for this message
Johan Hake (johan-hake) said :
#2

Maybe you can start reducing it until it at least compiles, and then try
to identify the error and report it as a bug in ffc?

Johan

On 06/19/2012 05:11 PM, Chaffra Affouda wrote:
> New question #200892 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/200892
>
> I have a form that compiles fine on a 1D mesh but when I try to compile on a 2D mesh, instant throws an errror. The compile.log says j is not delclared. I think I was able to pinpoint the problem to the function ffc.quadrature.quadraturegenerator._generate_integral_code, line 426. it is difficult for me the generator a simple example that reporduce the problem because my forms have too many dependencies. Maybe someone could guide me where the problem might be...
>
> There is a for loop at the end that is not being generated correctly:
>
> line 426 in ffc.quadrature.quadraturegenerator._generate_integral_code
> # Write all the loops of basis functions.
> for loop, ops_lines in loops.items():
> ops, lines = ops_lines
> prim_ops = reduce(lambda i, j: i*j, [ops] + [l[2] for l in loop])
> # Add number of operations for current loop to total count.
> num_ops += prim_ops
> code += ["", f_comment("Number of operations for primary indices: %d" % prim_ops)]
> code += f_loop(lines, loop)
>
> ________________________compile.log__________
> running build_ext
> building '_b9efe4da2dfe08ba711dad4bb9a835b001730cd3' extension
> creating build
> creating build/temp.linux-x86_64-2.7
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include -I/home/chaffra/Projects/Fenics/Semifem/semifem/math -Iinclude -I/usr/include/python2.7 -c b9efe4da2dfe08ba711dad4bb9a835b001730cd3_wrap.cxx -o build/temp.linux-x86_64-2.7/b9efe4da2dfe08ba711dad4bb9a835b001730cd3_wrap.o -O2
> cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
> In file included from b9efe4da2dfe08ba711dad4bb9a835b001730cd3_wrap.cxx:3151:0:
> ffc_form_b9efe4da2dfe08ba711dad4bb9a835b001730cd3.h: In member function ‘virtual void ffc_form_b9efe4da2dfe08ba711dad4bb9a835b001730cd3_cell_integral_0_0::tabulate_tensor(double*, const double* const*, const ufc::cell&) const’:
> ffc_form_b9efe4da2dfe08ba711dad4bb9a835b001730cd3.h:2710:9: error: ‘j’ was not declared in this scope
> error: command 'gcc' failed with exit status 1
>

Can you help with this problem?

Provide an answer of your own, or ask Chaffra Affouda for more information if necessary.

To post a message you must log in.