"__tm_atomic" is undefined even with -Qtm_enabled flag

"__tm_atomic" is undefined even with -Qtm_enabled flag

I am unable to compile the following code:

#include 

void test(int *p,int *q)
{
	__tm_atomic
	{
		*p+=*q;
	}
}

int main(int argc,char **argv)
{
	int p; int q;
	test(&p,&q);
	printf("%d",p);
}

With the following command:

icc -Qtm_enabled -Wall small.c -o small -lpthread

I get the following errors:

small.c(5): error: identifier "__tm_atomic" is undefined
__tm_atomic
^

small.c(6): error: expected a ";"
{
^

small.c(9): warning #12: parsing restarts here after previous syntax error
}
^

compilation aborted for small.c (code 2)
make: *** [small] Error 2

As a side note, I am not on one of the approved distributions of linux, but I do not see how that would make a difference (I am currently using Arch Linux).

7 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.
Portrait de Ravi Narayanaswamy (Intel)

Quoting - parsiad
I am unable to compile the following code:

#include 

void test(int *p,int *q)
{
	__tm_atomic
	{
		*p+=*q;
	}
}

int main(int argc,char **argv)
{
	int p; int q;
	test(&p,&q);
	printf("%d",p);
}

With the following command:

icc -Qtm_enabled -Wall small.c -o small -lpthread

I get the following errors:

small.c(5): error: identifier "__tm_atomic" is undefined
__tm_atomic
^

small.c(6): error: expected a ";"
{
^

small.c(9): warning #12: parsing restarts here after previous syntax error
}
^

compilation aborted for small.c (code 2)
make: *** [small] Error 2

As a side note, I am not on one of the approved distributions of linux, but I do not see how that would make a difference (I am currently using Arch Linux).

Are you sure you are using the compiler which supports STM. Type the command icc -V and see ifit displays STM Compiler in version

Quoting - Ravi Narayanaswamy (Intel)

Are you sure you are using the compiler which supports STM. Type the command icc -V and see ifit displays STM Compiler in version

`icc -V` returns:

Intel C Compiler Professional for applications running on IA-32, Version 11.0 Build 20090131 Package ID: l_cproc_p_11.0.081
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
30 DAY EVALUATION LICENSE

icc: NOTE: the evaluation period for this product ends on 16-jul-2009 UTC.

Quoting - parsiad

`icc -V` returns:

Intel C Compiler Professional for applications running on IA-32, Version 11.0 Build 20090131 Package ID: l_cproc_p_11.0.081
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
30 DAY EVALUATION LICENSE

icc: NOTE: the evaluation period for this product ends on 16-jul-2009 UTC.

I just realized that that was indeed the wrong compiler. But what's weird is I installed the STM compiler and still get similar messages. Now, `icc -V` returns:

Intel C STM Compiler Professional for applications running on IA-32, Prototype Edition 3.0 Build 20081204 Package ID: l_cproc_p_11.0.606
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.

icc: NOTE: The Beta evaluation period for this product ends on 31-dec-2009 UTC.

Quoting - parsiad

Quoting - parsiad

`icc -V` returns:

Intel C Compiler Professional for applications running on IA-32, Version 11.0 Build 20090131 Package ID: l_cproc_p_11.0.081
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
30 DAY EVALUATION LICENSE

icc: NOTE: the evaluation period for this product ends on 16-jul-2009 UTC.

I just realized that that was indeed the wrong compiler. But what's weird is I installed the STM compiler and still get similar messages. Now, `icc -V` returns:

Intel C STM Compiler Professional for applications running on IA-32, Prototype Edition 3.0 Build 20081204 Package ID: l_cproc_p_11.0.606
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.

icc: NOTE: The Beta evaluation period for this product ends on 31-dec-2009 UTC.


Ah, sorry. It turned out to be a problem with the internal state of GNU make. For whatever reason it was using the old compiler even though the new one is now in my work path.

I'm having the same problem,

I installed Intel STM compiler 3.0, when I compile examples, I get the smae error message,

You said that it's a problem with GNU make, but How did you solve the proble ?

I'm use "./icc" to make sure that I'm using the right intel compiler, (in the ICC STM proptotype 3.0 folder), but this didn't solve the problem, !

Please if someOne could solve the problem, let me know, that would be really helpful !

This is my post describing the problem :

http://software.intel.com/en-us/forums/showthread.php?t=71417

Connectez-vous pour laisser un commentaire.