Reputation: 2053
I have moved a parallel program that was working and built in visual studio. I'm using c++ and compiling on the intel compiler. I have to move the project to a linux machine and run it. So I made the following make file.
parallel: main.o Node.o
icpc -o parallel main.o Node.o
main.o: main.cpp
icpc -c $(CONFIG) main.cpp
Node.o: Node.cpp
icpc -c $(CONFIG) Node.cpp
clean:
rm -f parallel *.o core core.*
CONFIG = -openmp
but get this output. I can't figure out why it's not recognizing when it works on windows.
main.cpp:(.text+0x4e): undefined reference to `__kmpc_begin'
main.cpp:(.text+0xa2): undefined reference to `__kmpc_global_thread_num'
main.cpp:(.text+0xb2): undefined reference to `__kmpc_ok_to_fork'
main.cpp:(.text+0xc9): undefined reference to `__kmpc_fork_call'
main.cpp:(.text+0xdb): undefined reference to `__kmpc_serialized_parallel'
main.cpp:(.text+0xfa): undefined reference to `__kmpc_end_serialized_parallel'
main.cpp:(.text+0x106): undefined reference to `__kmpc_ok_to_fork'
"" "" '"" """
Although I don't think it's necessary here is my project.
http://bitbucket.org/pumphouse/disjoint-sets-serial-parallel
Upvotes: 1
Views: 6732
Reputation: 15725
You are not linking with -openmp
; change your second line to
icpc $(CONFIG) -o parallel main.o Node.o
Upvotes: 6