Hi hkiani,
If you had executed the following commands: Code:
./Allwmake > make.log 2>&1 From what I can see, this is a reason for concern: Code:
Flex is version Apple(flex-31) As for "g++" and "gcc", please try the following commands: Code:
gcc --version Beyond this, I believe that Bernhard, the author of swak4Foam, usually develops swak4Foam on Mac OS X in the first place, so it should work just fine. My guess is that the problem is in fact that since you didn't go through the ordeal of building foam-extend from source code on Mac OS X, you're now having trouble building swak4Foam from source code. If you had built foam-extend from source code, you would likely have had similar issues sooner and would have had to look better into installing the necessary tools ;) Best regards, Bruno |
I try to install flex and bison for using swak4Foam but whenever I want to run the following code:
apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev I have got the following error: Ignoring file 'openfoam.listsudo' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension Do you have any idea to fix the problem? Thanks Elham |
Greetings Elham,
You must do the following command very carefully, without missing a single character, otherwise you risk compromising your Ubuntu installation: Code:
sudo rm -i /etc/apt/sources.list.d/openfoam.listsudo Then run: [CODE]sudo apt-get update[CODE] and it should then allow you to run the command: Code:
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev Bruno |
1 Attachment(s)
Quote:
I am trying to install swak4Foam development version with OpenFOAM-5.0 on Ubuntu 18.04.1 LTS. The steps that I follow are as follows: Code:
sudo apt-get install build-essential flex subversion git mercurial wget Code:
of50 Code:
git clone https://github.com/Unofficial-Extend-Project-Mirror/openfoam-extend-swak4Foam-dev.git swak4Foam Code:
cd swak4Foam Code:
/opt/openfoam5/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/CommonValueExpressionDriver.o' failed Thanks, Viraj |
Quote:
I can't. You're using the unsupported git-repository. Because of this the output "hg info: 000000000000 tip" in your log doesn't give me an indication which version of the sources you're using |
Quote:
Could you please point me towards the correct set of installation steps and repository to install swak4Foam? I have OpenFOAM-5.0 installed in Ubuntu 18.04.1 LTS. Thank you very much! |
1 Attachment(s)
Quote:
Hello Mr. Gschaider I have the same error of Vijaj but in my log if it is indicated the version of the sources that I have been using. Could you please help? Thanks Leandro |
Quote:
The best way to get the sources is Code:
hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam openfoam-extend-swak4Foam Then compile according to https://openfoamwiki.net/index.php/C...4Foam#Building |
Quote:
I used the way suggested by you to get the sources. But I still get the following error: Code:
/opt/openfoam5/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/CommonValueExpressionDriver.o' failed |
Difficulties installing Swak4foam for openFoam2.1
Dear all,
I am new to the Linux and trying to install Swak4foam for openfoam2.1. During the build I got the following error. Include/patchedInterpolation2DTable.C(38): error: call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type reader_()(fName, *this); ^ detected during: instantiation of "void Foam::interpolation2DTable<Type>::readTable() [with Type=Foam::scalar={Foam::doubleScalar={double}}]" at line 101 instantiation of "Foam::interpolation2DTable<Type>::interpolation2D Table(const Foam::dictionary &) [with Type=Foam::scalar={Foam::doubleScalar={double}}]" at line 1624 of "CommonValueExpressionDriver.C" instantiation of "void Foam::CommonValueExpressionDriver::readTables(Foam ::Istream &, Foam::HashTable<TableType, Foam::word, Foam::string::hash> &, bool) [with TableType=Foam::interpolation2DTable<Foam::scalar= {Foam::doubleScalar={double}}>]" at line 389 of "CommonValueExpressionDriver.C" lnInclude/patchedInterpolation2DTable.C(377): error: identifier "lessOp" is undefined label x0i = Xi(lessOp<scalar>(), valueX, false); ^ lnInclude/patchedInterpolation2DTable.C(377): error: type name is not allowed label x0i = Xi(lessOp<scalar>(), valueX, false); ^ lnInclude/patchedInterpolation2DTable.C(377): error: expected an expression label x0i = Xi(lessOp<scalar>(), valueX, false); ^ lnInclude/patchedInterpolation2DTable.C(378): error: identifier "greaterOp" is undefined label x1i = Xi(greaterOp<scalar>(), valueX, true); ^ lnInclude/patchedInterpolation2DTable.C(378): error: type name is not allowed label x1i = Xi(greaterOp<scalar>(), valueX, true); ^ lnInclude/patchedInterpolation2DTable.C(378): error: expected an expression label x1i = Xi(greaterOp<scalar>(), valueX, true); ^ compilation aborted for CommonValueExpressionDriver.C (code 2) CommonValueExpressionDriver.dep:543: recipe for target 'Make/linux64IccDPOpt/CommonValueExpressionDriver.o' failed make: *** [Make/linux64IccDPOpt/CommonValueExpressionDriver.o] Error 2 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 It would be helpful if you can guide me how to handle this error. Thank you in advance:) |
Quote:
Hm. I guess there is a reason that you use a 8 year old version of OF. The oldest version that I have currently available is 2.3 and that compiles without problems (it is the oldest version that I test against). The file you're having problems with is in swa since 2015 and hasn't been changed since. So I guess all swak-versions since 2015 break with OF 2.1. So your best chance is going back to a version that was released before October 2015 and try to compile that (of course the latest features features would be missing) Or if you're hardcore: find the relevant commit, try to reverse apply it and hope that compiles without these changes (if that makes you go "hä?" then you're probably not hardcore) |
I am definitely not "hardcore" :)
Thanks for the suggestion, I tried to build the older version of Swak4foam. Still does not work and i get the same error! Not a clue, what went wrong. |
Quote:
The "youngest" release before the offending changes would be 0.3.2. But that is rather old BTW: what is the reason for you to use such an old OF-Version (I guess you have a good one) |
Hi,
I tried to build the latest version 0.4.2 but there seems to be readline error: When I use the system readline 6.3, I got the error: ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o ranlib liblua.a gcc -fPIC -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c gcc -fPIC -std=gnu99 -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline /app/readline/6.3/lib/libreadline.so: undefined reference to `tputs' /app/readline/6.3/lib/libreadline.so: undefined reference to `tgoto' /app/readline/6.3/lib/libreadline.so: undefined reference to `tgetflag' /app/readline/6.3/lib/libreadline.so: undefined reference to `UP' /app/readline/6.3/lib/libreadline.so: undefined reference to `tgetent' /app/readline/6.3/lib/libreadline.so: undefined reference to `tgetnum' /app/readline/6.3/lib/libreadline.so: undefined reference to `PC' /app/readline/6.3/lib/libreadline.so: undefined reference to `tgetstr' /app/readline/6.3/lib/libreadline.so: undefined reference to `BC' collect2: error: ld returned 1 exit status make[2]: *** [lua] Error 1 make[2]: Leaving directory `/home/projects/11000324/OpenFOAM/swak4Foam/privateRequirements/compilation/lua-5.3.4/src' make[1]: *** [linux] Error 2 make[1]: Leaving directory `/home/projects/11000324/OpenFOAM/swak4Foam/privateRequirements/compilation/lua-5.3.4/src' make: *** [linux] Error 2 cd src && mkdir -p /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/bin /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/include /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/lib /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/man/man1 /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/share/lua/5.3 /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/lib/lua/5.3 cd src && install -p -m 0755 lua luac /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/bin install: cannot stat `lua': No such file or directory install: cannot stat `luac': No such file or directory make: *** [install] Error 1 If there were problems during compilation install the readline-devel package (name may be different on platforms) Lua not compiled. Check output When I install readline 8.0, it seems that readline is not found and I got the error: ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o ranlib liblua.a gcc -fPIC -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c lua.c:82:31: fatal error: readline/readline.h: No such file or directory #include <readline/readline.h> ^ compilation terminated. make[2]: *** [lua.o] Error 1 make[2]: Leaving directory `/home/projects/11000324/OpenFOAM/swak4Foam/privateRequirements/compilation/lua-5.3.4/src' make[1]: *** [linux] Error 2 make[1]: Leaving directory `/home/projects/11000324/OpenFOAM/swak4Foam/privateRequirements/compilation/lua-5.3.4/src' make: *** [linux] Error 2 cd src && mkdir -p /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/bin /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/include /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/lib /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/man/man1 /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/share/lua/5.3 /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/lib/lua/5.3 cd src && install -p -m 0755 lua luac /home/users/nus/tsltaywb/speedster/OpenFOAM/swak4Foam/privateRequirements/bin install: cannot stat `lua': No such file or directory install: cannot stat `luac': No such file or directory make: *** [install] Error 1 If there were problems during compilation install the readline-devel package (name may be different on platforms) Lua not compiled. Check output Hope someone can help. Thanks! |
I wouldn't bother about it to much. Lua is only needed for a rather esoteric part of swak4Foam
But I'm curious. Which Linux Distro are you using? (Lua is rather robust in its requirements for compilation) Quote:
|
Problem installing swak4Foam with OF 2.1.1
1 Attachment(s)
Hello,
I am not an expert FOAM user. However, I am trying to run a project which was done in OF 2.1.1 about an Euler-Lagrange problem. Reason to use such an old version of OF being that OF has brought in big changes post OF 4.x in thermo libraries and I am finding hard time using Chemkin files and thermo libraries which are used in the current project of OF 2.1.1 Ok, now to the problem, I have cleanly installed OF 2.1.1 without any problems. After that I installed swak4Foam (version 0.3.2) as directed in the openfoamwiki.net. Also, followed the dependencies requirements. When I do Allwmake I get problem as attached in the log file. I am not able to understand the error and hence debug it. Any help would be greatly appreciated. P.S: I have installed my swak4Foam in "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION" if it is of any use for the problem. Regards Sagar |
Quote:
So you're using an old OF/swak on a newer machine (with a newer compiler). I think this HUGE that was a preprocessor-symbol for a ridiculously large floating point number (but not the largest on) that used to be in the headers of gcc but no longer is. Try Code:
#define HUGE 1e15 |
Thank you Bernhard Gschaider for your quick reply. I followed your suggestion and defined HUGE. It occurred in multiple files and I did the same and was able to successfully compile it.
Thanks Sagar |
Installing swak4foam on cluster
Hi all,
I have used the following commands to install swak4foam in a frontal node in a cluster. hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam cd swak4Foam ./AllwmakeAll The swak4foam was installed at the home directory. I then loaded openfoam to the cluster, but it seems that it did not recognize the swak4foam installation. The error: "funkySetFields: command not found" I am wondering if there is any especial treatment to make swak4foam working on the cluster. I did the same steps on my local machine and it is working well. I appreciate your assistance. |
Quote:
swak4Foam compiles itself into the $FOAM_USER_APPBIN and $FOAM_USER_LIBBIN of the current user (not into $FOAM_SITE_APPBIN/LIBBIN or $FOAM_APPBIN/LIBBIN where all users can find it. In the maintainanc-directory are scripts to copy the binaries there). If you are a different user on the cluster and/or $FOAM_USER_APPBIN/LIBBIN is on a different file system then swak4Foam can't be found on the cluster |
Thanks. I edited the above with the support center of the cluster as suggested above. when I run ./Allwmake, I get the below error (last lines of it), I am wondering how to fix it:
CommonValueExpressionDriver.C: In member function ‘Foam::string Foam::CommonValueExpressionDriver::outputEntry()’: CommonValueExpressionDriver.C:1907:9: error: ‘writeEntry’ was not declared in this scope writeEntry(o,result_.getResult<scalar>(true)()); ^~~~~~~~~~CommonValueExpressionDriver.C:1907:9: note: suggested alternative: ‘writer_’ writeEntry(o,result_.getResult<scalar>(true)()); ^~~~~~~~~~ writer_CommonValueExpressionDriver.C:1913:9: error: ‘writeEntry’ was not declared in this scope writeEntry(o,result_.getResult<vector>(true)()); ^~~~~~~~~~CommonValueExpressionDriver.C:1913:9: note: suggested alternative: ‘writer_’ writeEntry(o,result_.getResult<vector>(true)()); ^~~~~~~~~~ writer_CommonValueExpressionDriver.C:1919:9: error: ‘writeEntry’ was not declared in this scope writeEntry(o,result_.getResult<tensor>(true)()); ^~~~~~~~~~CommonValueExpressionDriver.C:1919:9: note: suggested alternative: ‘writer_’ writeEntry(o,result_.getResult<tensor>(true)()); ^~~~~~~~~~ writer_CommonValueExpressionDriver.C:1925:9: error: ‘writeEntry’ was not declared in this scope writeEntry(o,result_.getResult<symmTensor>(true)() ); ^~~~~~~~~~CommonValueExpressionDriver.C:1925:9: note: suggested alternative: ‘writer_’ writeEntry(o,result_.getResult<symmTensor>(true)() ); ^~~~~~~~~~ writer_CommonValueExpressionDriver.C:1931:9: error: ‘writeEntry’ was not declared in this scope writeEntry(o,result_.getResult<sphericalTensor>(tr ue)()); ^~~~~~~~~~CommonValueExpressionDriver.C:1931:9: note: suggested alternative: ‘writer_’ writeEntry(o,result_.getResult<sphericalTensor>(tr ue)()); ^~~~~~~~~~ writer_make: *** [/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx512/MPI/gcc7.3/openmpi3.1/openfoam/6.20180813/OpenFOAM-6.20180813/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/CommonValueExpressionDriver.o] Error 1Parser library did not compile OK. No sense continuing as everything else depends on itRequirements for Library not satisfied. I see no sense in going onCheck 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 |
Quote:
According to the error message his is a patched version of OF6. Is this the same version as the one on your workstation? |
Hi,
It is working on my PC. The OpenFOAM version is 6. The gcc version is 8.3.0. However, it is not on the cluster. The cluster uses OpenFOAM version 6.20180813. |
Quote:
swak4Foam has only been tested with OF6 as released on the 10th of July 2018 and then with OF7. But not the intermediate versions from the git-repository |
Hi gschaider, thanks for the reply. below is the error in the code environment.
Code:
CommonValueExpressionDriver.C: In member function ‘Foam::string Foam::CommonValueExpressionDriver:utputEntry()’: CommonValueExpressionDriver.C:1907:9: error: ‘writeEntry’ was not declared in this scope writeEntry(o,result_.getResult<scalar> |
Hey Bodo!
Did you solve the problem? I came accross the same error when i was trying to compile swak4Foam for my OpenFOAM-6 installation (SHA 47517f2ebb1bdbacb8e3ce4b15110cd252953f87). I both tried with the default and the develop branch of the hg repository. With the develop branch, another compilation error occured... |
Quote:
I can't find a commit with that has in the Mercurial-Repository. What is the output of Code:
hg id |
The SHA i posted was the one from my OpenFOAM-6 version.
The hg id is the following for the default branch of swak4Foam: 76087ce82a32 Edit: Btw, thank you for the fast reply! :) |
Quote:
|
It was the same error message as Bodo1993 posted before with the default branch:
Code:
CommonValueExpressionDriver.C: In member function ‘Foam::string Foam::CommonValueExpressionDriver::outputEntry()’: Code:
In file included from lnInclude/CommonValueExpressionDriver.H:49:0, Code:
This is a clean install |
Quote:
That is strange: that line should only be compiled for OF7 and higher Quote:
Aaaah. The major version 2999 means that the compilation script could not determine the OF-version that is used. For that it uses the content of the WM_PROJECT_VERSION environment variable. Check with Code:
echo $WM_PROJECT_VERSION Code:
export WM_PROJECT_VERSION=6 |
Ah yeah! Thank you very much Bernhard!
Actually i slightly modified OpenFOAM-6 and therefor changed the WM_PROJECT_VERSION variable to something like 6-XYZ. Completely makes sense that it couldn't find out the project version then. I now reverted the change of WM_PROJECT_VERSION and the compilation seems to work fine. Thanks again and have a nice evening :) |
error of compling
Hi guys, I executed two times of ./Allwmake and the following messages came to me. I did not find the solution after I read your posts. Please give me some suggestions regarding this issue. I failed to compile it on the cluster although I tried a lot of ways. Any help will be greatly appreciated!
Code:
Previously compiled for OpenFOAM (v2012) |
Paser library issue with OF 4.x
1 Attachment(s)
Dear all,
It seems that I have the same Parser library compilation issue than others in this thread. I tried the solution strategies explained above but none of them succeeded. Here is my configuration: > Ubuntu 20.04.2 LTS > OpenFOAM 4.x > swak4Foam development version (as specified on the wiki https://openfoamwiki.net/index.php/I...OAM_4.0_to_4.x) Code:
hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam (cd swak4Foam && hg update develop) Then I followed the instructions, namely Code:
./maintainanceScripts/compileRequirements.sh The compilation ends on the message "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" Here is the first (and only!) error message: Code:
/home/Me/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/PackedListI.H:550:13: error: return-statement with a value, in function returning ‘void’ [-fpermissive] And this is the head of the log.make: Code:
Current OpenFOAM version is 4.x. I also went the "Understanding Error Messages" page, but nothing seems to workaround. > Do you have any insight about this issue? > The wiki specifies some patches for OF 4.0. Is it also necessary for OF 4.x? (since it is not the case for OF 4.1) > If yes, I am still a bit lost on how to use these two files as "patches" The complete log.make exceeds the limit size for attachement by 15KB :( so I removed some parts of the log.make attached (symbolized by [...] in the file). But I can send the full version by any other mean. Looking forward to reading you. Grégoire |
Quote:
Hm. The oldest foundation-release that I currently have installed is 5. So I can't directly reproduce your problem. The PackedList-error is a problem in the OpenFOAM-sources. Where did you get that 4.x from (maybe it is an unstable git-version) |
Dear Bernhard,
Thank you for your prompt answer. I got OF 4.x from https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04, precisely git clone https://github.com/OpenFOAM/OpenFOAM-4.x.git git clone https://github.com/OpenFOAM/ThirdParty-4.x.git The instructions that I've followed for swak4Foam also come from Openfoamwiki.net. Best, Grégoire |
Quote:
There is nothing I can do. The OpenFOAM sources (not swak) you use are plain broken. At https://github.com/OpenFOAM/OpenFOAM.../PackedListI.H line 550 the compiler complains about the return statement in a function that is not supposed to return anything (void). I checked: the next version that I have (5.0) has the same function without the offending return-statement. Is there a particular reason to use an outdated development version of OpenFOAM? I recommend sticking to released versions (these are also the only ones I test swak4Foam against) or the newest development versions. But stay clear of the .x versions unless you are prepared to fix compilation problems yourself |
Ok thank you for your insights. I'll deal with this information.
|
4 Attachment(s)
Quote:
I experience the same problems as AnkitRK, while trying to build Swak4Foam for OF-2.1.x If you ask me, why do I need OF 2.1.x... Well, I implemented some solvers years ago and didn't touch OpenFOAM (and CFD in general) for a very long time. Now, I need to reactivate them. Actually, I don't mind moving to a newer OF version, but I'm afraid that wouldn't be straightforward and easy. So first I need to make my old implementation work and do plenty of reverse engineering to recall all the stuff I did. Since I failed to build the newest Swak4Foam on my system (Ubuntu 16.04.7 LTS), I also tried to build two other old versions of Swak4Foam I found in my old backup. These where v0.1.6 and v0.2.4 and I was apparently using them back that day with the same OF-version. But on my current system I was not able to build them either. I would appreciate your help! Cheers |
1 Attachment(s)
Quote:
|
All times are GMT -4. The time now is 18:36. |