Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize newer OpenMP version date codes #537

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,13 @@ int main(int argc, char *argv[]) {
#if defined _OPENMP && _OPENMP < 201511
printf("Warning: OpenMP version < 4.5. GOMC will not run optimally!\n");
#endif
// Print OpenMP version if recognized or OpenMP date code if not recognized.
// Print the OpenMP version if recognized or instead the OpenMP date code.
#ifdef _OPENMP
std::unordered_map<unsigned, std::string> omp_map{
{200505, "2.5"}, {200805, "3.0"}, {201107, "3.1"},
{201307, "4.0"}, {201511, "4.5"}, {201611, "5.0 Preview 1"},
{201811, "5.0"}};
std::unordered_map<unsigned, std::string>::const_iterator match =
omp_map.find(_OPENMP);
std::unordered_map<int, std::string> omp_map{
{200505, "2.5"}, {200805, "3.0"}, {201107, "3.1"}, {201307, "4.0"},
{201511, "4.5"}, {201611, "5.0 Preview 1"}, {201811, "5.0"},
{202011, "5.1"}, {202111, "5.2"}, {202411, "6.0"}};
auto match = omp_map.find(_OPENMP);
if (match == omp_map.end())
printf("%-40s %u\n", "Info: Compiled with OpenMP Version", _OPENMP);
else
Expand Down
Loading