TestMath: undefined reference in function TestMath_CC on loewe machine

Issue #1607 closed
Bruno Mundim created an issue

Trying to compile ET on loewe results in the following linking error:

/home/astro/mundim/tmp/einstein_test/Cactus/configs/et/lib/libthorn_TestMath.a(math_cc.cc.o): In function `TestMath_CC':
/home/astro/mundim/tmp/einstein_test/Cactus/arrangements/CactusTest/TestMath/src/math_cc.cc:178: undefined reference to `__builtin_fmaxf'
/home/astro/mundim/tmp/einstein_test/Cactus/arrangements/CactusTest/TestMath/src/math_cc.cc:181: undefined reference to `__builtin_fmaxl'
/home/astro/mundim/tmp/einstein_test/Cactus/arrangements/CactusTest/TestMath/src/math_cc.cc:190: undefined reference to `__builtin_fminf'
/home/astro/mundim/tmp/einstein_test/Cactus/arrangements/CactusTest/TestMath/src/math_cc.cc:193: undefined reference to `__builtin_fminl'

loewe.cfg does set -std=c99 to CFLAGS. Any ideas on working around this error?

Keyword: TestMath

Comments (6)

  1. Erik Schnetter
    • removed comment

    This is an installation problem with the Intel compiler.

    Many systems have similar problems. The work-around is to add the following to CXXFLAGS:

    -D__builtin_fmaxf=fmaxf -D__builtin_fmaxl=fmaxl -D__builtin_fminf=fminf -D__builtin_fminl=fminl
    

    See also kraken-intel12.cfg for an example.

    This is a C++ problem; CFLAGS is not relevant.

  2. Bruno Mundim reporter
    • removed comment

    Thanks! I updated loewe.cfg and ran the testsuites. You said it is an installation problem with intel compilers. Do you know what needs to be done to install them correctly? I could point this out to the sys admin on loewe.

  3. Erik Schnetter
    • removed comment

    No, I don't know what needs to be done. Typically, the Intel compilers have certain requirements, e.g. certain version(s) of gcc must be installed. With other versions, these errors may occur. On many HPC systems, the version of gcc is too old.

    Since the Intel compilers are offered commercially, I recommend contacting Intel's user support for this. There may also be an FAQ on Intel's web site.

  4. Log in to comment