Compilation of Recompose.cc fails with gcc-4.7 and OpenMP

Issue #1176 closed
David Radice created an issue

I am trying to compile the latest release of the Einstein Toolkit, Ørsted, on my laptop (Fedora 17, gcc-4.7.2), but I get the following error if I try to compile with OpenMP:

/home/davide/Desert/CactusOersted/configs/charon/build/Carpet/Recompose.cc:2071:2: error: stray ‘#’ in program

the error disappears if I compile with no OpenMP support.

I can also compile without problems, using the same thornlist and with OpenMP support, on our local cluster with the Intel compiler.

Keyword:

Comments (4)

  1. Barry Wardell
    • removed comment

    Are you using ccache? I experienced similar weird preprocessor errors recently and it turned out ccache was to blame. In that case, setting the CCACHE_CPP2=1 environment variable was enough to fix the problem.

  2. David Radice reporter
    • removed comment

    Yes I am using ccache and yes I can compile without issues if I export CCACHE_CPP2=1!

    I guess you can close the bug.

    Thank you very much!

  3. Log in to comment