ICL preprocesor built-in define for ICL version?

ICL preprocesor built-in define for ICL version?

Greetings,

due to bug while compile time (assertion failure) in ICL i need to do this in two pieces of code:

#if defined(__INTEL_COMPILER) && !defined(HAVE_INTEL_COMPILER_BUG_02)

#   pragma ivdep

#endif
while defining "HAVE_INTEL_COMPILER_BUG_02" in MSVC 2010 project file.

I am using ICL 12.1 (parallel studio + MSVC 2010). Is there some built-in ICL preprocessr define like "_MSC_VER" for visual studio, so I will not have to define preprocessor symbol in project file, but rather in sources (preprocessor + ICL version comparison)?

Am I blind, or this is not mentioned in the ICL documentation?

Actually I want to test for 12.1 ICL version by preprocessor.

-- With best regards, VooDooMan - If you find my post helpful, please rate it and/or select it as a best answer where applies. Thank you.
5 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Best Reply

The doc for this is at http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/win/index.htm#bldaps_cls/cppug_ccw/bldaps_macros_win.htm#bldaps_macros_win although it's not visible from the table of contents, which is odd. I'll submit a docs issue for that.

Anyway, __INTEL_COMPILER contains a value that's version dependent. For the latest 12.1 compiler, it's 1210. Be careful, as there is a known issue for the first product version of 12.1 (12.1.0 in C++ Composer XE 2011 update 6) that emits "9999" for this. Updates 7 and later do the correct thing.

Brandon Hewitt Technical Consulting Engineer For 1:1 technical support: http://premier.intel.com Software Product Support info: http://www.intel.com/software/support

Hi Brandon,

Thanks for the link! I have a question:

What are 'EDG' and '__EDG_VERSION__' macros for?

Best regards,
Sergey

Citation :

Marián "VooDooMan" Meravý a écrit :

Greetings,

due to bug while compile time (assertion failure) in ICL i need to do this in two pieces of code:

 

#if defined(__INTEL_COMPILER) && !defined(HAVE_INTEL_COMPILER_BUG_02)

#   pragma ivdep

#endif

while defining "HAVE_INTEL_COMPILER_BUG_02" in MSVC 2010 project file.

 

I am using ICL 12.1 (parallel studio + MSVC 2010). Is there some built-in ICL preprocessr define like "_MSC_VER" for visual studio, so I will not have to define preprocessor symbol in project file, but rather in sources (preprocessor + ICL version comparison)?

Am I blind, or this is not mentioned in the ICL documentation?

Actually I want to test for 12.1 ICL version by preprocessor.

Actually, over time, two things happened to me: 1. I have found out that __INTEL_COMPILER is compiler-defined number of ICC version, so it can be easily detected by preprocessor. 2. I don't need "HAVE_INTEL_COMPILER_BUG_02" to define globally, since that bug was resolved by official ICC 13.0 (not beta). So I have undefined this project-wide preprocessor symbol, and workaround is not needed any-more.

-- With best regards, VooDooMan - If you find my post helpful, please rate it and/or select it as a best answer where applies. Thank you.

I use the following verifications when some problems in the compiler need to be workarounded:

#if __INTEL_COMPILER_BUILD_DATE == 20040309 // Intel C++ compiler v7.1.029
...
#endif

#if __INTEL_COMPILER_BUILD_DATE == 20060606 // Intel C++ compiler v8.1.038
...
#endif

#if __INTEL_COMPILER_BUILD_DATE == 20120130 // Intel C++ compiler v12.1.3
//...
#endif

#if __INTEL_COMPILER_BUILD_DATE == 20120928 // Intel C++ compiler v12.1.7
//...
#endif

#if __INTEL_COMPILER_BUILD_DATE == 20120731 // Intel C++ compiler v13.1.0
//...
#endif

#if __INTEL_COMPILER_BUILD_DATE == 20130118 // Intel C++ compiler v13.1.2
//...
#endif

and so on.

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui