Linux 我可以检查我安装了哪个版本的 OpenMP?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6038436/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can I check which version of OpenMP I have installed?
提问by lms
I am trying to find out which version of OpenMP is installed on my machine. It's a Linux box I am connected to using ssh
.
我试图找出我的机器上安装了哪个版本的 OpenMP。这是一个 Linux 机器,我使用ssh
.
I am using gcc
to compile using -fopenmp
.
我正在使用gcc
编译使用-fopenmp
.
采纳答案by sehe
With gcc, I suppose you should be looking for the compiler version
使用 gcc,我想你应该寻找编译器版本
gcc -v
Perhaps in combination with the version of libgomp
也许结合libgomp的版本
ls -ltr /usr/lib/libgomp.so.1*
e.g.
例如
-rw-r--r-- 1 root root 46652 2010-09-27 23:00 /usr/lib/libgomp.so.1.0.0
-rw-r--r-- 1 根 46652 2010-09-27 23:00 /usr/lib/libgomp.so.1.0.0
Depending on your distro this might give more info:
根据您的发行版,这可能会提供更多信息:
dpkg --status libgomp
E.g:
例如:
Package: libgomp1
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 84
Maintainer: Ubuntu Core developers <[email protected]>
Architecture: i386
Source: gcc-4.5
Version: 4.5.1-7ubuntu2
Depends: gcc-4.5-base (= 4.5.1-7ubuntu2), libc6 (>= 2.6)
Description: GCC OpenMP (GOMP) support library
GOMP is an implementation of OpenMP for the C, C++, and Fortran 95 compilers
in the GNU Compiler Collection.
Homepage: http://gcc.gnu.org/
Original-Maintainer: Debian GCC Maintainers <[email protected]>
In my case it confirms that the version matches gcc
就我而言,它确认版本与 gcc 匹配
回答by wgodoy
Quoting from the GCC wiki pagecontaining information on the OpenMP specification:
引用包含 OpenMP 规范信息的GCC wiki 页面:
As of GCC 4.2, the compiler implements version 2.5 of the OpenMP specification, as of 4.4 it implements version 3.0 and since GCC 4.7 it supports the OpenMP 3.1 specification. GCC 4.9 supports OpenMP 4.0 with the follow exceptions (as of 2013-11-28): the new 4.0 directives are not yet supported in Fortran and omp targetwill always run on the host
从 GCC 4.2 开始,编译器实现了 OpenMP 规范的 2.5 版,从 4.4 开始,它实现了 3.0 版,并且从 GCC 4.7 开始,它支持 OpenMP 3.1 规范。GCC 4.9 支持 OpenMP 4.0,但有以下例外(截至 2013 年 11 月 28 日):Fortran 尚不支持新的 4.0 指令,omp 目标将始终在主机上运行