View Issue Details

IDProjectCategoryView StatusLast Update
0000602OpenFOAMBugpublic2012-07-27 16:21
Reporterpaukap Assigned Touser2 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSScientific Linux 6.2OS Version6.2 "Carbon"
Summary0000602: IOobject EIO: identifier collision with system define
DescriptionDear OpenFOAM developer,
I tried to install OpenFOAM 2.1.1 using the newest Intel Compiler (12.1.5) on Scientific Linux 6.2 (== RHEL 6.2) nodes, and run into an error which seem for me to be an OpenFOAM issue.

Consider the attached file. It contain solidEquilibriumDisplacementFoam.C (OpenFOAM-2.1.1/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/) and all needed header files (copyed to one place drom different dirs). Compiling it with Intel 12.1 compilers on RHEL 6.2 Nodes lead to error in readMechanicalProperties.H :
------------------------------------------------------------------------------
readMechanicalProperties.H(79): error: expected an identifier
      IOobject EIO
               ^
(and many follow-ups)
------------------------------------------------------------------------------
Trying more we found out:
- there is no error on RHEL 5.8 (CentOS release 5.8 (Final))
- there is no error if using GCC or Intel 12.0 compiler
- the error vanish if removing -std=c++0x from command line or (sic!) undefining EIO just before the line 'IOobject EIO' in readMechanicalProperties.H (don't know about this is a good idea)

So our first guess was it would be a problem from Intel compiler itself (and we will ask the Intel support for it to clarify the things). But then we found out that 'EIO' is actually an OS-reserved identifier:
------------------------------------------------------------------------------
$ fgrep -R EIO /usr/include/
/usr/include/asm-generic/errno-base.h:#define EIO 5 /* I/O error */
------------------------------------------------------------------------------

It is unclear for us now why different compilers did behave in different way, but using an identifier reserved by operating system in OpenFOAM code is a thing which could (and should) be corrected. Isn't it?

best,
Paul Kapinos
Steps To Reproduceun-TAR,
./runme.sh
TagsNo tags attached.

Relationships

duplicate of 0000598 resolvedhenry Compilation using Intel compiler fails with solidEquilibriumDisplacementFoam 

Activities

paukap

2012-07-27 16:14

reporter  

user2

2012-07-27 16:21

  ~0001510

Duplicate bug report

Issue History

Date Modified Username Field Change
2012-07-27 16:14 paukap New Issue
2012-07-27 16:14 paukap File Added: bugreport093-icpc12.1_dont_compile.tgz
2012-07-27 16:20 user2 Relationship added duplicate of 0000598
2012-07-27 16:21 user2 Note Added: 0001510
2012-07-27 16:21 user2 Status new => closed
2012-07-27 16:21 user2 Assigned To => user2
2012-07-27 16:21 user2 Resolution open => fixed