|
[Sponsors] |
January 30, 2012, 05:47 |
|
#21 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
BTW: are your sources new or did you upgrade them with "svn update"? In that case it might be a good idea to remove the lnInclude-directories (so they will be regenerated). Although I don't think that this is the source of your problems. |
||
January 31, 2012, 07:50 |
|
#22 |
New Member
Manuele Aufiero
Join Date: Dec 2011
Location: Grenoble
Posts: 8
Rep Power: 14 |
Thank you!
I tried to install again swak4foam: no more error after ./Allwmake (in the followings you have the first lines of the output) and when compiling interFoamWithSources I had a different error (look down) maybe I made again some mistake... manu@manu-hp:/opt/openfoam210$ svn checkout https://openfoam-extend.svn.sourcefo...ies/swak4Foam/ manu@manu-hp:/opt/openfoam210/swak4Foam$ mv swakConfiguration.example swakConfiguration manu@manu-hp:/opt/openfoam210/swak4Foam$ ./Allwmake Bison is version 2.4.1 Reading variables from 'swakConfiguration' OpenFOAM-version: Major 2 Minor 1 Patch 0 No Libraries/swak4FoamParsers/foamVersion4swak.H. Generated wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file SurfacesRepository.C Making dependency list for source file SetsRepository.C Making dependency list for source file GlobalVariablesRepository.C Making dependency list for source file ExpressionDriverWriter.C Making dependency list for source file ExpressionResult.C Making dependency list for source file StoredExpressionResult.C Making dependency list for source file swakRegistryProxySurface.C Making dependency list for source file swakRegistryProxySet.C Making dependency list for source file FieldValueExpressionParser.yy could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionParser.yy Making dependency list for source file PatchValueExpressionParser.yy could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionParser.yy Making dependency list for source file SubsetValueExpressionParser.yy could not open file SubsetValueExpressionParser.tab.hh for source file SubsetValueExpressionParser.yy manu@manu-hp:/opt/openfoam210/swak4Foam/Examples/InterFoamWithSources/interFoamWithSources$ wmake |
|
January 31, 2012, 15:37 |
|
#23 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
February 1, 2012, 03:09 |
|
#24 |
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16 |
Dear gschaider,
in my case (i created this thread) the whole swak package works nicely on version 2.1. with the latest Intel Compiler thanks for your work |
|
February 1, 2012, 05:54 |
|
#25 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Seriously: Thanks for the feedback. Especially as this (Intel-compiler) is a setup I can't test Bernhard |
||
February 1, 2012, 06:38 |
|
#26 | |
New Member
Manuele Aufiero
Join Date: Dec 2011
Location: Grenoble
Posts: 8
Rep Power: 14 |
Quote:
yes, I am sorry manu@manu-hp:/opt/openfoam210/swak4Foam/Examples/InterFoamWithSources/interFoamWithSources$ wmake Making dependency list for source file interFoamWithSources.C SOURCE=interFoamWithSources.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam210/src/transportModels -I/opt/openfoam210/src/transportModels/incompressible/lnInclude -I/opt/openfoam210/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam210/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam210/src/finiteVolume/lnInclude -I../../../Libraries/swak4FoamParsers/lnInclude/ -I../../../Libraries/swakSourceFields/lnInclude/ -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/interFoamWithSources.o In file included from ../../../Libraries/swak4FoamParsers/lnInclude/FieldValueExpressionParser_location.hh:44:0, from FieldValueExpressionParser.tab.hh:65, from ../../../Libraries/swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18, from ../../../Libraries/swakSourceFields/lnInclude/expressionSource.H:45, from interFoamWithSources.C:49: position.hh: In function ‘bool parserField:perator==(const parserField:osition&, const parserField:osition&)’: position.hh:136:69: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] interFoamWithSources.C: In function ‘int main(int, char**)’: interFoamWithSources.C:90:21: error: ‘class Foam:impleControl’ has no member named ‘start’ interFoamWithSources.C:90:51: error: no ‘operator++(int)’ declared for postfix ‘++’ [-fpermissive] interFoamWithSources.C:95:42: error: ‘class Foam:impleControl’ has no member named ‘nCorr’ In file included from interFoamWithSources.C:97:0: pEqn.H:32:73: error: no matching function for call to ‘Foam:impleControl::finalInnerIter(int&, int&)’ pEqn.H:32:73: note: candidate is: /opt/openfoam210/src/finiteVolume/lnInclude/pimpleControlI.H:80:13: note: bool Foam:impleControl::finalInnerIter() const /opt/openfoam210/src/finiteVolume/lnInclude/pimpleControlI.H:80:13: note: candidate expects 0 arguments, 2 provided /opt/openfoam210/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable] make: *** [Make/linux64GccDPOpt/interFoamWithSources.o] Error 1 |
||
February 1, 2012, 15:20 |
|
#27 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The interface of the pimpleControl-class changed (for the better I guess) and is now incompatible. I currently don't have the time (especially not in a form that works with 2.1 and 2.0). Will fix it for the next release if I remember it (a Bug-report in the openfoam-extend will help) So I'm afraid you'll have to copy over the sources of the regular interFoam-solver and adapt it. As far as I remember this is only necessary in three places: - add the header for the expressionSource - create the expressionSource in createFields.H - add the expression in the PDE |
||
February 2, 2012, 05:29 |
|
#28 |
New Member
Manuele Aufiero
Join Date: Dec 2011
Location: Grenoble
Posts: 8
Rep Power: 14 |
Thanks! It works
Just 5 lines to be changed in interFoamWithSources.C and pEqn.H |
|
February 6, 2012, 07:13 |
|
#29 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
February 17, 2013, 06:59 |
|
#30 | |
Member
|
Quote:
also, I can not compile interFoamWithSources in example because of above error. how can I fix the error? Thank you in advance, Hossein |
||
February 17, 2013, 07:16 |
|
#31 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
When encountering a missing header a good hint is to search for it using something like Code:
find $FOAM_SRC -name mappedWallPolyPatch.H
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 21, 2013, 22:05 |
|
#32 |
New Member
Tsuyoshi Koyama
Join Date: Oct 2012
Posts: 6
Rep Power: 14 |
Hi.
I have problems installing swak4Foam on a linux machine. I am using the Fujitsu compiler suite. (FCCpx etc.) The error which occurs follows the same line as what was found in Mr. Fisch's post. The error below is an example from compiling the file GlobalVariableRepository.C in swak4FoamParsers. --------------------------------------- [c09006@oakleaf-fx-1 swak4FoamParsers]$ SOURCE=repositories/GlobalVariablesRepository.C ; mpiFCCpx -DS64FX -DWM_DP -O3 -Xg -w -D__INTEL_COMPILER -DNoRepository -IMake/S64FXFccDPOpt -I/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/sampling/lnInclude -I/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/triSurface/lnInclude -I/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/lagrangian/basic/lnInclude -I/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/meshTools/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -KPIC -c $SOURCE -o Make/S64FXFccDPOpt/GlobalVariablesRepository.o "/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/pTraits.H", line 53: error: not a class or struct name public PrimitiveType ^ detected during instantiation of class "Foam:Traits<PrimitiveType> [with PrimitiveType=char [48]]" at line 63 of "repositories/GlobalVariablesRepository.C" "/usr/local/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/pTraits.H", line 53: error: not a class or struct name public PrimitiveType ^ detected during instantiation of class "Foam:Traits<PrimitiveType> [with PrimitiveType=Foam::Ostream &(Foam::Ostream &)]" at line 63 of "repositories/GlobalVariablesRepository.C" --------------------------------------- I have multiple errors of this type all relating to the file pTraits.H. Further they all seem to be related with the output stream in some way, since they arise in locations where "Pout" or "endl" are specified in the code. Can anybody help me or give me a hint? Thanks in advance, Tsuyoshi Koyama Last edited by t.koyama; March 21, 2013 at 22:06. Reason: made mistake |
|
March 24, 2013, 12:34 |
|
#33 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Sorry that this sounds like snake oil. It is. But without the compiler this is the best that comes to mind
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 25, 2013, 02:25 |
|
#34 |
New Member
Tsuyoshi Koyama
Join Date: Mar 2013
Posts: 2
Rep Power: 0 |
Dear Mr Gschaider
Thank you very much for your reply. I think I have almost been able to figure out my problem. The problem seems to be related with the file "ExpressionResult.H". In this file there is a templated constructor, template<class Type> ExpressionResult( const Type &f, typename enable_if_rank0<pTraits<Type>::rank>::type* dummy=0 ); Whenever there is a line of code such as, Pout << "PRINT SOMETHING"; the character array is implicity cast into a ExpressionResult object, and then since the character array is not a class, the pTraits complains and gives an error. Additionally I have also found a problem where casting to the base class has problems. For instance in the code "StoredExpression.C", there is constructor, StoredExpressionResult::StoredExpressionResult( const StoredExpressionResult &rhs ) : ExpressionResult(rhs), name_(rhs.name_), initialValueExpression_(rhs.initialValueExpression _) { } This code somehow uses the constructor template<class Type> ExpressionResult( const Type &f, typename enable_if_rank0<pTraits<Type>::rank>::type* dummy=0 ); with Type=StoredExpressionResult instead of the constructor, //- Construct as copy ExpressionResult(const ExpressionResult&); To get rid of the compiling error I modified the file "ExpressionResult.H" by removing the "=0" in the constructor. template<class Type> ExpressionResult( const Type &f, typename enable_if_rank0<pTraits<Type>::rank>::type* dummy // typename enable_if_rank0<pTraits<Type>::rank>::type* dummy=0 ); With this modification I am able to compile the code. Could you tell me what the consequences of such a change would be. Sincerely, -Tsuyoshi Koyama |
|
March 25, 2013, 06:48 |
|
#35 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 25, 2013, 08:19 |
|
#36 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 25, 2013, 21:57 |
|
#37 |
New Member
Tsuyoshi Koyama
Join Date: Mar 2013
Posts: 2
Rep Power: 0 |
Dear Mr. Gschaider,
Thank you very much for the additional hint. I have been able to get the sprinklingInlet to work with the first modification (remove default =0). The modification that you have suggested(move the 5 template specializations and keep the =0) also compiles. Since I don't have an example of using libswak4FoamParsers.so, I am not completely sure if the library will work though. During the compilation I noticed one problem where files like "FieldValueExpressionParser.yy", which are processed first by bison and then compiled, take an extremely long time (more than 2 hours). This of course doesn't happen with my laptop running Fedora. Sincerely, -Tsuyoshi Koyama |
|
March 26, 2013, 05:27 |
|
#38 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
The problem is that the generated C-file is rather large and if the compiler tries to optimize it aggressively then it takes very long (even longer if it runs out of "real" memory and the machine starts swapping). In theory O1 (or even O0) is sufficient for that file. So one option would be to stop compilation when it gets to the parsers, copy/paste the command and replace -Ox with a smaller number. Not sure whether there is a way to automize this
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||
August 14, 2013, 10:03 |
|
#39 |
Member
Join Date: Feb 2012
Posts: 59
Rep Power: 14 |
I tried installing swak4Foam_2.x on OpenFOAM2.1.x. At the beginning, it seems a lot of files can't be found as
../solvers/swak4Foam_2.x$ wmake all No 'swakConfiguration'. Python etc won't work Checking swak4Foam-version and generating file abort: no repository found in '/home/parallels/OpenFOAM/OpenFOAM-2.1.x/applications/solvers/swak4Foam_2.x' (.hg not found)! Swak version is 0.2.4 Bison is version 2.5 Flex is version 2.5.35 (Minor version: 35) OpenFOAM-version: Major 2 Minor 1 Patch -1 (-1 == x) No swak4FoamParsers/foamVersion4swak.H. Generated wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file helpers/printSwakVersion.C Making dependency list for source file repositories/SurfacesRepository.C Making dependency list for source file repositories/MeshesRepository.C Making dependency list for source file repositories/SetsRepository.C Making dependency list for source file repositories/GlobalVariablesRepository.C Making dependency list for source file namedEnums/MeshInterpolationOrder.C Making dependency list for source file namedEnums/LogicalAccumulationNamedEnum.C Making dependency list for source file namedEnums/NumericAccumulationNamedEnum.C Making dependency list for source file ExpressionDriverWriter.C Making dependency list for source file ExpressionResult/ExpressionResult.C Making dependency list for source file ExpressionResult/StoredExpressionResult.C Making dependency list for source file ExpressionResult/DelayedExpressionResult.C Making dependency list for source file ExpressionResult/StackExpressionResult.C Making dependency list for source file ExpressionResult/StoredStackExpressionResult.C Making dependency list for source file setsAndSurfaces/swakRegistryProxySurface.C Making dependency list for source file setsAndSurfaces/swakRegistryProxySet.C Making dependency list for source file makeSwakDataEntry.C Making dependency list for source file FieldValueExpressionParser.yy could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionParser.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 PatchValueExpressionParser.yy At the end, it stopped at If compilation of the grammers takes prohibitivly long set SWAK_COMPILE_GRAMMAR_OPTION to something like -O1 FieldValueExpressionParser.tab.cc: In member function ‘parserField::FieldValueExpressionParser::token_nu mber_type parserField::FieldValueExpressionParser::yytransla te_(int)’: FieldValueExpressionParser.tab.cc:17527:24: warning: use of old-style cast [-Wold-style-cast] ^Cmake: *** wait: No child processes. Stop. make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. Parser library did not compile OK. No sense continuing as everything else depends on it How to solve it? |
|
August 14, 2013, 11:22 |
|
#40 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
export SWAK_COMPILE_GRAMMAR_OPTION=-O1
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam >>>> INSTALLATION PROBLEM | steven123 | OpenFOAM Community Contributions | 35 | January 11, 2021 17:53 |
[swak4Foam] [OpenFOAM plus] [v1612+] swak4Foam installation problem in Windows (Allwmake) | LThomes | OpenFOAM Community Contributions | 7 | October 6, 2020 14:36 |
[swak4Foam] swak4Foam 0.3.1 OF2.2.2 Installation Issue | scnsc | OpenFOAM Community Contributions | 3 | August 20, 2014 08:59 |
[swak4Foam] fails in parallel with -otherTime? | Phicau | OpenFOAM Community Contributions | 3 | June 26, 2013 14:00 |
[swak4Foam] About installation of swak4Foam | mmkr825 | OpenFOAM Community Contributions | 10 | December 14, 2012 02:24 |