swak4Foam installation on 2.0
Hi.
I have problems installing swak4Foam on my kubuntu machine. The error occurs during compiling/building the stuff in the Utilities folder and leads to the following error message: /home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/pTraits.H(53): error: not a class or struct name public PrimitiveType ^ detected during instantiation of class "Foam:: pTraits<PrimitiveType> [with PrimitiveType=char [68]]" at line 71 of "funkySetBoundaryField.C" This occurs a lot of times in each of the contents of the utilities folder. Can anybody help me or give me a hint? Thanks, rupert |
Quote:
Questions: - versions? g++, OF (which commit are you on as it is a git-version), swak4Foam (same here: hg or svn) - have you ever compiled another 3rd-party thing under this OF version? - is there some other error message further up north (especially on about "missing headers" |
Hi
I'm using OpenFoam2.0.x (3 months old) and the corresponding (1 day old) swak svn version. I'm using a Icc compiler. Here is the begin compiler output: ~/software/OpenFOAM/own-2.0.x/swak4Foam$ ./Allwmake Reading variables from 'swakConfiguration' '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libswak4FoamParsers.so' is up to date. '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libgroovyBC.so' is up to date. '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libswakFunctionObjects.so' is up to date. '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libsimpleFunctionObjects.so' is up to date. '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libsimpleSwakFunctionObjects.so' is up to date. '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libswakTopoSources.so' is up to date. '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libswakSourceFields.so' is up to date. '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libgroovyStandardBCs.so' is up to date. '/home/rupert/software/OpenFOAM/own-2.0.x/platforms/linux64IccDPOpt/lib/libpythonIntegration.so' is up to date. SOURCE=funkySetFields.C ; icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -xHost -O3 -no-prec-div -DNoRepository -IMake/linux64IccDPOpt -I/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/finiteVolume/lnInclude -I/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/meshTools/lnInclude -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64IccDPOpt/funkySetFields.o /home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/pTraits.H(53): error: not a class or struct name public PrimitiveType ^ detected during instantiation of class "Foam::pTraits<PrimitiveType> [with PrimitiveType=char [19]]" at line 151 of "funkySetFields.C" /home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/pTraits.H(53): error: not a class or struct name public PrimitiveType ^ detected during instantiation of class "Foam::pTraits<PrimitiveType> [with PrimitiveType=char [11]]" at line 152 of "funkySetFields.C" ... and so on. thanks for your help |
Quote:
I think that the Intel-compiler is to blame. Strange thing is that you were obviously able to compile the OF-distro with it .... and ... even stranger .... that the swak-libraries were successfully compiled with it ... and they also have WarningIn/FatalErrorIn-streams. Sorry. There is not much I can do here without an Intel-compiler. Maybe someone else has one and has already solved the problem |
hi Bernhard,
i tested a few things and i found out the following: if i replace the Info expression by cout the problem is solved on this place. So it seems that something with this Info stuff doesn't work nicely. If the compiler error were only in the swak files this could solve the problem. But there are the same errors from files within the OF/src which i don't want to touch... Is there maybe some include missing or something else??? The errors come again during compilation of funkySetBoundaryField.C and so on... Thanks a lot, rupert Compilation error: Making dependency list for source file funkySetFields.C SOURCE=funkySetFields.C ; icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -xHost -O3 -no-prec-div -DNoRepository -IMake/linux64IccDPOpt -I/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/finiteVolume/lnInclude -I/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/meshTools/lnInclude -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64IccDPOpt/funkySetFields.o /home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/pTraits.H(53): error: not a class or struct name public PrimitiveType ^ detected during instantiation of class "Foam::pTraits<PrimitiveType> [with PrimitiveType=char [13]]" at line 5 of "/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/createTime.H" /home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/pTraits.H(53): 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 5 of "/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/createTime.H" /home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/pTraits.H(53): error: not a class or struct name public PrimitiveType ^ detected during instantiation of class "Foam::pTraits<PrimitiveType> [with PrimitiveType=char]" at line 11 of "/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/createNamedMesh.H" /home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/pTraits.H(53): error: not a class or struct name public PrimitiveType ^ detected during instantiation of class "Foam::pTraits<PrimitiveType> [with PrimitiveType=char [24]]" at line 18 of "/home/rupert/software/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude/createNamedMesh.H" |
Quote:
Quote:
Or do you mean "during the compilation of Swak this occurs in some OF/src-files" Quote:
Quote:
I really have no way to investigate this with an Intel compiler. I'm not quite sure whether all the Foam::-namespace specifications in the funkySetFields.C are still necessary. Maybe that throws him off the track .... but that is a wild guess Bernhard |
[QUOTE=gschaider;330561
Wait a minute. Until now I was under the impression that you successfully compiled OF using the Intel compiler. Or do you mean "during the compilation of Swak this occurs in some OF/src-files" The fvCFD.H is there and there are some utilities that only have that so it should be sufficient. Looks like a problem with the template instantiation. The constant strings are used as a separate type (instead of "char *" with which i guess - havn't checked- pTraits could cope). [/QUOTE] OF compiles without any problem. The Info function are producing compiler errors all over the swak files, but nowhere in OF else... |
Swak4Foam installation on OpenFOAM2.0.x in Ubuntu 10.04
Hello,
If anyone of you have a look at the log file and tell me whats the cause of this error. please note I successfully compiled OpenFOAM2.0.x without any flaws. Is there any additional package that i needed to compile Swak4Foam ? Thanks and Regards Muthu |
OpenF
1 Attachment(s)
Logfile is attached herewith
|
Quote:
Quote:
As I said before (several times) I don't have an Intel-compiler so I'll have to ask you to try/check some stuff: - does the icc have a "gcc-compatibility"-mode? If yes: could you try that on Swak - remove all the Foam:: from funkySetFields.C, it should still compile. I don't think this is the problem but its worth the try - Am I right that the error always is for some instantiation of pTraits for a "char[N]"-variable? - Does this error happen for ALL instances of code like Info << "some text" in the sources or only in some (templates for instance) - Throw out (or comment out) EVERYTHING in funkySetFields.C except for the #includes and in the main only add a line Info << "I'm outta here" << endl; and see if it compiles. If it fails comment out the Driver-include and see if that compiles (then the problem must be somewhere in the swak-headers) Bernhard |
Quote:
Code:
SOURCE=FieldValueExpressionParser.yy ; rm -f Make/linux64GccDPOpt/FieldValueExpressionParser.C Make/linux64GccDPOpt/FieldValueExpressionParser.tab.hh; bison -ra -v -d $SOURCE ; mv *.tab.cc Make/linux64GccDPOpt/FieldValueExpressionParser.C ; sed -i.bak "s/position.hh/FieldValueExpressionParser_position.hh/" location.hh ; mv location.hh lnInclude/FieldValueExpressionParser_location.hh ; mv stack.hh lnInclude/FieldValueExpressionParser_stack.hh ; mv position.hh lnInclude/FieldValueExpressionParser_position.hh ; sed -i.bak "s/stack.hh/FieldValueExpressionParser_stack.hh/;s/location.hh/FieldValueExpressionParser_location.hh/" FieldValueExpressionParser.tab.hh ;mv *.hh lnInclude ; touch -r $SOURCE lnInclude/FieldValueExpressionParser*.hh ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPOpt -I/home/mmv/OpenFOAM/OpenFOAM-2.0.x/src/finiteVolume/lnInclude -I/home/mmv/OpenFOAM/OpenFOAM-2.0.x/src/sampling/lnInclude -I/home/mmv/OpenFOAM/OpenFOAM-2.0.x/src/triSurface/lnInclude -I/home/mmv/OpenFOAM/OpenFOAM-2.0.x/src/lagrangian/basic/lnInclude -I/home/mmv/OpenFOAM/OpenFOAM-2.0.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/mmv/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/home/mmv/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c Make/linux64GccDPOpt/FieldValueExpressionParser.C -o Make/linux64GccDPOpt/FieldValueExpressionParser.o |
Hello Bernard,
Thanks for your reply. Hereafter I will post the error part instead of sending the log files. Here is the bison version. bison++ Version 1.21.9-1, adapted from GNU bison by coetmeur@icdc.fr Maintained by Magnus Ekdahl <magnus@debian.org> |
Hello Bernard,
You are right, the bison version is old. After updating the new version i can able to compile without any flaws. Thanks for your hint. New Version: bison (GNU Bison) 2.4.1 Written by Robert Corbett and Richard Stallman. Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Also some examples from groovyBC was tested. Thanks for your contribution by maintaining this swak4Foam for various OF versions. Muthu |
Quote:
Thanks |
Greetings to all! Bernhard and Rupert, this post is for you two:
Bernhard, I think I've found the problem with Icc: the class "CommonValueExpressionDriver" is a hybrid class, with normal methods and template methods, which is something that Icc finds it too freakish to be proper code :p From Icc's point of view, if the class is meant to have template characteristics at some point, then that same class should be a template itself. This is why OpenFOAM's code follows such a strict regiment of coding (at least most of the time): template classes start with Upper case and real classes start with lower case. To isolate the problem, I commented out all of the code pertinent to "CommonValueExpressionDriver" in "funkyDoCalc". It then compiled without a problem with Icc. When I uncomment the mere include of the respective header file, Icc goes bananas and starts pointing fingers in the wrong direction. By the way, the Icc version I'm using is 12.1.0 "non-commercial" edition for Linux and Ubuntu 11.10 x86_64 with Gcc 4.6.1. I started out in trying to provide a proper fix for this, but ended up over my head, because currently I can't invest time improving my know-how of the complex world of C++ templates :( But fortunately, where there is a will, there's a sub-optimal way :D Rupert, the hack I've used with success it to do first pass with Icc on swak4foam, and then do a second pass with the following commands: Code:
( export WM_COMPILER=Gcc; cd Utilities; wclean all; wmake all ) Code:
diff --git a/Allwmake b/Allwmake Bruno |
Quote:
Quote:
Quote:
Quote:
Quote:
Bernhard |
Hi Bernhard,
Quote:
Quote:
By the way, Icc 12.1 is compatible with gcc 4.5.0, so that's pretty much why things seem to work if only the utilities are built with Gcc. Quote:
As for the utilities that don't build with Icc... indeed, only the 3 "funky*" utilities that build with the vanilla version of OpenFOAM have issues with Icc; haven't tested with -Extend, but it'll probably do the same with "funkySetAreaFields". "replayTransientBC" doesn't use that particular header, so Icc doesn't complain with it. Quote:
Code:
This offering is provided to developers who are developing software on their own time without compensation. And yes, only Linux applies for the "non-commercial" edition. But paid versions exist for: Intel® C++ Composer XE for Windows, Linux, and Mac OS* X But since nowadays Gcc has similar or better performance than Icc, so it's not as enticing to actually buy Intel's stuff :rolleyes: Best regards, Bruno |
Help with installation of swak4foam on OF 2.1
Hi, I have problem with installation of swak4foam on OF 2.1
after Allwmake in swak4Foam/ everything seems good... then in swak4Foam/Examples/InterFoamWithSources/interFoamWithSources/ after wmake: interFoamWithSources.C:49:30: fatal error: expressionSource.H: No such file or directory probably i am missing something thank you! |
Quote:
|
Thank you for the reply and for swak4foam!
well... I have a problem: I compiled again (swak4foam/Allwmake) and i checked the log... I got many errors such as In file included from GlobalVariablesRepository.H:45:0, from GlobalVariablesRepository.C:34: ExpressionResult.H:47:30: fatal error: foamVersion4swak.H: No such file or directory compilation terminated. make: *** [Make/linux64GccDPOpt/GlobalVariablesRepository.o] Error 1 In file included from ../swak4FoamParsers/lnInclude/PatchValueExpressionDriver.H:50:0, from groovyTotalPressureFvPatchScalarField.H:47, from groovyTotalPressureFvPatchScalarField.C:33: ../swak4FoamParsers/lnInclude/ExpressionResult.H:47:30: fatal error: foamVersion4swak.H: No such file or directory compilation terminated. make: *** [Make/linux64GccDPOpt/groovyTotalPressureFvPatchScalarField.o] Error 1 etc... probably i did something wrong! My steps: - svn checkout https://openfoam-extend.svn... in /opt/openfoam210/swak4foam - /opt/openfoam210/swak4foam/Allwamke i didn't move anythings thank you! Anyway, are there .deb for .dumb? |
All times are GMT -4. The time now is 14:58. |