CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Error installing swak4Foam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree22Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2022, 18:14
Default
  #161
New Member
 
Sina
Join Date: Jul 2022
Posts: 6
Rep Power: 2
SinaMozaffari is on a distinguished road
Hi,
I'm having some problems installing swak4Foam. I'm using openfoam 2.1.1 with ubuntu 18.4 LTS. the bison version is 3.0.4, python version is 2.7.17 and the flex version is 2.6.4 but i get this error every time:
Code:
helpers/swakExprString.dep:550: recipe for target 'Make/linux64Gcc48DPOpt/swakExprString.o' failed
make: *** [Make/linux64Gcc48DPOpt/swakExprString.o] Error 1
ExpressionDriverWriter.dep:551: recipe for target 'Make/linux64Gcc48DPOpt/ExpressionDriverWriter.o' failed
make: *** [Make/linux64Gcc48DPOpt/ExpressionDriverWriter.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
I'll attach the log file in the end.
Attached Files
File Type: zip log.zip (3.0 KB, 1 views)
SinaMozaffari is offline   Reply With Quote

Old   September 20, 2022, 06:01
Default
  #162
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,224
Rep Power: 49
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by SinaMozaffari View Post
Hi,
I'm having some problems installing swak4Foam. I'm using openfoam 2.1.1 with ubuntu 18.4 LTS. the bison version is 3.0.4, python version is 2.7.17 and the flex version is 2.6.4 but i get this error every time:
Code:
helpers/swakExprString.dep:550: recipe for target 'Make/linux64Gcc48DPOpt/swakExprString.o' failed
make: *** [Make/linux64Gcc48DPOpt/swakExprString.o] Error 1
ExpressionDriverWriter.dep:551: recipe for target 'Make/linux64Gcc48DPOpt/ExpressionDriverWriter.o' failed
make: *** [Make/linux64Gcc48DPOpt/ExpressionDriverWriter.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
I'll attach the log file in the end.

Wow. OF 2.1. I'm getting nostalgic (oldest version I currently test with is 2.3)



I think that it is more the compiler (gcc 4.2 isn't the youngest kid on the block). Anyway. Try this. Go to the file Libraries/repositories/SetsRepository.C line 48 and replace
Code:
 typedef Foam::writer<scalar> writerType;
with

Code:
 typedef Foam::writer<Foam::scalar> writerType;
Let me know if that fixes the problem
__________________
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
gschaider is offline   Reply With Quote

Old   September 20, 2022, 12:39
Default
  #163
New Member
 
Sina
Join Date: Jul 2022
Posts: 6
Rep Power: 2
SinaMozaffari is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Wow. OF 2.1. I'm getting nostalgic (oldest version I currently test with is 2.3)



I think that it is more the compiler (gcc 4.2 isn't the youngest kid on the block). Anyway. Try this. Go to the file Libraries/repositories/SetsRepository.C line 48 and replace
Code:
 typedef Foam::writer<scalar> writerType;
with

Code:
 typedef Foam::writer<Foam::scalar> writerType;
Let me know if that fixes the problem
Yeah I know : D I usually use OF3.01 but in this case I want to run a code that someone else did and it's with OF2.1.1 so I'm kinda have to : D
I did what you said but it didn't work. Although the end of the error is the same as before but it seems it's a different one! It has fewer lines so something has changed but I can't understand what.
I'll attach the new log file in the end.
Thank you so much for your help.
Attached Files
File Type: zip log.zip (2.8 KB, 1 views)
SinaMozaffari is offline   Reply With Quote

Old   September 21, 2022, 05:20
Default
  #164
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,224
Rep Power: 49
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by SinaMozaffari View Post
Yeah I know : D I usually use OF3.01 but in this case I want to run a code that someone else did and it's with OF2.1.1 so I'm kinda have to : D
I did what you said but it didn't work. Although the end of the error is the same as before but it seems it's a different one! It has fewer lines so something has changed but I can't understand what.
I'll attach the new log file in the end.
Thank you so much for your help.

Make an Allwclean and make sure that Library/swak4Foam/lnInclude is removed. This looks like something were the compilation was aborted and at the second run bison did not generate the necessary files
__________________
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
gschaider is offline   Reply With Quote

Old   September 21, 2022, 13:22
Default
  #165
New Member
 
Sina
Join Date: Jul 2022
Posts: 6
Rep Power: 2
SinaMozaffari is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Make an Allwclean and make sure that Library/swak4Foam/lnInclude is removed. This looks like something were the compilation was aborted and at the second run bison did not generate the necessary files
I did what you said but it didn't work. same error.
Attached Files
File Type: zip log.zip (4.2 KB, 1 views)
SinaMozaffari is offline   Reply With Quote

Old   September 21, 2022, 18:11
Default
  #166
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,224
Rep Power: 49
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by SinaMozaffari View Post
I did what you said but it didn't work. same error.
No. This is not the same error. This has to do with the symmTensor-class. There were some subtle changes there in the past. Subtle means: hard to fix


Anyway: you said that you need 2.1 because the project was done with that. Question: you're using swak because it was used then as well? In that case you don't need the new features of swak and you'll have to do some history


1. run ./Allwclean (always do that before changing the version)
2. check the version history in the README what was the version at the time of the original project (I always date the versions there)
3. run "hg tags" and look for the tag for that version

4. change to that version with "hg update vVersionTagName"
5. compile
__________________
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
gschaider is offline   Reply With Quote

Old   September 23, 2022, 01:53
Default
  #167
New Member
 
Sina
Join Date: Jul 2022
Posts: 6
Rep Power: 2
SinaMozaffari is on a distinguished road
Hi,
Quote:
Originally Posted by gschaider View Post
No. This is not the same error. This has to do with the symmTensor-class. There were some subtle changes there in the past. Subtle means: hard to fix


Anyway: you said that you need 2.1 because the project was done with that. Question: you're using swak because it was used then as well? In that case you don't need the new features of swak and you'll have to do some history


1. run ./Allwclean (always do that before changing the version)
2. check the version history in the README what was the version at the time of the original project (I always date the versions there)
3. run "hg tags" and look for the tag for that version

4. change to that version with "hg update vVersionTagName"
5. compile
Yes, I believe so. When I run Allrun command, I get a couple of errors regarding swak, like:
Code:
FOAM Warning : 
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
    could not load "libsimpleSwakFunctionObjects.so"
I will attach the log.blockMesh file in the end for more information. Based on this I think the reason that I can't get the right results from running the code is that I don't have swak installed. Is my assumption wrong?

I checked but there is no README file for that project and when I run "hg tags" in the project folder and swak folder I get this error:
Code:
abort: no repository found in '/home/sina/Desktop/elec-RisingBubble' (.hg not found)!
Code:
abort: no repository found in '/home/sina/OpenFOAM/sina-2.1.1/openfoam-extend-swak4Foam' (.hg not found)!
I don't know if I'm doing it wrong or not!
Attached Files
File Type: zip log.zip (1.3 KB, 1 views)
SinaMozaffari is offline   Reply With Quote

Old   September 25, 2022, 15:45
Default
  #168
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,224
Rep Power: 49
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by SinaMozaffari View Post
Hi,

Yes, I believe so. When I run Allrun command, I get a couple of errors regarding swak, like:
Code:
FOAM Warning : 
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
    could not load "libsimpleSwakFunctionObjects.so"
I will attach the log.blockMesh file in the end for more information. Based on this I think the reason that I can't get the right results from running the code is that I don't have swak installed. Is my assumption wrong?

I checked but there is no README file for that project and when I run "hg tags" in the project folder and swak folder I get this error:
Code:
abort: no repository found in '/home/sina/Desktop/elec-RisingBubble' (.hg not found)!
Code:
abort: no repository found in '/home/sina/OpenFOAM/sina-2.1.1/openfoam-extend-swak4Foam' (.hg not found)!
I don't know if I'm doing it wrong or not!

Where did you get the sources from?
__________________
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
gschaider is offline   Reply With Quote

Old   September 30, 2022, 05:03
Default
  #169
New Member
 
Sina
Join Date: Jul 2022
Posts: 6
Rep Power: 2
SinaMozaffari is on a distinguished road
Hi
Quote:
Originally Posted by gschaider View Post
Where did you get the sources from?
If you are referring to the project that I'm working on, I got it from a fellow student. I will attach the project and upload its solver in the end.
If not, I installed Openfoam from here:
https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04

And I got the swak4foam package from here:
https://sourceforge.net/p/openfoam-e...evelop/tarball

https://www.mediafire.com/file/g8vy5...2.1.1.zip/file
Attached Files
File Type: zip elec-RisingBubble.zip (20.3 KB, 0 views)
SinaMozaffari is offline   Reply With Quote

Old   September 30, 2022, 06:27
Default
  #170
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,224
Rep Power: 49
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by SinaMozaffari View Post
Hi

If you are referring to the project that I'm working on, I got it from a fellow student. I will attach the project and upload its solver in the end.
If not, I installed Openfoam from here:
https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04

And I got the swak4foam package from here:
https://sourceforge.net/p/openfoam-e...evelop/tarball

https://www.mediafire.com/file/g8vy5...2.1.1.zip/file

Ah. You got a tarball. Well. Specific tags (versions) you can get from here



https://sourceforge.net/p/openfoam-e.../default/tags/


Check in the "History"-section of https://sourceforge.net/p/openfoam-e...tree/README.md what was the released version at the time and then click on the appropriate tag and download that snapshot (then you should get a tarball with swak at that time)
lth likes 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
gschaider is offline   Reply With Quote

Old   October 23, 2022, 14:51
Default Issues compiling swak4foam w/OF6 /Ubuntu 18.04
  #171
lth
Member
 
lth's Avatar
 
lth
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 37
Blog Entries: 37
Rep Power: 15
lth is on a distinguished road
Hi Everyone, I posted an issue on another thread but not sure it was the correct thread as there are a few that seem similar.

https://www.cfd-online.com/Forums/openfoam-community-contributions/221035-problems-compilation-swak4foam-debian-openfoam-7-a.html#post838011

I am trying to follow the advice out here and am running openfoam 6 from Ubuntu 18_04
Installed
bison (GNU Bison) 3.0.4, flex 2.6.4, and mercurial (/snap/bin/mercurial)
then:
>>hg clonehttp://hg.code.sf.net/p/openfoam-extend/swak4Foam-u develop
>>cd swak4Foam
>>./maintainanceScripts/compileRequirements.sh
>>./Allwmake (or ./AllwmakeAll > log.AllwmakeAll)

log.AllwmakeAll portions include:

<<Bison already installed/compiled Bison successfully compiled Lua already installed/compiled Lua successfully compiled Add /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements/bin to PATH-variable. The ./Allwmake-script will use this directory automatically Current OpenFOAM version is 6. This is a clean install /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison) Reading variables from 'swakConfiguration' Looking for Python 2 Looking for Python 3 Using our own Lua at /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements Checking swak4Foam-version and generating file Swak version is 202x.yy.0 hg info: 481d96f16780 (develop) tip No 'bear' installed Bison: /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements/bin/bison Flex: /usr/bin/flex Bison at /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements/bin/bison is version 3.4 (Major 3 Minor 4) Flex is version 2.6.4 (Minor version: 4) No swak4FoamParsers/foamVersion4swak.H. Generated << Make/linux64GccDPInt32Opt/repositories/SetsRepository.o
/opt/openfoam6/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/repositories/SetsRepository.o' failed Parser library did not compile OK. No sense continuing as everything else depends on it >>


Troubleshooting included multiple attempts and several restarting of Ubuntu and running an openfoam6 case.
Also
>>wmake Utilities/funkySetFields > log.Util_funkySetF
>>ls $FOAM_USER_APPBIN" to check if swak4foam is correctly compiled. (no swak4foam listed)
>>ls $FOAM_USER_LIBBIN" gives: ls: cannot access '/home/ltholmes/OpenFOAM/ltholmes-6/platforms/linux64GccDPInt32Opt/lib and ls': No such file or directory

PS: I installed bear 2.3.11 after posting and re-installed but errors in log remain the same.

Would anyone be able to see the error of my installing ways? I'd love to get funkySetFields working.

Thank you, LTH
lth is offline   Reply With Quote

Old   October 23, 2022, 15:34
Default
  #172
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,224
Rep Power: 49
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by lth View Post
Hi Everyone, I posted an issue on another thread but not sure it was the correct thread as there are a few that seem similar.

https://www.cfd-online.com/Forums/openfoam-community-contributions/221035-problems-compilation-swak4foam-debian-openfoam-7-a.html#post838011

I am trying to follow the advice out here and am running openfoam 6 from Ubuntu 18_04
Installed
bison (GNU Bison) 3.0.4, flex 2.6.4, and mercurial (/snap/bin/mercurial)
then:
>>hg clonehttp://hg.code.sf.net/p/openfoam-extend/swak4Foam-u develop
>>cd swak4Foam
>>./maintainanceScripts/compileRequirements.sh
>>./Allwmake (or ./AllwmakeAll > log.AllwmakeAll)

log.AllwmakeAll portions include:

<<Bison already installed/compiled Bison successfully compiled Lua already installed/compiled Lua successfully compiled Add /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements/bin to PATH-variable. The ./Allwmake-script will use this directory automatically Current OpenFOAM version is 6. This is a clean install /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison) Reading variables from 'swakConfiguration' Looking for Python 2 Looking for Python 3 Using our own Lua at /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements Checking swak4Foam-version and generating file Swak version is 202x.yy.0 hg info: 481d96f16780 (develop) tip No 'bear' installed Bison: /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements/bin/bison Flex: /usr/bin/flex Bison at /home/ltholmes/OpenFOAM/ltholmes-6/swak4Foam/privateRequirements/bin/bison is version 3.4 (Major 3 Minor 4) Flex is version 2.6.4 (Minor version: 4) No swak4FoamParsers/foamVersion4swak.H. Generated << Make/linux64GccDPInt32Opt/repositories/SetsRepository.o
/opt/openfoam6/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/repositories/SetsRepository.o' failed Parser library did not compile OK. No sense continuing as everything else depends on it >>


Troubleshooting included multiple attempts and several restarting of Ubuntu and running an openfoam6 case.
Also
>>wmake Utilities/funkySetFields > log.Util_funkySetF
>>ls $FOAM_USER_APPBIN" to check if swak4foam is correctly compiled. (no swak4foam listed)
>>ls $FOAM_USER_LIBBIN" gives: ls: cannot access '/home/ltholmes/OpenFOAM/ltholmes-6/platforms/linux64GccDPInt32Opt/lib and ls': No such file or directory

PS: I installed bear 2.3.11 after posting and re-installed but errors in log remain the same.

Would anyone be able to see the error of my installing ways? I'd love to get funkySetFields working.

Thank you, LTH
Hi!


The last error message indicates that the problem occurred during compiling SetRepository.C. In recent development versions I had to adapt this so that it compiles with more recent OF-versions and this might have broken support for older versions. I'll look into this as soon as I have a working OF6-version


Anyway. A quick fix for you might be to roll back the sources with "hg update v0.4.2" to a version that is known to compile with OF6 (it is quite old but the functionality of funkySetFields and groovyBC has been the same for some years). Would be good to clear old compilation artefacts before that (use ./Allwclean and remove the privateRequirements-directory). Then try ./AllwmakeAll again


Bernhard
__________________
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
gschaider is offline   Reply With Quote

Old   October 23, 2022, 19:26
Default
  #173
lth
Member
 
lth's Avatar
 
lth
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 37
Blog Entries: 37
Rep Power: 15
lth is on a distinguished road
Hi Bernhard,



Thank you very much!!! This was the solution and I really appreciate your support.

I tested and funkySetFields appears to be running (i am learning it). :0)


PS: The compile log file I can send for your insights if it helps.
lth is offline   Reply With Quote

Reply

Tags
compile error, swak4foam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
InterDyMFoam+simpleFunctionObject Elham OpenFOAM Running, Solving & CFD 5 July 10, 2017 12:59
[swak4Foam] and twoPhaseEulerFoam mnikku OpenFOAM Community Contributions 1 February 19, 2016 06:21
source term in near wall cell rajcfd OpenFOAM Pre-Processing 5 February 1, 2016 11:31
[swak4Foam] Install swak4Foam on OpenFOAM1.7.1 on Ubuntu 13.04 kobayashi OpenFOAM Community Contributions 2 January 5, 2014 18:33
[swak4Foam] fails in parallel with -otherTime? Phicau OpenFOAM Community Contributions 3 June 26, 2013 14:00


All times are GMT -4. The time now is 07:26.