Skip to content

tmp/util.cpp(16): error: identifier "creal" is undefined #4

@jeffhammond

Description

@jeffhammond

From what I can tell, you are using C99's creal in C++ code. I see this issue observed on Stackoverflow but have not figured out how to solve it yet.

TTC-github jrhammon$ ./scripts/ttc --perm=1,0,2 --size=1000,768,16 --dataType=d --alpha=1.0 --beta=1.0 --numThreads=120 --architecture=avx -v
WARNING: you did not specify an thread affinity. We are using: KMP_AFFINITY=compact,1 by default
--------------Settings---------------------
#threads:           120
thread affinity:    KMP_AFFINITY=compact,1
Compiler:           icpc (ICC) 16.0.2 20160204
-------------------------------------------
[generate] Generate all versions
Generation of 97 implementations took 0.049422 seconds        
[make] Compile all versions
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean 
rm -rf tmp/*.o transpose.exe
/Applications/Xcode.app/Contents/Developer/usr/bin/make intel2
icpc -O3  -qopenmp -xhost  -c tmp/main.cpp -o tmp/main.o
icpc -O3  -qopenmp -xhost  -c tmp/measure0.cpp -o tmp/measure0.o
icpc -O3  -qopenmp -xhost  -c tmp/measure1.cpp -o tmp/measure1.o
icpc -O3  -qopenmp -xhost  -c tmp/transpose.cpp -o tmp/transpose.o
icpc -O3  -qopenmp -xhost  -c tmp/transpose0.cpp -o tmp/transpose0.o
icpc -O3  -qopenmp -xhost  -c tmp/transpose1.cpp -o tmp/transpose1.o
icpc -O3  -qopenmp -xhost  -c tmp/util.cpp -o tmp/util.o
tmp/util.cpp(16): error: identifier "creal" is undefined
           printf("(%.2e,%.2e) ", creal(A[i + j * size[0]]), cimag(A[i + j * size[0]]));
                                  ^

tmp/util.cpp(16): error: identifier "cimag" is undefined
           printf("(%.2e,%.2e) ", creal(A[i + j * size[0]]), cimag(A[i + j * size[0]]));
                                                             ^

compilation aborted for tmp/util.cpp (code 2)
make[1]: *** [tmp/util.o] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [icpc] Error 2
[TTC] [Error] compilation failed. Retry with '-v' option to see the compilation errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions