Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

OpenMP 4.0 teams on CPU and in native mode

$
0
0

Is there no way to use OpenMP teams on the CPU and on Xeon Phi in the native mode? See code and output below for my attempt to do that.

#include <omp.h>
#include <cstdio>

int main() {
#pragma omp teams
#pragma omp distribute
  for (int i = 0; i < 1000; i++) {
    printf("i=%d team:%d\n", i, omp_get_team_num());
  }
}

 

[user@c001-n002 ~]$ icpc -qopenmp test.cpp
test.cpp(5): error: teams must be the first and only construct within a target construct
  #pragma omp teams
  ^

compilation aborted for test.cpp (code 2)
[user@c001-n002 ~]$
[user@c001-n002 ~]$ icpc -qopenmp test.cpp -mmic
test.cpp(5): warning #3180: unrecognized OpenMP #pragma
  #pragma omp teams
          ^

test.cpp(6): warning #3180: unrecognized OpenMP #pragma
  #pragma omp distribute
          ^

[user@c001-n002 ~]$ icc -V
Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.090 Build 20140723
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.


 


Viewing all articles
Browse latest Browse all 1347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>