|
[Sponsors] |
[OpenFOAM.org] Problem in installation of OpenFOAM 2.2.x |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 12, 2019, 11:50 |
Problem in installation of OpenFOAM 2.2.x
|
#1 |
New Member
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
Hi
I am using an old version of OpenFOAM 2.2.x or 0 https://openfoam.org/download/2-2-0-source/ https://openfoamwiki.net/index.php/I...M-2.2.0/Ubuntu ) The problem is with ./Allwmake First, there was a permission problem the I used "chmod 'u+w' OpenFOAM-2.2.x" and "sudo chmod 'u+w' OpenFOAM-2.2.x" both didn't work I used "sudo chmod -R 'u+w' OpenFOAM-2.2.x" and it worked then I have now there is also some problems I don't know how to solve them 1 2 3 best regards |
|
April 12, 2019, 19:49 |
Problem in installation of OpenFOAM 2.2.x
|
#2 |
New Member
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
Hi,
I wanted to install OpenFOAM the old version 2.2.x or 0 Following these instructions: https://openfoamwiki.net/index.php/I...M-2.2.0/Ubuntu https://openfoam.org/download/2-2-0-source/ And I am facing a problem with ./Allwmake There was a permission error first time. I used this command "chmod 'u+w' OpenFOAM-2.2.x" and still no permission to edit. then I used "sudo chmod 'u+w' OpenFOAM-2.2.x" and nothing changed. To change the permission I used "sudo chmod -R 'u+w' OpenFOAM-2.2.x" and it worked but I don't know why there is still some problems with permission. Any suggestion? |
|
April 12, 2019, 21:01 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answer: Looks like the problem was that you unpacked or downloaded the source code folders with the username "suliman", but then tried to build OpenFOAM with the username "suli".
In principle, the solution to this problem is to run the following commands: Code:
cd ~/OpenFOAM sudo chown -R suli:suli *
__________________
|
|
April 13, 2019, 16:18 |
|
#4 |
New Member
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
Thank you very much wyldckat. Actually now it works. But it took long time around 3 hours or even more. I don't know now why blockmesh command is not working!!
log.make is attached (15% only ) Do you suggest to follow instructions: sudo apt install foam ? Last edited by Suliman; April 13, 2019 at 18:14. |
|
April 13, 2019, 18:52 |
|
#5 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quote:
Therefore, please run the following command: Code:
grep -B 5 -A 5 -ie "Error" log.make | head -n 15 No, because it will not install version 2.2. Which Ubuntu version are you using? |
||
April 13, 2019, 19:15 |
|
#6 |
New Member
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
Thanks for help,
basically I am using a terminal Ubunta (the version is not specified) to run OpenFAOM because I am using Windows 10. Code:
suli@DESKTOP-O6HPOJM:~/OpenFOAM/OpenFOAM-2.2.x/bin$ g++ --version g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gzip < log.make > log.make.gz I get this file listed but I cant find it in Windows to attach it here, since it is somewhere in Linux terminal Attached all requirements By the way I already have an OpenFOAM version 5 and it is working properly with blockMesh, simpleFoam, paraFoam, paraview and everything, I am installing this 2.2.x separately with its own alias in .bashrc, because I need the old version for reasons related to the research group Last edited by Suliman; April 14, 2019 at 11:50. |
|
April 14, 2019, 12:08 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answers:
|
|
April 14, 2019, 13:49 |
|
#8 |
New Member
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
1. yes I followed these instructions again.All commands works except the last two commands in no. 8 :
Code:
suli@DESKTOP-O6HPOJM:~$ sed -i -e "s/export WM_CC='gcc'/export WM_CC='gcc-4.8'/" etc/config/settings.sh sed: can't read etc/config/settings.sh: No such file or directory suli@DESKTOP-O6HPOJM:~$ sed -i -e "s/export WM_CXX='g++'/export WM_CXX='g++-4.8'/" etc/config/settings.sh sed: can't read etc/config/settings.sh: No such file or directory Now blockMesh is working fine !!! but still simpleFoam is not working Code:
suli@DESKTOP-O6HPOJM:~/OpenFOAM/suli-2.2.x/run/pitzDaily$ simpleFoam Command 'simpleFoam' not found, but can be installed with: sudo apt install openfoam Code:
suli@DESKTOP-O6HPOJM:~/OpenFOAM/OpenFOAM-2.2.x$ icoFoam -help Command 'icoFoam' not found, but can be installed with: sudo apt install openfoam Code:
suli@DESKTOP-O6HPOJM:~/OpenFOAM/OpenFOAM-2.2.x$ grep -B 5 -A 5 -ie "Error" log.make | head -n 15 from ensight/part/ensightPart.C:26: /home/suli/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/boundBox.H:237:28: note: only here as a friend inline friend bool operator!=(const boundBox&, const boundBox&); ^~~~~~~~ ensight/part/ensightPart.C: In member function ‘bool Foam::ensightPart::isFieldDefined(const Foam::List<double>&) const’: ensight/part/ensightPart.C:54:39: error: ‘isnan’ was not declared in this scope if (id >= field.size() || isnan(field[id])) ^~~~~ ensight/part/ensightPart.C:54:39: note: suggested alternative: In file included from /home/suli/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/doubleFloat.H:32:0, from /home/suli/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/floatScalar.H:38, -- from ensight/part/ensightPart.C:26: /usr/include/c++/7/cmath:639:5: note: ‘std::isnan’ isnan(_Tp __x) 3. The space is available Code:
suli@DESKTOP-O6HPOJM:~/OpenFOAM/OpenFOAM-2.2.x$ df -h ~/OpenFOAM Filesystem Size Used Avail Use% Mounted on rootfs 232G 108G 124G 47% / |
|
April 14, 2019, 15:22 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answer: Sorry about the sed commands not working... I completely forgot to give the full path to those commands, the same way as the commands before those two...
I've updated the wiki page accordingly and the correct commands should be these: Code:
sed -i -e "s/export WM_CC='gcc'/export WM_CC='gcc-4.8'/" $WM_PROJECT_DIR/etc/config/settings.sh sed -i -e "s/export WM_CXX='g++'/export WM_CXX='g++-4.8'/" $WM_PROJECT_DIR/etc/config/settings.sh Then run Allwmake once again as indicated in step #9 on the wiki page, in the section for Ubuntu 18.04: https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04 This will essentially rebuild OpenFOAM completely, so that it will build with GCC 4.8 and not with GCC 7. The errors that you've gotten are due to using GCC 7, which OpenFOAM 2.2.x does not support. |
|
April 14, 2019, 16:58 |
|
#10 |
New Member
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
Thanks for following up
I literally followed all steps but I don't now why icoFoam is not working Code:
suli@DESKTOP-O6HPOJM:~/OpenFOAM/OpenFOAM-2.2.x$ icoFoam -help Command 'icoFoam' not found, but can be installed with: sudo apt install openfoam Also, is there a dot missing in last line or it is written correctly in my .bashrc ? referring to HTML Code:
https://www.cfd-online.com/Forums/openfoam-installation/77641-icofoam-command-not-found.html What is the most compatible Ubuntu version with OpenFOAM2.2.x? may be it is better to try that version if we don't have a solution to this. installation of version 5 was way easier than this, I hope I can find a solution to this I am really thankful to you Mr. Bruno for you help! Last edited by Suliman; April 15, 2019 at 05:35. |
|
April 15, 2019, 17:32 |
|
#11 |
New Member
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
After losing hope,
I think the problem is solved using Gcc4.8 All the best |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 11:58 |
problem with parmetis-3.1.1 installation for openfoam 1.6-ext | achyutan | OpenFOAM Installation | 11 | October 26, 2012 18:18 |
Openfoam installation problem | jose soto | OpenFOAM Installation | 4 | August 9, 2011 01:29 |
OpenFOAM 1.7.0 installation problem | stevek | OpenFOAM | 14 | December 1, 2010 15:30 |
Problem in installation of OpenFOAM | sachin | OpenFOAM Installation | 7 | January 22, 2008 01:40 |