View Issue Details

IDProjectCategoryView StatusLast Update
0000098OpenFOAM[All Projects] Bugpublic2010-12-06 08:51
ReporteralbertopAssigned Tohenry 
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSOpenSuseOS Version11.3
Product Version 
Fixed in Version 
Summary0000098: Compilation fails with Intel C++ Composer 2011 (ICC 12)
DescriptionThe compilation process fails when trying to compile OpenFOAM main library on a platform with gcc 4.5.x (See http://software.intel.com/en-us/forums/showthread.php?t=74691&p=2&o=d&s=lr)

The following option is required to avoid the problem:

-std=c++0x

Additionally, the option

-xT

is deprecated, and should be replaced with

-xSSE3

with Icc coming with Intel C++ Composer 2011 to avoid warnings.

This fix allows compilation to proceed. However a lot of warnings are caused bypTraits.H (they all refer to it). An example of warning message is:

/home/alberto/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/pTraits.H(71): warning #597: "Foam::pTraits<PrimitiveType>::operator Foam::symmTensor() const [with PrimitiveType=Foam::symmTensor]" will not be called for implicit or explicit conversions
          operator PrimitiveType() const
          ^
          detected during:
            instantiation of class "Foam::pTraits<PrimitiveType> [with PrimitiveType=Foam::symmTensor]" at line 82 of "/home/alberto/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/dimensionedType.H"
            instantiation of class "Foam::dimensioned<Type> [with Type=Foam::symmTensor]" at line 182 of "/home/alberto/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/transform.H"
TagsNo tags attached.

Activities

henry

2010-12-05 22:20

manager   ~0000157

Are the options

-std=c++0x
-xSSE3

Supported by older versions of Icc?

albertop

2010-12-06 04:00

reporter   ~0000163

The two options are supported at least by Intel compiler 11.1. This version already deprecated -xT, suggesting -xSSE3 instead on Linux systems ( http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/win/compiler_c/copts/common_content/options_ref_deprecated.htm ).

The option -std=c++0x is required only on Linux systems with gcc 4.5.x or newer, and it is supported by Intel compiler 11.1 (http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/win/compiler_c/copts/ccpp_options/option_std.htm ) at least, but the level of implementation of the new standard might vary. Older Intel compilers than 12 are reported not to work on systems with gcc 4.5.x ( I did not test myself, but it is reported on Intel forums).

henry

2010-12-06 08:51

manager   ~0000165

Thanks for the bug report.
Resolved by commit 6ab11db4102a3af670ce42e166dd2537556f90d0

Issue History

Date Modified Username Field Change
2010-12-05 04:50 albertop New Issue
2010-12-05 22:20 henry Note Added: 0000157
2010-12-06 04:00 albertop Note Added: 0000163
2010-12-06 08:51 henry Note Added: 0000165
2010-12-06 08:51 henry Status new => resolved
2010-12-06 08:51 henry Resolution open => fixed
2010-12-06 08:51 henry Assigned To => henry