回 帖 发 新 帖 刷新版面

主题:linux下安装了ifort,但找不到openmp,怎么回事

最近在学多核并行,听说openmp是编译器自带的,在linux下安装了ifort后,使用#locate omp.h命令后,提示:no such file or directory.坛子里有人说ifort默认openmp是关闭的,我打开ifort的help,上面写着
openmp            enable the compiler to generate multi-threaded code based 
                  on the OpenMP directives 

-openmp-profile     link with instrumented OpenMP runtime library to generate 
                    OpenMP profiling information for use with the OpenMP 
                    component of the VTune(TM) Performance Analyzer 

-openmp-stubs       enables the user to compile OpenMP programs in sequential 
                    mode. The openmp directives are ignored and a stub OpenMP 
                    library is linked (sequential) 
-openmp-report{0|1|2}   control the OpenMP parallelizer diagnostic level 

这是么意思啊,我该怎么办才能使用openmp呢

 
 

回复列表 (共5个回复)

沙发

ifort必须有omp.h么?
人家是必须有omp_lib.f90和omp_lib.mod

icl才必须有omp.h

另外使用locate之前需要updatedb,否则都是找不到

使用openmp,编译时加入/openmp

板凳

在linux下是-openmp

3 楼


您的意思是ifort上一定有openmp,直接编译就行?

4 楼

是。

5 楼

只要不太旧的编译器(CVF年代之后的)都自带omp.

我来回复

您尚未登录,请登录后再回复。点此登录或注册