#include <omp.h>
#include <stdio.h>

#pragma offload_attribute (push, target (mic))

void hello ( void )
{
   int tid = omp_get_thread_num();
   char *s = "Hello World!";
   printf("%s from thread %d\n", s, tid);
}

#pragma offload_attribute (pop)

int main ( void )
{
   const int nthreads = 1;
   #pragma offload target(mic)
   #pragma omp parallel for
   for(int i=0; i<nthreads; i++) hello();
   return 0;
}
