CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   swak4Foam compilation problem (http://www.cfd-online.com/Forums/openfoam-solving/94235-swak4foam-compilation-problem.html)

ganeshv November 9, 2011 21:31

swak4Foam compilation problem
 
I have a problem with compiling swak4Foam using intel compilers. I have OpenFOAM 1.6-ext compiled and running just fine. However swak4Foam doesn't compile. (I should mention that it compiles and works just fine using gcc compilers on my laptop.... and it's very very useful ..but a lot of people already know that!)

Shown below is the first error

SOURCE=GlobalVariablesRepository.C ; icpc -DIntel -Dlinux64 -DWM_DP -wd327,584,654,819,1125,1476,1505,1572 -ansi-alias -O3 -fno-alias -fargument-noalias-global -unroll0 -DNoRepository -IMake/linux64IccDPOpt -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/sampling/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/triSurface/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/lagrangian/basic/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/meshTools/lnInclude -IlnInclude -I. -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64IccDPOpt/GlobalVariablesRepository.o
/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/pTraits.H(52): error: not a class or struct name
public PrimitiveType
^
detected during instantiation of class "Foam::pTraits<PrimitiveType> [with PrimitiveType=char [48]]" at line 64 of "GlobalVariablesRepository.C"

/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/pTraits.H(52): error: not a class or struct name
public PrimitiveType
^
detected during instantiation of class "Foam::pTraits<PrimitiveType> [with PrimitiveType=Foam::Ostream &(Foam::Ostream &)]" at line 64 of "GlobalVariablesRepository.C"

ganeshv November 9, 2011 21:36

bison
 
I should mention that I originally had bison 2.3 installed at first. But I later installed m4 1.16 and bison 2.5 and it make no difference.

gschaider November 10, 2011 05:35

Quote:

Originally Posted by ganeshv (Post 331451)
I should mention that I originally had bison 2.3 installed at first. But I later installed m4 1.16 and bison 2.5 and it make no difference.

The parts you mention in your original posting are not affected by the bison-version.

Actually, the problem was discussed this week (http://www.cfd-online.com/Forums/ope...ion-2-0-a.html) and it seems that the problem is the Intel compiler. Fix is also found in that thread.

BTW: has anyone benched the Intel-compiler against a recent version of gcc (preferably on the same machine)? Just wondering whether there is a speed improvement that makes it worth the trouble it causes

ganeshv November 10, 2011 10:37

I tried that fix.

export WM_COMPILER=Gcc; cd Utilities; wclean all; wmake all
This is what I get. Where are the .hh files? I get a few more errors of the same kind.

Making dependency list for source file funkySetFields.C
could not open file FieldValueExpressionParser.tab.hh for source file funkySetFields.C
SOURCE=funkySetFields.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -IMake/linux64IccDPOpt -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/meshTools/lnInclude -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64IccDPOpt/funkySetFields.o
In file included from funkySetFields.C:41:
../../Libraries/swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18:45: error: FieldValueExpressionParser.tab.hh: No such file or directory

gschaider November 10, 2011 20:31

Quote:

Originally Posted by ganeshv (Post 331579)
I tried that fix.

export WM_COMPILER=Gcc; cd Utilities; wclean all; wmake all
This is what I get. Where are the .hh files? I get a few more errors of the same kind.

Making dependency list for source file funkySetFields.C
could not open file FieldValueExpressionParser.tab.hh for source file funkySetFields.C
SOURCE=funkySetFields.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -IMake/linux64IccDPOpt -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/meshTools/lnInclude -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/brashear/guv106/OpenFOAM/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64IccDPOpt/funkySetFields.o
In file included from funkySetFields.C:41:
../../Libraries/swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18:45: error: FieldValueExpressionParser.tab.hh: No such file or directory

Hm. Compilation of Library before that was successful? If yes: you didn't wclean anywhere in Library (possibly during an attempt to fix things)? Because that might have remove the lnInclude-directory (and the .hh-file/link with it)

ganeshv November 11, 2011 17:39

I couldn't get swak4Foam to compile with icc/11.1. I switched to icc/12.0 and then it worked until funkySet* libraries had to be compiled. I then adopted the work around posted in that thread and described above. It works. My simulation that uses swak4Foam with cellZone averages also works. Thanks for helping Bernard Gschaider.


All times are GMT -4. The time now is 05:53.