|
[Sponsors] |
[swak4Foam] Difficulties compiling with OpenFOAM v5.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 6, 2017, 10:09 |
Difficulties compiling with OpenFOAM v5.0
|
#1 |
New Member
Maurício Guilherme Alves dos Reis
Join Date: Feb 2015
Posts: 10
Rep Power: 11 |
Hi all,
Is it possible to compile swak4foam for OpenFOAM 5.0? I'm using this version https://sourceforge.net/p/openfoam-e.../develop/tree/. |
|
October 6, 2017, 10:53 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
(if you look at the commit-messages in your link you see a lot of "5.0" there)
__________________
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 |
||
October 23, 2017, 10:07 |
|
#3 |
New Member
Esmaeel Eftekharian
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 16
Rep Power: 10 |
Hi Bernhard,
I desperately need to use openFOAM version 5 because of its ability in water wave modeling. I do need funkySetField to initialize water phase. However, swak4foam is not installed on openFOAM 5. I receive an errorr as below: "Requirements for Library not satisfied. I see no sense in going on Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard". Is there any way to install swak4foam or at least funkySetField on OpenFOAM 5? |
|
October 23, 2017, 14:43 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The compilation process should complain about something else above the error message that you posted. THAT would be the interesting error message
__________________
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 |
||
January 10, 2018, 06:10 |
|
#5 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
Tried to compile swak4Foam for OF5.0, but doesn't seem to work. Here is the log of the Allwmake process (attached) Could someone please point as to what it is that I am missing and that is causing the error? Also, I think the instructions page needs to be amended slightly from: Code:
hg update development Code:
hg update develop Cheers, Antimony P.S. Apologies, I wanted to post the output here as code but encountered errors saying that the number of characters is too many. Hence it is being attached instead. And since the size of the log file exceeded allowed limit, it is being uploaded as a zip file. |
|
January 10, 2018, 06:55 |
|
#6 |
New Member
Panchatcharam Mariappan
Join Date: Apr 2014
Posts: 17
Rep Power: 12 |
Dear Antimony,
All error in your log file says, it is missing the libradiationModels.so file. Could you have a quick look at your openfoam5/platform directory (in my system it is under /opt/openfoam5/platforms/linux64GccDPInt32/lib). If libradiationModels.so is missing, then there should be an error at your openfoam5 installation. Try to recompile the thermoPhysicalModels under src directory and do check if that works. Regard Panchatcharam |
|
January 11, 2018, 00:51 |
|
#7 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Dear Panchatcharam,
Thanks! That seemed to do the trick - when OF5 was installed, apparently this library had been missed out. Since the installation was done by admin, I copied the thermoPhysicalModels to my local/user OpenFOAM directory, compiled it, added it to LD_LIBRARY_PATH. And it worked! Cheers, Antimony |
|
March 9, 2018, 05:52 |
|
#8 |
New Member
Saicharan
Join Date: Jan 2018
Location: Bangalore, India
Posts: 29
Rep Power: 8 |
I am unable to find swak4Foam for OpenFOAM v5.0. I guess it is not available. If possible, kindly let me know if there is any other way to add a setFields for a scalar depending on an expression.
Thanks in advance. |
|
March 9, 2018, 06:16 |
|
#9 |
New Member
Panchatcharam Mariappan
Join Date: Apr 2014
Posts: 17
Rep Power: 12 |
People have already used swak4Foam in OF5. You could try
Code:
hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam hg update develop Code:
git checkout branches/develop All the best |
|
May 15, 2018, 08:48 |
|
#10 |
New Member
Fahime Firoozpour
Join Date: Jan 2018
Posts: 10
Rep Power: 8 |
I try to install swak4foam for openfoam5 but got this error. can anyone help me with this error?
-o Make/linux64GccDPInt32Opt/helpers/exprString.o In file included from lnInclude/CommonValueExpressionDriver.H:847:0, from helpers/exprString.C:39: lnInclude/CommonValueExpressionDriverI.H: In member function ‘bool Foam::CommonValueExpressionDriver::updateSet(Foam: :autoPtr<T>&, const Foam::word&, Foam::CommonValueExpressionDriver::SetOrigin) const’: lnInclude/CommonValueExpressionDriverI.H:326:32: error: ‘class Foam::IOobject’ has no member named ‘headerOk’ header.headerOk() ^ lnInclude/CommonValueExpressionDriverI.H:336:43: error: ‘class Foam::IOobject’ has no member named ‘filePath’ << header.filePath() ^ /opt/openfoam5/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/helpers/exprString.o' failed make: *** [Make/linux64GccDPInt32Opt/helpers/exprString.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 Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard Last edited by wyldckat; October 7, 2018 at 09:53. Reason: accidental double post |
|
May 16, 2018, 16:08 |
|
#11 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Which version of swak4Foam are you using? Currently only the develop-branch compiles with OF 5.0. See https://openfoamwiki.net/index.php/C...am#Development
__________________
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 |
||
May 24, 2018, 04:44 |
Difficulties compiling with OpenFOAM v5.0
|
#12 |
Member
Shailesh BG
Join Date: Aug 2017
Location: Bangalore
Posts: 39
Rep Power: 9 |
Hello All,
I am trying to install swak4foam for openFoam v5.0, these are the steps that I followed: Dependencies: 1) Bison : bison (GNU Bison) 3.0.4 I tried with an older version (2.7), but it said swak4foam development version works with bison version >=3 2) Flex: flex 2.6.0 The first few lines of log file read: Code:
Current OpenFOAM version is 5.0. Previously compiled for OpenFOAM (5.0) No file 'swakConfiguration'. Python etc won't work. See README for details Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems Checking swak4Foam-version and generating file Swak version is 0.4.2 abort: there is no Mercurial repository here (.hg not found) Could not get version of the sources Bison: /usr/bin/bison Flex: /usr/bin/flex Bison is version 3.0.4 Flex is version 2.6.0 (Minor version: 0) OpenFOAM-version: Major 5 Minor 0 Patch 0 (-1 == x / 0) Fork: org No change to swak4FoamParsers/foamVersion4swak.H 1) I tried downloading from the Mercurial development repository. 2) Manually download a snapshot from the Mercurial interface at Sourceforge.net. 3) Mirror Git repository Tried installing by running Code:
./Allwmake > log.make 2>&1 Error: Code:
../../Libraries/swak4FoamParsers/lnInclude/preloadFieldsFunction.H:65:13: error: no matching function for call to ‘Foam::IOobject::typeHeaderOk(bool, bool, bool)’ if ^ In file included from /opt/openfoam5/src/OpenFOAM/lnInclude/regIOobject.H:41:0, from /opt/openfoam5/src/OpenFOAM/lnInclude/objectRegistry.H:39, from /opt/openfoam5/src/OpenFOAM/lnInclude/Time.H:42, from /opt/openfoam5/src/finiteVolume/lnInclude/fvCFD.H:6, from funkyDoCalc.C:42: /opt/openfoam5/src/OpenFOAM/lnInclude/IOobject.H:433:18: note: candidate: template<class Type> bool Foam::IOobject::typeHeaderOk(bool) bool typeHeaderOk(const bool checkType = true); ^ /opt/openfoam5/src/OpenFOAM/lnInclude/IOobject.H:433:18: note: template argument deduction/substitution failed: In file included from funkyDoCalc.C:296:0: ../../Libraries/swak4FoamParsers/lnInclude/preloadFieldsFunction.H:65:13: note: candidate expects 1 argument, 3 provided if ^ ../../Libraries/swak4FoamParsers/lnInclude/preloadFieldsFunction.H: In instantiation of ‘void preLoadFieldsFunction(const Foam::DynamicList<Foam::fvMesh*>&, const wordList&, Foam::PtrList<T>&) [with FieldType = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::wordList = Foam::List<Foam::word>]’: funkyDoCalc.C:472:13: required from here ../../Libraries/swak4FoamParsers/lnInclude/preloadFieldsFunction.H:65:13: error: no matching function for call to ‘Foam::IOobject::typeHeaderOk(bool, bool, bool)’ Code:
/opt/openfoam5/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/funkyDoCalc.o' failed make[1]: *** [Make/linux64GccDPInt32Opt/funkyDoCalc.o] Error 1 make[1]: Leaving directory '/home/shailesh/OpenFOAM/shailesh-5.0/run/swak4Foam/Utilities/funkyDoCalc' /opt/openfoam5/wmake/makefiles/apps:39: recipe for target 'funkyDoCalc' failed make: *** [funkyDoCalc] Error 2 I had both openFoam v4.0 and v5.0 installed on my system, was working with aliases to access them. Before trying to install swak I deleted v4.0 and removed the aliases from my ./bashrc and I am using zsh now. I am not sure if this is the source of the errors. Thanks and regards, Shailesh
__________________
Regards, Shailesh |
|
September 8, 2018, 10:09 |
|
#13 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hi,
I'm trying to compile swak4Foam in OF5.0 and after all the processes mentioned in that forum topic, I got the following error: Quote:
|
||
September 11, 2018, 17:41 |
|
#14 | |
New Member
Soledad Fioroni
Join Date: Jun 2018
Posts: 1
Rep Power: 0 |
Hi,
I'm having trouble compiling swak4Foam as well. Swak version is 0.4.2 Bison is version 3.0.4 Flex is version 2.6.4 OpenFOAM-version: 5.0 This is basically the error message I get. However, I attach the log file for practical purposes. Quote:
Thank you very much in advance Sole |
||
November 26, 2018, 23:56 |
|
#15 | |
New Member
Leandro
Join Date: Sep 2018
Location: Colombia
Posts: 4
Rep Power: 8 |
Quote:
Hello Soledad and Guilherme. I have the same error of you, could you solve it? if you could, how? Could you please help? I attach my log file. Thanks Leandro |
||
November 27, 2018, 06:39 |
|
#16 | ||
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Quote:
I solved this problem by modifying lines 1271 through 1282 in the /swak4Foam/Libraries/swak4FoamParsers/CommonValueExpressionDriver.C file. Quote:
|
|||
November 30, 2018, 14:34 |
solved
|
#17 |
New Member
Abbas Tavakolinik
Join Date: Nov 2018
Posts: 1
Rep Power: 0 |
||
December 5, 2018, 03:44 |
|
#18 | |
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
Thanks this makes swak4foam compile with OpenFOAM-5. If this is really the correct fix, the change should look probably like the following: Code:
--- Libraries/swak4FoamParsers/CommonValueExpressionDriver.C 2018-11-07 13:11:41.418290528 +0100 +++ Libraries/swak4FoamParsers/CommonValueExpressionDriver.C 2018-12-05 08:07:08.303401756 +0100 @@ -1273,9 +1273,6 @@ #ifdef FOAM_RANDOM_CLASS_NEW_INTERFACE const_cast<scalar&>(result()[i]) = rnd.GaussNormal<scalar>(); #else -#ifdef FOAM_RANDOM_CLASS_GAUSS_RENAMED - const_cast<scalar&>(result()[i]) = rnd.scalarNormal(); -#else const_cast<scalar&>(result()[i]) = rnd.GaussNormal(); #endif #endif Probably instead the if clause defining FOAM_RANDOM_CLASS_GAUSS_RENAMED in Libraries/swak4FoamParsers/include/swak.H should be like: Code:
--- Libraries/swak4FoamParsers/include/swak.H 2018-11-07 13:06:13.534290528 +0100 +++ Libraries/swak4FoamParsers/include/swak.H 2018-12-05 08:28:17.381623756 +0100 @@ -546,7 +546,7 @@ #define FOAM_RANDOM_CLASS_NEW_INTERFACE #endif -#if (defined(FOAM_VERSION4SWAK_IS_ORG) && FOAM_VERSION4SWAK>=VERSION_NR(5,0,0)) +#if (defined(FOAM_VERSION4SWAK_IS_ORG) && FOAM_VERSION4SWAK>=VERSION_NR(6,0,0)) #define FOAM_RANDOM_CLASS_GAUSS_RENAMED #endif No C++ programmer though thus I don't know whats the difference between Code:
const_cast<scalar&>(result()[i]) = rnd.GaussNormal<scalar>() Code:
const_cast<scalar&>(result()[i]) = rnd.GaussNormal() |
||
December 27, 2018, 18:49 |
|
#19 |
New Member
Leandro
Join Date: Sep 2018
Location: Colombia
Posts: 4
Rep Power: 8 |
||
October 16, 2019, 01:58 |
I really need your help!
|
#20 |
New Member
chunping ren
Join Date: May 2016
Posts: 8
Rep Power: 10 |
I met the problems which are same to you ever. Have you solved them? Could you help me?
openfoam 5 has been installed on my computer. The installation steps as follows: 1. mkdir -p $FOAM_RUNcd "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION" 2.svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam/ swak4Foam_2.x 3. ./Allwmake 4. ./maintainanceScripts/compileRequirements.sh 5. ./Allwmake Previously compiled for OpenFOAM (5.0) /home/rcp/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison) No file 'swakConfiguration'. Python etc won't work. See README for details Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems Checking swak4Foam-version and generating file Swak version is 0.4.1 Bison is version 2.7.12-4996 Flex is version 2.5.35 (Minor version: 35) OpenFOAM-version: Major 5 Minor 0 Patch 0 (-1 == x / 0) Fork: openfoam No change to swak4FoamParsers/foamVersion4swak.H wmake libso swak4FoamParsers g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPInt32Opt -I/opt/openfoam5/src/finiteVolume/lnInclude -I/opt/openfoam5/src/surfMesh/lnInclude -I/opt/openfoam5/src/sampling/lnInclude -I/opt/openfoam5/src/fileFormats/lnInclude -I/opt/openfoam5/src/triSurface/lnInclude -I/opt/openfoam5/src/dynamicMesh/lnInclude -I/opt/openfoam5/src/lagrangian/basic/lnInclude -I/opt/openfoam5/src/surfMesh/lnInclude -I/opt/openfoam5/src/meshTools/lnInclude -I../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/ -IlnInclude -I. -I/opt/openfoam5/src/OpenFOAM/lnInclude -I/opt/openfoam5/src/OSspecific/POSIX/lnInclude -fPIC -c helpers/exprString.C -o Make/linux64GccDPInt32Opt/helpers/exprString.o In file included from lnInclude/CommonValueExpressionDriver.H:847:0, from helpers/exprString.C:39: lnInclude/CommonValueExpressionDriverI.H: In member function ‘bool Foam::CommonValueExpressionDriver::updateSet(Foam: :autoPtr<T>&, const Foam::word&, Foam::CommonValueExpressionDriver::SetOrigin) const’: lnInclude/CommonValueExpressionDriverI.H:326:32: error: ‘class Foam::IOobject’ has no member named ‘headerOk’ header.headerOk() ^ lnInclude/CommonValueExpressionDriverI.H:336:43: error: ‘class Foam::IOobject’ has no member named ‘filePath’ << header.filePath() ^ make: *** [Make/linux64GccDPInt32Opt/helpers/exprString.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 Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard thanks in advance. Chunping Ren |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting Started with OpenFOAM | wyldckat | OpenFOAM | 26 | June 21, 2024 07:54 |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
[OpenFOAM.com] Compiling v1806 from source | Sgs | OpenFOAM Installation | 10 | January 20, 2019 21:46 |
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | January 5, 2016 04:18 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |