|
[Sponsors] |
Error compiling OpenFoam 1.6.x with intel compiler icc |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 25, 2010, 05:16 |
Error compiling OpenFoam 1.6.x with intel compiler icc
|
#1 |
New Member
Mak
Join Date: Feb 2010
Posts: 1
Rep Power: 0 |
I have checked out the latest version from the repository "OpenFoam 1.6.x"
And I get the following error compiling it with icc (11.0): derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C(4 5): error: member "Foam::NamedEnum<Enum, nEnum>::names [with Enum=Foam::compressible::turbulentHeatFluxTemperat ureFvPatchScalarField::heatSourceType, nEnum=2]" cannot be specialized in the current scope names[] = ^ The is in the file: src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C g++ does not give this error. It seems that the partially specialized template in this file is not allowed by icc while gcc seems to be ignoring it. icc version: 11.0 Any idea what can be done? Thanks, |
|
February 25, 2010, 06:59 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Mak,
I knew I saw something recently about icc... According to this post, OpenFOAM 1.6.x is prepared to work with icc 11.1. Prior to that version, it doesn't work all that well. I personally have very little experience with icc, but my advice is to get the latest free version of icc for Linux, and compare the two versions. Or read the release notes for the latest version and see what's the difference! In case you had already seen that post, you could have let us know Best regards, Bruno |
|
February 25, 2010, 07:04 |
|
#3 |
New Member
Join Date: May 2009
Posts: 3
Rep Power: 17 |
I have the same problem. I think this link describes the problem and some solutions:
http://stackoverflow.com/questions/1470654 |
|
February 25, 2010, 07:52 |
|
#4 | |
New Member
Join Date: May 2009
Posts: 3
Rep Power: 17 |
Quote:
1) comment out the template specialization at the top of the file: /* template<> const char* NamedEnum<turbulentHeatFluxTemperatureFvPatchScala rField::heatSourceType, 2>:: names[] = { "power", "flux" }; */ 2) add the following to the bottom of the file (outside the namespaces!): template<> const char* Foam::NamedEnum<Foam::compressible::turbulentHeatF luxTemperatureFvPatchScalarField::heatSourceType, 2>:: names[] = { "power", "flux" }; |
||
April 7, 2010, 19:45 |
|
#5 |
Member
Patricio Bohorquez
Join Date: Mar 2009
Location: Jaén, Spain
Posts: 95
Rep Power: 17 |
Please, could you fix the blank space in the word F lux?
Foam::NamedEnum<Foam::compressible::turbulentHeatF lux Thanks, now it works for me. |
|
October 28, 2011, 08:06 |
OpenFOAM with Intel compiler (OF 1.7.1)
|
#6 | |
New Member
Achim Boemelburg
Join Date: Oct 2011
Posts: 12
Rep Power: 15 |
Quote:
--------------------------------------------------------------------- I tried to follow this way, but my compilation fails: derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C(2 40): error: namespace "Foam::compressible" has no member "turbulentHeatF" Foam::NamedEnum<Foam::compressible::turbulentHeatF luxTemperatureFvPatchScalarField::heatSourceType, 2>:: ^ derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C(2 40): error: name followed by "::" must be a class or namespace name Foam::NamedEnum<Foam::compressible::turbulentHeatF luxTemperatureFvPatchScalarField::heatSourceType, 2>:: ^ derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C(2 40): error: too few arguments for class template "Foam::NamedEnum" Foam::NamedEnum<Foam::compressible::turbulentHeatF luxTemperatureFvPatchScalarField::heatSourceType, 2>:: ^ derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C(2 40): error: expected a ";" Foam::NamedEnum<Foam::compressible::turbulentHeatF luxTemperatureFvPatchScalarField::heatSourceType, 2>:: ^ Here's my source: ... 34 namespace Foam 35 { 36 namespace compressible 37 { 38 39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // 40 41 /* 42 (http://www.cfd-online.com/Forums/ope...tml#post247360) 43 template<> 44 const char* 45 NamedEnum<turbulentHeatFluxTemperatureFvPatchScala rField::heatSourceType, 2>:: 46 names[] = 47 { 48 "power", 49 "flux" 50 }; 51 */ 52 53 const 54 NamedEnum<turbulentHeatFluxTemperatureFvPatchScala rField::heatSourceType, 2> 55 turbulentHeatFluxTemperatureFvPatchScalarField::he atSourceTypeNames_; 56 57 ... 233 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 234 235 } // End namespace compressible 236 } // End namespace Foam 237 238 template<> 239 const char* 240 Foam::NamedEnum<Foam::compressible::turbulentHeatF luxTemperatureFvPatchScalarField::heatSourceType, 2>:: 241 names[] = 242 { 243 "power", 244 "flux" 245 }; 246 247 // ************************************************** *********************** // 248 my icpc is Version 12.0.2 |
||
Tags |
icc, intel compiler, template errors |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 14:43 |
Error occurs when compiling OpenFoam 1.6.x with Icc | fs82 | OpenFOAM Bugs | 5 | January 20, 2010 04:08 |
OpenFOAM compiled with Intel C++ Compiler? | af631717 | OpenFOAM Running, Solving & CFD | 4 | June 5, 2009 07:41 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |