Page 1 of 1

Intel compiler 11.1 produces incorrect optimized code in FVM

Posted: Tue Oct 12, 2010 2:28 pm
by Yvan Fournier
Hello,

A bug in the intel C/C++ compiler (at least version 11.1 on Nehalem architectures) may lead to a crash when writing restart files in parallel, with an error log indicating a segmentation fault under fvm_part_t_block_copy_array.

This bug does not appear when compiled in debug mode, nor does it appear with the Intel compiler on Itanium.

The attached file may be used to replace fvm-0.15.1/src/fvm_part_to_block.c to correct the issue (it simply lowers the optimization level when using the Intel compiler in the affected function).

Compiling FVM with GCC instead of ICC is another possible workaround.

Best regards,

  Yvan

Re: Intel compiler 11.1 produces incorrect optimized code in

Posted: Tue Oct 12, 2010 2:32 pm
by Yvan Fournier
Another alternate patch possible is attached here.

It does not lower the optimization level, but adds intermediate variables and seems to bypass the issue (this is actually the version of the file intended for patch release 2.0.1 and development versions 2.1.x, the intermediate variables being added to ensure arithmetic is done on long integers for meshes with more than 2 billion faces, but this change also seems to circumvent the compiler bug.

Best regards,

  Yvan