2

I have a code which is mainly developed using OpenACC, I would like to compare P100 results with OpenACC to Intel's KNL nodes using OpenMP, I tried using the compiler flag -ta=multi_core but it basically serialized all the loops (as per -acc info). Is the only way to use a preprocessor directive for all the loops? Are there any other more efficient or cleaner ways?

#ifndef _OPENACC
#pragma omp .....
#else
#pragma acc ......
#endif 
JimBamFeng
  • 709
  • 1
  • 4
  • 20
  • I think you have found the best solution. For the P100 you are using the PGI compiler and for the KNL you are using the ICC compiler? Maybe you could show some code examples? – Z boson Aug 03 '18 at 11:57
  • Are you using `-ta=multi_core` like you said, or `-ta=multicore`, which is the correct flag? That ifdef is the same way I generally mix the two on the same loop, since some compilers have the default behavior of aborting on unknown pragmas rather than ignoring them. – jefflarkin Aug 09 '18 at 20:04
  • I just checked the cmake file, I am sorry for the typo, yes, I use -ta=multicore, so if thats what you use I will stick with the same method, I appreciate your taking the time for responding – JimBamFeng Aug 09 '18 at 20:09

0 Answers0