Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icc 7.1 -parallel option usage

fknoben
Beginner
479 Views
#include

#include
#include

int main()
{
int i,j;
double k,l;

k = 0.0;


Why gives the following program, when
compiled with the -parallel option
of the icc 7.1 compiler the result 0.0?
Hardware: dual intel p4 with hyperthreading

When compiled on an amd athlon single processor
unit with the same option I get a correct
result.

Regards
Frank Knoben
admin@igpm.rwth-aachen.de

#include

#include
#include

int main()
{
int i,j;
double k,l;

k = 0.0;

for (i=0;i<10000;i++)
{
for (j=0;j<10000;j++)
{
k += sqrt(i*j*3.0);
}
}
l = k;

printf("k=%f l=%f ",k,l);
exit(1);
}
0 Kudos
1 Reply
Elizabeth_S_Intel
479 Views
I reproduced your issue and this appears to be a problem in the compiler. It would be best that you submit an issue to Intel Premier Support, https://premier.intel.com. You can then be notified when the issue is resolved.

If you have not created a Premier Support account, please go to the registration center, http://www.intel.com/software/products/registrationcenter. Both Premier Support and the Registration Center use the same account.

Thank you,

Elizabeth S.
Intel Customer Support
0 Kudos
Reply