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

icc generates endless loop when using avx instructions in nbench

Jan_K_4
Beginner
321 Views

Hello,

I'm experimenting with icc flags and nbench and it seems that icc is generating wrong code when using avx. All but the assignment test are working fine. If I use -msse4.2 the assignment test is also working. The -mavx flag seems to trigger the bug.

ICC Version : 13.1.0

CFLAGS -mavx -O2 

nbench url: http://www.tux.org/~mayer/linux/bmark.html

0 Kudos
4 Replies
Shenghong_G_Intel
321 Views

Hi Jan K,

Thank you for submitting your issue here. I will take a look into it to verify the issue. I will update you my test result soon.

Thanks,

Shenghong

0 Kudos
Shenghong_G_Intel
321 Views

Hi Jan K,

I can reproduce your issue and the issue is wrong optimization caused by vectorization. I will submit the issue to our developer to fix.

If you need workaround for the issue, you can have multiple options:

1. as you mentnined, it can work with SSE4.2

2. you can also remove '-vec-' option by setting CFLAGS to "-mavx -O2 -vec-"

3. the issue is caused by the function "first_assignments" in "nbench1.c", so if you disable vectorization for the loop in this function, it can also work. You have many possible solutions:

(1) disable vectorization for "nbench1.c" using "-vec-" by updating the Makefile

(2) add "#pragma novector" for the loops in "first_assignments" function in nbench1.c, you need to update code

I will not list all the possible ways....such as disable optimization for "first_assignments" and so on...but the root cause of this issue is the vectorization for the loop in first_assignments is wrong.

Let me know if you have any concerns. I will notify you here when the issue is fixed in future version.

Thanks,

Shenghong

0 Kudos
Shenghong_G_Intel
321 Views

Hi Jan K,

This issue is fixed in latest 2013 update 5 compiler. Please upgrade your compiler.

Thanks,

Shenghong

0 Kudos
Armando_Lazaro_Alami
321 Views

I can confirm that update 4 created a wrong executable when using AVX as target. Update 5 is correct.

0 Kudos
Reply