I wonder how to check the version of OpenMP on a Linux remote machine?
I don\'t know where it is installed either.
Here's a short C++11 program to display your OpenMP version; it also covers version 5.0 which was released in November 2018.
#include
#include
#include
int main(int argc, char *argv[])
{
std::unordered_map map{
{200505,"2.5"},{200805,"3.0"},{201107,"3.1"},{201307,"4.0"},{201511,"4.5"},{201811,"5.0"},{202011,"5.1"}};
std::cout << "We have OpenMP " << map.at(_OPENMP) << ".\n";
return 0;
}
and compile it with:
g++ -std=c++11 -fopenmp foobar.cpp