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 Community New Posts Updated Threads Search

Like Tree26Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2015, 11:01
Default
  #1
New Member
 
Lee Yachao
Join Date: Dec 2015
Location: Beijing,China
Posts: 12
Rep Power: 10
iLyrics is on a distinguished road
I have been busy with installing swak4foam all night. Finally, under the guidence of the master, I was successful. The procedure is following:
1、hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam openfoam-extend-
swak4Foam
2、./maintainanceScripts/compileRequirements.sh
3、Downloading the patch file, and copy it to the installing catalog.
4、patch -p1 < swakFixFor20x.patch
5、ln -s swakConfiguration.automatic swakConfiguration
6、./Allwclean
iLyrics is offline   Reply With Quote

Old   December 10, 2015, 05:58
Default Installing swak4foam on openfoam 2.4.0
  #2
New Member
 
Marc Jansen
Join Date: Dec 2015
Location: The Netherlands
Posts: 4
Rep Power: 10
HKVadmin is on a distinguished road
Hello!

I am trying to install swak4foam (0.3.2) on openfoam 2.4.0 and I am getting the following error:

Code:
Previously compiled for OpenFOAM 2.4.0

/usr/local/OpenFOAM/OpenFOAM-2.0.x/swak4Foam_2.x/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
Checking swak4Foam-version and generating file
Swak version is 0.3.2
Bison is version 2.7.12-4996
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 4 Patch 0 (-1 == x / 0)
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=entryToExpression/entryToExpression.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/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/sampling/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/fileFormats/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/triSurface/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/surfMesh/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/lagrangian/basic/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/entryToExpression.o
entryToExpression/entryToExpression.C: In static member function ‘static Foam::string Foam::entryToExpression::fromEntry(const Foam::entry&)’:
entryToExpression/entryToExpression.C:96: error: no matching function for call to ‘dynamicCast(const Foam::entry&)’
make: *** [Make/linux64GccDPOpt/entryToExpression.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
Can someone point me in the right direction?

With kind regards
HKVadmin is offline   Reply With Quote

Old   December 10, 2015, 15:23
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings HKVadmin and welcome to the forum!

That is a very peculiar error message. I tested it just now with Ubuntu 12.04 which uses GCC 4.6.3 and I didn't have that problem.

To diagnose the origin of the problem, I need the following information:
  1. Try running the following commands inside the "swak4Foam" folder:
    Code:
    wclean all
    ./Allwmake
  2. Does it give you the same error message or is it now building without problems? If it still gives the same message, then continue the following steps...
  3. What do the following commands give you?
    Code:
    gcc --version
    g++ --version
  4. Please zip and attach the file "Libraries/swak4FoamParsers/entryToExpression/entryToExpression.dep". What I'm looking for is the entry "typeInfo.H" in the file and to compare with the one I get on my installation. Because I suspect that due to some weird reason, your build could be picking up another file with the same name.
  5. How are you keep versions of OpenFOAM apart from each other?
    • In particular, do you use the same terminal window to work with more than one version of OpenFOAM?
I hope I'm not forgetting anything.


Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 11, 2015, 03:37
Default
  #4
New Member
 
Marc Jansen
Join Date: Dec 2015
Location: The Netherlands
Posts: 4
Rep Power: 10
HKVadmin is on a distinguished road
Thank you Bruno!

Quote:
Originally Posted by wyldckat View Post
[*]Try running the following commands inside the "swak4Foam" folder:
Code:
wclean all
./Allwmake
[*]Does it give you the same error message or is it now building without problems? If it still gives the same message, then continue the following steps...
I did the wclean all and then ./Allwmake but unfortunatly got the same error message.

Quote:
Originally Posted by wyldckat View Post
[*]What do the following commands give you?
Code:
gcc --version
g++ --version
gcc --version gives:
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
g++ --version gives:
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)

Quote:
Originally Posted by wyldckat View Post
[*]Please zip and attach the file "Libraries/swak4FoamParsers/entryToExpression/entryToExpression.dep". What I'm looking for is the entry "typeInfo.H" in the file and to compare with the one I get on my installation. Because I suspect that due to some weird reason, your build could be picking up another file with the same name.
If I attached the file correctly there should be an entrytoexpression.tar.gz file attached to this post. Is that okay or do you need a .zip?

Quote:
Originally Posted by wyldckat View Post
[*]How are you keep versions of OpenFOAM apart from each other?
  • In particular, do you use the same terminal window to work with more than one version of OpenFOAM?
[/LIST]
That is a good question. One that I don't really have an answer for. I have asked my collegue who works with the software (I am just tasked with installing software on our cluster). He says that when he starts a job he targets the version (we have 2.0.x and 2.4.0 installed) that he needs?

In /usr/local/OpenFOAM we have multiple folders:
drwxr-xr-x 3 root root 4096 Oct 17 2011 engrid-1.2.0
drwxr-xr-x 4 root root 4096 Oct 17 2011 gmsh-2.4.2
drwxr-xr-x 6 root root 4096 Oct 17 2011 netgen-4.9.14-svn
drwxr-xr-x 10 root root 4096 Dec 10 12:25 OpenFOAM-2.0.x
drwxrwxr-x 11 root root 4096 Dec 10 12:26 OpenFOAM-2.4.0
drwxr-xr-x 4 root root 4096 Oct 17 2011 paraview-3.10.0
drwxr-xr-x 6 root root 4096 Oct 17 2011 ThirdParty-2.0.x
drwxr-xr-x 10 root root 4096 Oct 1 12:31 ThirdParty-2.4.0

Maybe also important in this case: Our OpenFOAM-2.4.0 installation is not working exactly as it should be. Parallel processing isn't working (but single core is). We are still trying to figure that out as well. Could that perhaps be the reason wak4foam isn't building?

Thank you very much for your help so far!

With kind regards,
Marc


EDIT:

Turns out that our gcc version was not new enough. With gcc version 4.2.8 swak4foam builds as it should!
Attached Files
File Type: gz entrytoexpression.tar.gz (20.0 KB, 2 views)

Last edited by HKVadmin; December 11, 2015 at 09:00.
HKVadmin is offline   Reply With Quote

Old   December 12, 2015, 15:06
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Marc,

The dependency file looks OK.

I'm guessing you're using Redhat 5.x, given that the default is GCC 4.1.2. Have a look at these instructions for ideas regarding the issue with MPI (for running in parallel): http://openfoamwiki.net/index.php/In...EL#CentOS_5.11

Quote:
Originally Posted by HKVadmin View Post
Turns out that our gcc version was not new enough. With gcc version 4.2.8 swak4foam builds as it should!
As for the GCC version, the minimum is GCC 4.5 for building OpenFOAM 2.4.0: http://openfoamwiki.net/index.php/In...tion_.28GCC.29 - so I guess you're referring to GCC 4.8.2 and not 4.2.8?

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   December 14, 2015, 07:11
Default
  #6
New Member
 
Marc Jansen
Join Date: Dec 2015
Location: The Netherlands
Posts: 4
Rep Power: 10
HKVadmin is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Marc,

The dependency file looks OK.

I'm guessing you're using Redhat 5.x, given that the default is GCC 4.1.2. Have a look at these instructions for ideas regarding the issue with MPI (for running in parallel): http://openfoamwiki.net/index.php/In...EL#CentOS_5.11


As for the GCC version, the minimum is GCC 4.5 for building OpenFOAM 2.4.0: http://openfoamwiki.net/index.php/In...tion_.28GCC.29 - so I guess you're referring to GCC 4.8.2 and not 4.2.8?

Best regards,
Bruno
Hi Bruno,

You guessed correctly! I meant 4.8.2

As for running in parralel. This seemed to be a strange issue as well. We figured out that OpenFOAM uses mpicc to get some information about OpenMPI? Turns out that on our environment mpicc was not recognized while OpenMPI and mpi etc. were succesfully installed. We then edited the file /usr/local/OpenFOAM/OpenFOAM-2.4.0/etc/config.sh and around line 369 added:

export PATH=/usr/local/openmpi-1.8.5/bin:$PATH

That worked. But then log.interFoam stated that a dummy library in Pstream could not be used in parallel. A quick search showed (by earlier responses by you) that this is solved by compiling Pstream again. So we did (after exporting openmpi to our PATH as Pstream also uses mpicc for something) that by running Allwmake in the Pstream directory and after that everything seemed to work.

My collegeau is going to test this week and hopefully he comes to the same conclusion as mine and that is that everything is working properly.

With kind regards,
Marc
wyldckat likes this.
HKVadmin is offline   Reply With Quote

Old   December 18, 2015, 04:23
Default
  #7
New Member
 
Marc Jansen
Join Date: Dec 2015
Location: The Netherlands
Posts: 4
Rep Power: 10
HKVadmin is on a distinguished road
Hi Bruno,

I still have an issue. Our users are logging in on our cluster with their own username. But swak4foam doens't seem to work for them. This is because it has been built by root as stated on this page: https://openfoamwiki.net/index.php/Contrib/swak4Foam

It says "Note: building swak4Foam installs it into FOAM_USER_LIBBIN for the current user. So if it built as root (or another administrative account) it is not usable from another account (or in other words: every user must compile swak4Foam for himself separately. There are ways to install it for all users. They are documented but you must find the way there yourself as a test to make sure you know what you're doing as doing this wrong may introduce very peculiar problems)"

Could you point me in the right direction to make it so that every user can use swak4foam?

Thanks in advance!
Marc

EDIT: Nevermind, I should RTFM
wyldckat likes this.
HKVadmin is offline   Reply With Quote

Old   October 14, 2016, 16:00
Default openfoam 1.6-ext : Parser error
  #8
Member
 
Join Date: Feb 2014
Posts: 63
Rep Power: 12
Uyan is on a distinguished road
For people who got this error

Code:
Parser library did not compile OK. No sense continuing as everything else depends on it
See if your bison version is 3.x.x , if so try to uninstall bison and install a 2.x.x version and re-compile.

For me that solved the problem of installing swak4Foam with 1.6-ext.
Uyan is offline   Reply With Quote

Old   December 26, 2021, 13:13
Default some scripts require binary python to be installed error while compiling swak4foam
  #9
New Member
 
Thokala Divya
Join Date: Dec 2021
Posts: 9
Rep Power: 4
divyathokala01@gmail.com is on a distinguished road
please kindly help to resolve following error

chinni@LAPTOP-105VVDC2:~/OpenFOAM/OpenFOAM-v2012/applications/swak4Foam$ openfoam2012
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ImportError: /home/chinni/OpenFOAM/OpenFOAM-v2012/ThirdParty/platforms/linux64/gcc-6.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib/x86_64-linux-gnu/libapt-pkg.so.6.0)
chinni@LAPTOP-105VVDC2:~/OpenFOAM/OpenFOAM-v2012/applications/swak4Foam$ ./AllwmakeAll

This script is rather crude. If it doesn't work try the steps by hand. And be sure to run it from the root of the swak-installation (as ./maintainanceScripts/compileRequirements.sh). Otherwise it probably won't work

bison-3.4.tar.gz already downloaded
Untarring bison-sources
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether make supports nested variables... (cached) no
checking whether make supports the include directive... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/chinni/OpenFOAM/OpenFOAM-v2012/applications/swak4Foam/privateRequirements/compilation/bison-3.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
./maintainanceScripts/compileRequirements.sh: line 31: make: command not found
./maintainanceScripts/compileRequirements.sh: line 31: make: command not found

Bison not compiled. Check output

lua-5.3.5.tar.gz already downloaded
Untarring lua-sources
sed: can't read bak: No such file or directory
sed: can't read bak: No such file or directory
sed: can't read bak: No such file or directory
./maintainanceScripts/compileRequirements.sh: line 66: make: command not found
./maintainanceScripts/compileRequirements.sh: line 68: make: command not found
If there were problems during compilation install the readline-devel package (name may be different on platforms)

Lua not compiled. Check output


Add /home/chinni/OpenFOAM/OpenFOAM-v2012/applications/swak4Foam/privateRequirements/bin to PATH-variable. The ./Allwmake-script will use this directory automatically

Some scripts require a binary 'python' to be installed
It doesn't matter if this is Python 2 or 3
This problem is caused by Linux distros that install 'python2' and/or 'python3' but no python
On such distros usually a packages exists that links 'python' to one of those
divyathokala01@gmail.com is offline   Reply With Quote

Old   January 7, 2022, 00:54
Default Swak4Foam stopped compiling
  #10
New Member
 
Thokala Divya
Join Date: Dec 2021
Posts: 9
Rep Power: 4
divyathokala01@gmail.com is on a distinguished road
I am using OpenFOAM v-2106. I am encountering the following problem while compiling swak4Foam. can anyone help me in doing it.



This script is rather crude. If it doesn't work try the steps by hand. And be sure to run it from the root of the swak-installation (as ./maintainanceScripts/compileRequirements.sh). Otherwise it probably won't work

Bison already installed/compiled
Bison successfully compiled
Lua already installed/compiled
Lua successfully compiled

Add /usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements/bin to PATH-variable. The ./Allwmake-script will use this directory automatically

Current OpenFOAM version is v2106.
Previously compiled for OpenFOAM (v2106)

/usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
Looking for Python 2
Looking for Python 3
Found Python 3.8
Configuring Python 3.8
Using python3.8 at /usr/bin/python3.8-config for python3
Using our own Lua at /usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements
Checking swak4Foam-version and generating file
Swak version is 202x.yy.0
hg info: ea7680cdcf8b (develop) tip
No 'bear' installed
Bison: /usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements/bin/bison
Flex: /usr/bin/flex
Bison at /usr/lib/openfoam/openfoam2106/applications/swak4Foam/privateRequirements/bin/bison is version 3.4 (Major 3 Minor 4)
Flex is version 2.6.4 (Minor version: 4)
OpenFOAM-version: Major 2106 Minor 0 Patch 0 (-1 == x / 0) Fork: com
No change to swak4FoamParsers/foamVersion4swak.H

Please include the output above when reporting a problem in the compilation. It helps diagnosing the problem


wmake libso swak4FoamParsers
/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/options:69: /usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/../myflex: No such file or directory
make: *** No rule to make target '/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/../myflex'. Stop.
/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/options:69: /usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/../myflex: No such file or directory
make: *** No rule to make target '/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/../myflex'. Stop.
wmake error: file '/usr/lib/openfoam/openfoam2106/build/linux64GccDPInt32Opt/applications/swak4Foam/Libraries/swak4FoamParsers/sourceFiles' could not be created in /usr/lib/openfoam/openfoam2106/applications/swak4Foam/Libraries/swak4FoamParsers
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 occurred to 5 other people before and has been solved on the MessageBoard
divyathokala01@gmail.com is offline   Reply With Quote

Old   January 8, 2022, 07:51
Default
  #11
Member
 
Ashutosh
Join Date: Jul 2021
Location: India
Posts: 75
Rep Power: 4
night-hawk is on a distinguished road
You are trying to write in /usr/lib/openfoam which is not writable without root.


Try this

mkdir -p $FOAM_RUN


then execute Allwmake script
night-hawk is offline   Reply With Quote

Reply

Tags
compile error, swak4foam


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 11:59
[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 07:56.