Error installing swak4Foam
Dear Foamers,
I want to install swak4Foam under OF-1.6-ext. I downloaded swak4Foam using: This is the one refereed to by the Wiki-page as the development version as the link to the current version is kaputt. Going to the directory and ./Allwmake, I get: Code:
/home/hisham/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/symmTensorFieldField.C:46:1: error: no matching function for call to ‘symm(Foam::pointPatchField<Foam::SymmTensor<double> >&, const Foam::pointPatchField<Foam::SymmTensor<double> >&)’ Code:
No 'swakConfiguration'. Python etc won't work Best regards, Hisham |
Hi Hisham,
I don't have Hg+Linux nearby, so I suggest that you try the tarball version instead: Quote:
Best regards, Bruno |
Hi Bruno
Thanks a lot. How did I miss reading that? The tarball compiles smoothly as butter :D. Thanks again! Hisham |
Quote:
Libraries/swak4FoamParsers/include/swak.H comment out the line Code:
#define FOAM_SYMMTENSOR_WORKAROUND Code:
// #define FOAM_SYMMTENSOR_WORKAROUND |
Thanks Bernhard!
|
Hi all
I have OpenFOAM version 2.0.1, Bison 2.4.1, flex 2.5.35 and ubuntu 11.10. When i try to wmake all the swak4foam downloaded from tarball, I get an error message that " make: *** [Make/linuxGccDPOpt/FieldValueExpressionParser.o] Error 1 Parser library did not compile OK. No sense continuing as everything else depends on it" Can anyone help?? Thank you |
I have also tried the version on github by wyldckat.
That gives another error. "make[1]: Leaving directory `/home/achyut/swak4foam-master/Utilities/replayTransientBC' make: Target `application' not remade because of errors." Thank you |
Sorry for less info
I am getting these errors in tarball installation: Code:
No 'swakConfiguration'. Python etc won't work |
Quote:
./Allwmake >make.log do something like (depends on your shell) ./Allwmake 2>&1 >make.log |
1 Attachment(s)
Quote:
I attach a patch that implements a temporary fix and will fix it permanently in the development version: this fix doesn't compile everything, but groovyBC and funkySetFields should work (which covers in my experience 80% of the use-cases). Attachment 19861 |
Thank you very much bernhard, After applying the patch you have given it works..
|
Quote:
|
other install/compile problem of swak4foam 0.2.3
Dear All,
I have compiling problem of swak4Foam with following message after second Allwmake: No 'swakConfiguration'. Python etc won't work Checking swak4Foam-version and generating file Bison is version 2.4.1 Flex is version 2.5.35 (Minor version: 35) OpenFOAM-version: Major 2 Minor 2 Patch 0 (-1 == x) No change to swak4FoamParsers/foamVersion4swak.H SOURCE=repositories/MeshesRepository.C ; 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/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/sampling/lnInclude -I/home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/fileFormats/lnInclude -I/home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/triSurface/lnInclude -I/home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/surfMesh/lnInclude -I/home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/lagrangian/basic/lnInclude -I/home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -IlnInclude -I. -I/home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/MeshesRepository.o repositories/MeshesRepository.C: In member function 'Foam::scalar Foam::MeshesRepository::setTime(const Foam::word&, Foam::scalar, Foam::label)': repositories/MeshesRepository.C:299:59: error: no matching function for call to 'Foam::HashTable<Foam::regIOobject*>::HashTable(Fo am::HashTable<const Foam::regIOobject*, Foam::word, Foam::string::hash>)' repositories/MeshesRepository.C:299:59: note: candidates are: /home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/HashTable.C:79:1: note: Foam::HashTable<T, Key, Hash>::HashTable(const Foam::Xfer<Foam::HashTable<T, Key, Hash> >&) [with T = Foam::regIOobject*, Key = Foam::word, Hash = Foam::string::hash] /home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/HashTable.C:79:1: note: no known conversion for argument 1 from 'Foam::HashTable<const Foam::regIOobject*, Foam::word, Foam::string::hash>' to 'const Foam::Xfer<Foam::HashTable<Foam::regIOobject*> >&' /home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/HashTable.C:55:1: note: Foam::HashTable<T, Key, Hash>::HashTable(const Foam::HashTable<T, Key, Hash>&) [with T = Foam::regIOobject*, Key = Foam::word, Hash = Foam::string::hash] /home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/HashTable.C:55:1: note: no known conversion for argument 1 from 'Foam::HashTable<const Foam::regIOobject*, Foam::word, Foam::string::hash>' to 'const Foam::HashTable<Foam::regIOobject*>&' /home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/HashTableIO.C:33:1: note: Foam::HashTable<T, Key, Hash>::HashTable(Foam::Istream&, Foam::label) [with T = Foam::regIOobject*, Key = Foam::word, Hash = Foam::string::hash, Foam::label = int] /home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/HashTableIO.C:33:1: note: no known conversion for argument 1 from 'Foam::HashTable<const Foam::regIOobject*, Foam::word, Foam::string::hash>' to 'Foam::Istream&' /home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/HashTable.C:35:1: note: Foam::HashTable<T, Key, Hash>::HashTable(Foam::label) [with T = Foam::regIOobject*, Key = Foam::word, Hash = Foam::string::hash, Foam::label = int] /home/lohaszm/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/HashTable.C:35:1: note: no known conversion for argument 1 from 'Foam::HashTable<const Foam::regIOobject*, Foam::word, Foam::string::hash>' to 'int' make: *** [Make/linux64GccDPOpt/MeshesRepository.o] Error 1 Parser library did not compile OK. No sense continuing as everything else depends on it Requirements for Library not satisfied. I see no sense in going on It is on a Rocks 6.1, OF2.2, compiled on my own using gcc4.6.2. GCC is also compiled separatly in the ThirdParty directory. I do not know if this can matter... Thanks for your help! Máté |
Quote:
|
Sorry, the verison of swak4foam was given in the title :)
It was 0.2.3, I just downloaded from: http://openfoamwiki.net/images/c/c9/...e_0.2.3.tar.gz Thanks, Máté |
Quote:
Quote:
#define FOAM_LOOKUPCLASS_NO_CONST and retry. Thanks |
Hi Bernhard,
First of all, thanks for that wonderful tool swak4Foam, it's saved me tons of time for simple things. I am trying to get swak4Foam working with OF-2.2.0, and was facing same problems as Lohaz. I did apply your little patch (commenting out #define FOAM_LOOKUPCLASS_NO_CONST in Libraries/swak4FoamParsers/include/swak.H ), and now it seems to compiles OK. However, I am getting, at the beginning of the compilation output log, a bunch of messages about files not found, like: Making dependency list for source file FieldValueExpressionLexer.ll could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionLexer.ll could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionParser.yy could not open file SubsetValueExpressionParser.tab.hh for source file SubsetValueExpressionParser.yy could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionParser.yy could not open file directMappedPatchBase.H for source file PatchValueExpressionParser.yy could not open file directMappedFvPatch.H for source file FieldValueExpressionParser.yy could not open file directMappedWallFvPatch.H for source file FieldValueExpressionParser.yy could not open file directMappedPointPatch.H for source file FieldValueExpressionParser.yy could not open file FixedValuePointPatchField.H for source file FieldValueExpressionParser.yy could not open file ZeroGradientPointPatchField.H for source file FieldValueExpressionParser.yy could not open file CalculatedPointPatchField.H for source file FieldValueExpressionParser.yy Making dependency list for source file FieldValueExpressionDriver.C could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionDriver.C Making dependency list for source file PatchValueExpressionLexer.ll Making dependency list for source file PatchValueExpressionDriver.C Making dependency list for source file SubsetValueExpressionLexer.ll Making dependency list for source file SubsetValueExpressionDriver.C could not open file directMappedFvPatch.H for source file FieldValueExpressionLexer.ll could not open file directMappedWallFvPatch.H for source file FieldValueExpressionLexer.ll could not open file directMappedPointPatch.H for source file FieldValueExpressionLexer.ll could not open file FixedValuePointPatchField.H for source file FieldValueExpressionLexer.ll could not open file ZeroGradientPointPatchField.H for source file FieldValueExpressionLexer.ll could not open file CalculatedPointPatchField.H for source file FieldValueExpressionLexer.ll could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionLexer.ll could not open file directMappedPatchBase.H for source file PatchValueExpressionLexer.ll Can I ignore those or should I pull any changes from the git repository? Just wondering if these affect in any way the usage of swak4Foam. Thanks, |
Yes I compiled OF2.2.0, this can make a difference.
With your suggested change it compiles. With the second Allwmake, there is no missing file, but I woulkd also be curios what gschaider propose for the future. Use this (with the suggested commented line) version, or wait for some other resolution? Thanks for your help! Máté |
Quote:
|
Quote:
Don't see how I can resolve this if they change the API for releases with the same version numbers. So you'll have to stick with this hand-patch |
Quote:
I have download this and do the comment, //#define FOAM_LOOKUPCLASS_NO_CONST it compiles okay in my foam 2.2.0. And run funkySetFields -time 0 It works! Thanks you all you guys especially Gschaider.you did a splenedid work.! Well, I tried to make the velocity of alpha 0 field to be (0 -0.1 0) Code:
FoamFile Code:
Create time Thanks in advanvce. |
Hi sharonyue,
Quote:
Best regards, Bruno |
Quote:
(vectors, for technical reasons, have a different syntax in swak) Quote:
|
Quote:
|
1 Attachment(s)
Hello,
First at all, I want to thanks you all you guys especially Gschaider.you did a splendid work.! and many tanks for your work in swak4foam. I have update to latest version of OF (Version 2.2.0) and i have tried to install swak4foam as you mention 1º hg clone http://openfoam-extend.hg.sourceforg...tend/swak4Foam 2º hg update port 2.0.x 3º copy swakConfiguration.example to swakConfiguration 4º comment the line //#define FOAM_LOOKUPCLASS_NO_CONST 5º Compile with this result file (allwmakelog file) But when i try to use an example that run perfect in previous version of OF 2.0+swak4foam, I obtain the following error: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> FOAM FATAL ERROR: Not implemented From function simpleFunctionObject::movePoints in file simpleFunctionObject/simpleFunctionObject.H at line 160. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::functionObjectList::movePoints(Foam::polyMes h const&) at ??:? #3 Foam::polyMesh::movePoints(Foam::Field<Foam::Vecto r<double> > const&) at ??:? #4 Foam::fvMesh::movePoints(Foam::Field<Foam::Vector< double> > const&) at ??:? #5 Foam::solidBodyMotionFvMesh::update() at ??:? #6 at ??:? #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 at ??:? Abortado (`core' generado) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The controldic is: libs ( //"libOpenFOAM.so" // keeps paraFoam happy "libtwoPhaseInterfaceProperties.so" "libinterfaceProperties.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" ); functions { liquid_Vol { type swakExpression; valueType internalField; accumulations (sum); expression "alpha1*vol()"; //verbose true; //autowrite true; } }; Does anyone know how to handle this? Thanks in advance. Angel, |
Quote:
I think the problem is my fault. The new API requires that the functionObjects have methods that say "Hey. I know how to behave during mesh-movement". I said "OK. Fair enough. But I'm not sure if all my function objects are really up to it. So I'll include a dummy implementation that will blow up. So I'll know I'll have to check". And then I forgot about it. That's why it blew up in YOUR face. Quick fix: go to the file Libraries/simpleFunctionObjects/simpleFunctionObject/simpleFunctionObject.H search for the line Code:
notImplemented("simpleFunctionObject::updateMesh"); Code:
// notImplemented("simpleFunctionObject::updateMesh"); |
swak4Foam installation
1 Attachment(s)
Dear Foamers,
I have similar problems with the installation of swak4Foam, with the last version. I create a new post here http://www.cfd-online.com/Forums/ope...tml#post425801 if you prefer, or answer directly in this one. I attached the log of ./Allwmake Thank you in advance for your help! Best regards, Claudio |
swak4foam installation
1 Attachment(s)
Hi Foamers,
i failed to install Swak4Foam_release_0.2.3 on my system. I am using Openfoam 2.2.0 on Ubuntu 12.04 LTS; i installed bison 2.5 and flex 2.5.35 and i did ./Allwmake; i added my wmake.txt file. Best regards, gruenertee |
Greetings gruenertee,
According to your description, it looks like you did not read the warning sign ;) Quote:
If you do not know how or simply do not want to use SVN, then you can download the latest 0.2.4 from here: https://github.com/wyldckat/swak4foam/archive/OF22X.zip Best regards, Bruno |
wyldckat, I am very grateful for your pointing out the swak4foam version 0.2.4 for Openfoam 2.2.0; The installation process was successfully working. :rolleyes:
|
Hi All,
I tried to install swak4foam from the link: https://github.com/wyldckat/swak4foam/archive/OF22X.zip However I got the following error: I/opt/openfoam220/src/sampling/lnInclude -I/opt/openfoam220/src/meshTools/Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/funkySetFields.o -L/opt/openfoam220/platforms/linuxGccDPOpt/lib \ -lfiniteVolume -lmeshTools -L/home/basu/OpenFOAM/basu-2.2.0/platforms/linuxGccDPOpt/lib -lswak4FoamParsers -lOpenFOAM -ldl -lm -o /home/basu/OpenFOAM/basu-2.2.0/platforms/linuxGccDPOpt/bin/funkySetFields make[1]: Leaving directory `/home/basu/OpenFOAM/basu-2.2.0/Swak4Foam_2.x_release_0.2.3/Utilities/funkySetFields' Making dependency list for source file replayTransientBC.C make[1]: Entering directory `/home/basu/OpenFOAM/basu-2.2.0/Swak4Foam_2.x_release_0.2.3/Utilities/replayTransientBC' SOURCE=replayTransientBC.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/cfdTools/lnInclude -I/opt/openfoam220/src/cfdTools/general/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/replayTransientBC.o g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/cfdTools/lnInclude -I/opt/openfoam220/src/cfdTools/general/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/replayTransientBC.o -L/opt/openfoam220/platforms/linuxGccDPOpt/lib \ -lfiniteVolume -lmeshTools -lOpenFOAM -ldl -lm -o /home/basu/OpenFOAM/basu-2.2.0/platforms/linuxGccDPOpt/bin/replayTransientBC make[1]: Leaving directory `/home/basu/OpenFOAM/basu-2.2.0/Swak4Foam_2.x_release_0.2.3/Utilities/replayTransientBC' If you want to use swakCoded-function object or compile software based on swak set the environment variable SWAK4FOAM_SRC to /home/basu/OpenFOAM/basu-2.2.0/Swak4Foam_2.x_release_0.2.3/Libraries (most people will be fine without setting that variable) It would be great if anybody can provide some help.. (I am using FOAM 2.2.0, Bison 2.5, Flex 2.5.35) |
Quote:
The rest of the output looks fine. If you want to be sure rerun Allwmake. You should only see a the lines about the libraries being created and the above message |
Ok .. got it.. Thanx
|
Compilation error
1 Attachment(s)
Hey! I tried to compile swak4foam but get a lot of errors. Tried the commenting in swak.H but did not work. Any other suggestions? I use OpenFoam2.2.x and swak4foam0.2.3!
I included a part here and attached the whole error message as word. Hope somebody can help. Thanks a lot in advance! Errormessage: Quote:
|
Quote:
Anyway: the error message says that there is a installation problem with the bison-version in your ThirdParty-tools (did you add this bison yourself or does it come with the prepackaged ThirdParty-stuff?). Hard to tell what is actually the problem. I'd suggest to use the bison from the operating system |
Just did a checkout via hg and bumped into the same issue. Is there a reason for keeping around that line?
Quote:
|
Quote:
|
Quote:
Hi. What is suposed to change in this file? I have comment it (with a //), I have maintained without change and never works. I have also patched with the swak2Foam_024_OF22x_49808a1c.gz file but the compilations always crashes... Code:
... Thanks, Carlos |
Quote:
Quote:
|
1 Attachment(s)
Quote:
I'm using the version cloned from the wiki's SVN, patched and with the line mentioned on the above post commented out, and I've tried it with OpenFOAM 2.2.1 and 2.2.x I've also tried the developement version, with no luck Code:
No 'swakConfiguration'. Python etc won't work |
All times are GMT -4. The time now is 17:43. |