装了intel的C++编译器,如何编译openmp程序?

C、C++和Java语言
回复
头像
pollothana
帖子: 262
注册时间: 2007-03-08 10:47
送出感谢: 0
接收感谢: 0

装了intel的C++编译器,如何编译openmp程序?

#1

帖子 pollothana » 2008-09-28 13:30

链接不上,如下

代码: 全选

**** Build of configuration Release for project omp_PI ****

make -k all
Building file: ../src/omp_PI.cpp
Invoking: Intel(R) IA-32 C++ Compiler
icpc -openmp -MMD -MP -MF"src/omp_PI.d" -MT"src/omp_PI.d" -c -o "src/omp_PI.o" "../src/omp_PI.cpp"
../src/omp_PI.cpp(9): (col. 1) remark: OpenMP DEFINED REGION WAS PARALLELIZED.
Finished building: ../src/omp_PI.cpp
 
Building target: omp_PI
Invoking: Intel(R) IA-32 C++ Linker
icpc  -o"omp_PI"  ./src/omp_PI.o   
./src/omp_PI.o: In function `main':
../src/omp_PI.cpp:(.text+0x24): undefined reference to `__kmpc_begin'
../src/omp_PI.cpp:(.text+0x2e): undefined reference to `__kmpc_global_thread_num'
../src/omp_PI.cpp:(.text+0x45): undefined reference to `ompc_set_num_threads'
../src/omp_PI.cpp:(.text+0x4f): undefined reference to `__kmpc_ok_to_fork'
../src/omp_PI.cpp:(.text+0x70): undefined reference to `__kmpc_fork_call'
../src/omp_PI.cpp:(.text+0x83): undefined reference to `__kmpc_serialized_parallel'
../src/omp_PI.cpp:(.text+0xaa): undefined reference to `__kmpc_end_serialized_parallel'
../src/omp_PI.cpp:(.text+0xbf): undefined reference to `__kmpc_end'
./src/omp_PI.o: In function `L_main_9__par_region0_2.0':
../src/omp_PI.cpp:(.text+0xec): undefined reference to `omp_get_thread_num'
make: *** [omp_PI] 错误 1
make: 由于错误目标“all”并未重新创建。

是不是还需要装openmp的包?具体是哪些包?知道的说下,谢谢!
My blog: hsquared66.blogspot.com
回复

回到 “C/C++/Java”