问题描述
我想知道如何检查Linux远程机器上的OpenMP版本?
I wonder how to check the version of OpenMP on a Linux remote machine?
我不知道它的安装位置。
I don't know where it is installed either.
推荐答案
似乎OpenMP的C / C ++规范没有提供以编程方式执行此操作的直接方法。所以你必须检查你的编译器版本的文档。
It appears that the C/C++ specification for OpenMP provides no direct way of doing this programmatically. So you have to check the docs for your compiler version.
gcc --version ## get compiler version
对于GCC,这是一个很好的资源::
For GCC, this is a good resource: http://gcc.gnu.org/wiki/openmp:
编辑
经过一番努力,我得到了以下工作。它至少给出了OpenMP版本的一个指示 - 尽管它仍然需要你去查看。
Edit
After trying a bit harder, I got the following to work. It at least gives an indication of the OpenMP version -- although it still requires you to look something up.
$ echo |cpp -fopenmp -dM |grep -i open
#define _OPENMP 200805
你可以到这里()来发现日期之间的映射提供的和实际的OpenMP版本号。
You can go here (http://www.openmp.org/specifications/) to discover the mapping between the date provided and the actual OpenMP version number.
这篇关于如何检查Linux上的OpenMP版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!