Intel C++ compiler 10.0.517 + VC++ 6.0 error

Intel C++ compiler 10.0.517 + VC++ 6.0 error

pritir's picture

Hi,



I am trying the compiler the following code using hte intel C++ compiler 10.0.517 - STM support using VC++ 6.0



#include


int a = 0;
int main() {
#pragma omp parallel
{
int i;
for (i=0; i<100000; i++)
__tm_atomic {
a++;
}
printf("a = %i
", a);
}

return 0;
}


I have add the following option:


/Qopenmp /Qtm_enabled /Qstd=c99


When i build the project i get following errors:


--------------------Configuration: first - Win32 Debug--------------------
Compiling...
icl icl: error #10265: Transaction memory assumes multi-threaded libraries
Error executing xicl6.exe.


first.exe - 1 error(s), 0 warning(s)


Please comment.



Thanks and Regards,


Priti

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
James Cownie (Intel)'s picture

AFAICT it looks as if you are linking with the non-threadsafe version of the C runtime. Since you are running a parallel program you must link with the thread safe version.


This MSDN article refers http://support.microsoft.com/kb/140584


HTH


TimP (Intel)'s picture

/Qopenmp should specify thread-safe libraries. ICL 10 with VC++ 6 may not be a reliable combination, particularly with relatively new applications such as STM; you could ask about that on the C++ forum.

Login to leave a comment.