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

[swak4Foam] swak4foam for OpenFOAM 4.0

Register Blogs Community New Posts Updated Threads Search

Like Tree28Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2016, 12:37
Default
  #41
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by mnikku View Post
Code:
Requirements for Library not satisfied. I see no sense in going on
Typically you find some kind of error message(s) before this line.
In my case, it gave an error on missing files uLabelSpecific.H and also staticAssert.H in file Make/linux64GccDPOpt/../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/outputFilterOutputControl.C.dep. I simply removed references to those files and the compilation was ok.
There might be other methods and I'm not at all sure you should do it like I did...
Even for me, I needed to remove uLabelSpecific entry from filesThatAreOnlyInSomeDistributions/OutputFileDropin/outputFilterOutputControl.C.dep


Tested with 4.x version, last commit: c590630ab07
rdbisme is offline   Reply With Quote

Old   October 31, 2016, 18:09
Default
  #42
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by tidusuper91 View Post
Even for me, I needed to remove uLabelSpecific entry from filesThatAreOnlyInSomeDistributions/OutputFileDropin/outputFilterOutputControl.C.dep


Tested with 4.x version, last commit: c590630ab07
Editing .dep-files does not help as these are computer-generated. Did you start from a clean source tree or at least try ./Allwclean before compiling (that removes all .dep-files among other things)
__________________
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 31, 2016, 18:11
Default
  #43
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Editing .dep-files does not help as these are computer-generated. Did you start from a clean source tree or at least try ./Allwclean before compiling (that removes all .dep-files among other things)
I did a wlclean all and a ./Allwclean but the dep file was not cleared (or it was generated in the same "wrong" way).

Did not try from the clean source tree though. Swak4Foam is btw working as expected with my case.
rdbisme is offline   Reply With Quote

Old   November 14, 2016, 07:11
Default
  #44
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
@gschaider

I successfully compiled swak4foam for OF 4.x on a Fedora FC13 machine. I'm now trying to compile 4.x + swak on the cluster that is a CentOS 5 machine.

I re-downloaded OF 4.x from the github sources so it can be on a different commit. When I start the swak4foam ./Allwmake script what I get is:

Code:
In file included from ../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/outputFilterOutputControl.C:26:0:
lnInclude/swak.H:52:2: error: #error "This swak4Foam-version is only used for the 2.x-versions of OpenFOAM. For lower versions there is a special branch"
 #error "This swak4Foam-version is only used for the 2.x-versions of OpenFOAM. For lower versions there is a special branch"
Where the version of OF is checked?
rdbisme is offline   Reply With Quote

Old   November 14, 2016, 09:08
Default
  #45
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by tidusuper91 View Post
@gschaider

I successfully compiled swak4foam for OF 4.x on a Fedora FC13 machine. I'm now trying to compile 4.x + swak on the cluster that is a CentOS 5 machine.

I re-downloaded OF 4.x from the github sources so it can be on a different commit. When I start the swak4foam ./Allwmake script what I get is:

Code:
In file included from ../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/outputFilterOutputControl.C:26:0:
lnInclude/swak.H:52:2: error: #error "This swak4Foam-version is only used for the 2.x-versions of OpenFOAM. For lower versions there is a special branch"
 #error "This swak4Foam-version is only used for the 2.x-versions of OpenFOAM. For lower versions there is a special branch"
Where the version of OF is checked?
A script generates a file Libraries/swak4FoamParser/foamVersion4swak.H. In the case of the aobve error message it checks for FOAM_VERSION4SWAK_MAJOR.

Could you check which content was written to that file?
__________________
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   November 15, 2016, 07:30
Default
  #46
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by gschaider View Post
A script generates a file Libraries/swak4FoamParser/foamVersion4swak.H. In the case of the aobve error message it checks for FOAM_VERSION4SWAK_MAJOR.

Could you check which content was written to that file?
Well that header file is empty

[EDIT] Workin on it.

The problem is that on the cluster Python 2.4.3 is installed and the for Python script makeFoamVersionHeader.py has not format method for strings (line 146).

[EDIT 2]
The solution was to load the module with a more modern Python version
Code:
module load python/2.7.5
I would perhaps suggest to use the "old" version to fill strings with variables that should compatible with both old and new Pythons. I'm Working on a possible patch.
rdbisme is offline   Reply With Quote

Old   November 15, 2016, 08:41
Default
  #47
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by tidusuper91 View Post
Well that header file is empty

[EDIT] Workin on it.

The problem is that on the cluster Python 2.4.3 is installed and the for Python script makeFoamVersionHeader.py has not format method for strings (line 146).

[EDIT 2]
The solution was to load the module with a more modern Python version
Code:
module load python/2.7.5
I would perhaps suggest to use the "old" version to fill strings with variables that should compatible with both old and new Pythons. I'm Working on a possible patch.
I'm not sure whether it is possible to support Python 3 and Python 2.4 in the same file (I just remember that I had to drop 2.4 in PyFoam because the syntax of the exceptions was completely incompatible).

Out of curiosity: is your cluster based on RHEL 4 or 5 (can't think of any other Linux distros that still use Python 2.4. 2.4.3 was released 10 years ago)
__________________
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   November 15, 2016, 10:22
Default
  #48
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by gschaider View Post
I'm not sure whether it is possible to support Python 3 and Python 2.4 in the same file (I just remember that I had to drop 2.4 in PyFoam because the syntax of the exceptions was completely incompatible).
The patch attached should work with at least for Python 2.4, 2.7 and 3.5 that are the ones I tested for.

Quote:
Originally Posted by gschaider View Post
Out of curiosity: is your cluster based on RHEL 4 or 5 (can't think of any other Linux distros that still use Python 2.4. 2.4.3 was released 10 years ago)
Code:
cat /etc/redhat-release
CentOS release 5 (Final)
Attached Files
File Type: gz makeFoamVersionHeader.patch.gz (616 Bytes, 14 views)
rdbisme is offline   Reply With Quote

Old   November 20, 2016, 06:28
Default
  #49
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by tidusuper91 View Post
The patch attached should work with at least for Python 2.4, 2.7 and 3.5 that are the ones I tested for.



Code:
cat /etc/redhat-release
CentOS release 5 (Final)
OK. That is technically a RHEL 5. I got rid of my last Centos 5 machine a couple of years ago. You'll probably have your reason to still run that version. Have you considered getting the python26-package from EPEL and make it the default for your user (not the system of course)?

Thanks for your effort on the patch, but: swak4foam already has a lot of uglieness (#ifdefs, Python-compatibility layers) in it because I try to accomodate several distributions of Foam on reasonably old Linux Distros. Don't want to increase that by adding support to a 10 year old OS that will phase out on most machines next year (RH will end the support for the upstream OS next March). Especially if there are reasonable workarounds (and using EPEL is in my opinion reasonable). Also: you only need to bump up the Python version for the compilation
__________________
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   December 7, 2016, 04:26
Default
  #50
New Member
 
Esmaeel Eftekharian
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 16
Rep Power: 10
Esmaeelef is on a distinguished road
Quote:
Originally Posted by gschaider View Post
The actual error is a few lines above what you're posting. Please look for that
BTW: are you using the released version of OF 4.0?

Dear Bernard,

I have installed openFoam 4.1 and tried to install swak4foam according to the instruction described in this thread. But when it comes to compile it, I constantly receive an error as attached. I would be so thankful if you can help me to solve the problem. Thank you in advance.

Kind Regards
Esmaeel
Attached Images
File Type: jpg Error.jpg (58.2 KB, 55 views)
Esmaeelef is offline   Reply With Quote

Old   December 7, 2016, 06:15
Default
  #51
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by Esmaeelef View Post
Dear Bernard,

I have installed openFoam 4.1 and tried to install swak4foam according to the instruction described in this thread. But when it comes to compile it, I constantly receive an error as attached. I would be so thankful if you can help me to solve the problem. Thank you in advance.

Kind Regards
Esmaeel
From what you post it seems it cannot find the 'make' command.

In which distribution you are? Did you install the dev tools?
Esmaeelef likes this.
rdbisme is offline   Reply With Quote

Old   December 7, 2016, 06:24
Default
  #52
New Member
 
Esmaeel Eftekharian
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 16
Rep Power: 10
Esmaeelef is on a distinguished road
Quote:
Originally Posted by tidusuper91 View Post
From what you post it seems it cannot find the 'make' command.

In which distribution you are? Did you install the dev tools?
Dear Ruben,

Thank you for your response. Actually, I am using a virtual machine on which Ubuntu 16.0.4 is installed. No, I have not installed dev tool. Do you think the problem is because I have not dev tool installed? I am new in Linux, I would be so thankful if you let me know how to install that.

Best Regards
Esmaeel
Esmaeelef is offline   Reply With Quote

Old   December 7, 2016, 06:31
Default
  #53
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by Esmaeelef View Post
Dear Ruben,

Thank you for your response. Actually, I am using a virtual machine on which Ubuntu 16.0.4 is installed. No, I have not installed dev tool. Do you think the problem is because I have not dev tool installed? I am new in Linux, I would be so thankful if you let me know how to install that.

Best Regards
Esmaeel
Have you tried to search on Google?

https://goo.gl/sT6NJL

Just joking, don't be offended
Esmaeelef likes this.
rdbisme is offline   Reply With Quote

Old   December 7, 2016, 07:44
Default
  #54
New Member
 
Esmaeel Eftekharian
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 16
Rep Power: 10
Esmaeelef is on a distinguished road
Quote:
Originally Posted by tidusuper91 View Post
Have you tried to search on Google?

https://goo.gl/sT6NJL

Just joking, don't be offended
Many thanks for your prompt reply. It worked and swak4Foam has been successfully installed on my workstation. Again thank you for your help.
rdbisme likes this.
Esmaeelef is offline   Reply With Quote

Old   December 8, 2016, 16:19
Default
  #55
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Esmaeelef View Post
Dear Bernard,

I have installed openFoam 4.1 and tried to install swak4foam according to the instruction described in this thread. But when it comes to compile it, I constantly receive an error as attached. I would be so thankful if you can help me to solve the problem. Thank you in advance.

Kind Regards
Esmaeel
If I interpret your error message correctly the "wmake"-utility did not find the "make" utility. Which is strange because make is installed almost automatically when you install development utilities.

BTW: PLEASE don't post error messages as screenshots. Copy/paste them from your command line into a Code-environemt (that's the one you get with thr #-icon above)
The way you do it makes the error message unsearchable. So if somebody is looking for a solution to the same error message he won't find the answer because the error message is "hidden" in a bitmap
__________________
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   December 8, 2016, 16:44
Default
  #56
New Member
 
Esmaeel Eftekharian
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 16
Rep Power: 10
Esmaeelef is on a distinguished road
Quote:
Originally Posted by gschaider View Post
If I interpret your error message correctly the "wmake"-utility did not find the "make" utility. Which is strange because make is installed almost automatically when you install development utilities.

BTW: PLEASE don't post error messages as screenshots. Copy/paste them from your command line into a Code-environemt (that's the one you get with thr #-icon above)
The way you do it makes the error message unsearchable. So if somebody is looking for a solution to the same error message he won't find the answer because the error message is "hidden" in a bitmap
Dear Bernard,
Thank you for your response. The problem was something in development utilities which is now solved and I could successfully install swak4Foam and use it.
Thank you for your suggestion about not using screenshot, however, I tried to copy and paste the error lines from the terminal to the Code-environment, however as I am using a virtual machine, it did not allow me to copy it into another environment. I should find a way to be able to export the command lines into another environment.

Thanks
Esmaeel
Esmaeelef is offline   Reply With Quote

Old   December 10, 2016, 14:58
Default
  #57
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by Esmaeelef View Post
Dear Bernard,
Thank you for your response. The problem was something in development utilities which is now solved and I could successfully install swak4Foam and use it.
Thank you for your suggestion about not using screenshot, however, I tried to copy and paste the error lines from the terminal to the Code-environment, however as I am using a virtual machine, it did not allow me to copy it into another environment. I should find a way to be able to export the command lines into another environment.

Thanks
Esmaeel
Just a hint. Try to install guest additions (are you using VirtualBox?)

Sent from my FRD-L09 using CFD Online Forum mobile app
Esmaeelef likes this.
rdbisme is offline   Reply With Quote

Old   December 16, 2016, 12:14
Default
  #58
New Member
 
Per Jørgensen
Join Date: Mar 2012
Posts: 20
Rep Power: 14
perjorgen is on a distinguished road
I have got swak4foam compiled and running with OpenFOAM 4.1 but when I try use dist() in funkySetFields I get an error
--> FOAM FATAL ERROR:
At least one plane coefficient must have a value

From function void Foam:lane::calcPntAndVec(const scalarList&)
in file meshes/primitiveShapes/plane/plane.C at line 51.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam:lane::calcPntAndVec(Foam::List<double> const&) at ??:?
#3 Foam::FieldValueExpressionDriver::makeDistanceFiel d() at ??:?
#4 parserField::FieldValueExpressionParser:arse() at ??:?
#5 Foam::FieldValueExpressionDriver:arseInternal(in t) at ??:?
#6 Foam::CommonValueExpressionDriver:arse(Foam::exp rString const&, Foam::word const&) at ??:?
#7 ? at ??:?
#8 ? at ??:?
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 ? at ??:?

Am I missing something or is it a (known) error

Best regards,

Per
perjorgen is offline   Reply With Quote

Old   December 16, 2016, 17:06
Default
  #59
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by perjorgen View Post
I have got swak4foam compiled and running with OpenFOAM 4.1 but when I try use dist() in funkySetFields I get an error
--> FOAM FATAL ERROR:
At least one plane coefficient must have a value

From function void Foam:lane::calcPntAndVec(const scalarList&)
in file meshes/primitiveShapes/plane/plane.C at line 51.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam:lane::calcPntAndVec(Foam::List<double> const&) at ??:?
#3 Foam::FieldValueExpressionDriver::makeDistanceFiel d() at ??:?
#4 parserField::FieldValueExpressionParser:arse() at ??:?
#5 Foam::FieldValueExpressionDriver:arseInternal(in t) at ??:?
#6 Foam::CommonValueExpressionDriver:arse(Foam::exp rString const&, Foam::word const&) at ??:?
#7 ? at ??:?
#8 ? at ??:?
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 ? at ??:?

Am I missing something or is it a (known) error

Best regards,

Per
No. I can reproduce that. The problem seems that something in the OpenFOAM-code changed concerning planes and/or wallDist. But the problematic stuff is not called directly by swak so I must have a look how to fix this for newer Foam-versions

But right now there is nothing you can do
__________________
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   April 13, 2017, 16:15
Default Installing Swak4Foam for OpenFoam 4.1
  #60
New Member
 
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9
akesm is on a distinguished road
Hello
I want to install Swak4Foam for OpenFoam 4.1, based on this website I download the zipped folder from this link and rename it to "swak4Foam" in my "/home/user/OpenFOAM/user-4.1/run/test4swak/swak4Foam". Then I do "./Allwmake" but I get error as
Code:
This is a clean install
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
abort: no repository found in '/home/soes/OpenFOAM/soes-4.1/run/test4swak/swak4Foam' (.hg not found)!
Swak version is 0.4.1
Contents of ./maintainanceScripts/../Libraries/swak4FoamParsers/include/swakVersion.H differ ... writing
Bison is version 3.0.4
swak4Foam only confirmed to work with Bison 2.x
Consider running ./maintainanceScripts/compileRequirements.sh for a local bison-installation
Set the environment variable DEVELOPE_FOR_NEW_BISON if you want to continue anyway.

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
Has anyone ever successfully installed swak4Foam for OF >4?
akesm is offline   Reply With Quote

Reply


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
[swak4Foam] swak4Foam installation on OpenFOAM 4.0 blttkgl OpenFOAM Community Contributions 1 March 14, 2017 11:06
[swak4Foam] and twoPhaseEulerFoam mnikku OpenFOAM Community Contributions 1 February 19, 2016 05:21
source term in near wall cell rajcfd OpenFOAM Pre-Processing 5 February 1, 2016 10:31
[swak4Foam] Install swak4Foam on OpenFOAM1.7.1 on Ubuntu 13.04 kobayashi OpenFOAM Community Contributions 2 January 5, 2014 17:33
[swak4Foam] fails in parallel with -otherTime? Phicau OpenFOAM Community Contributions 3 June 26, 2013 13:00


All times are GMT -4. The time now is 02:28.