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

[OpenFOAM.org] Problem in installation of OpenFOAM 2.2.x

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By wyldckat
  • 1 Post By wyldckat
  • 2 Post By Suliman

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2019, 11:50
Default Problem in installation of OpenFOAM 2.2.x
  #1
New Member
 
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7
Suliman is on a distinguished road
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
Attached Images
File Type: jpg 1.jpg (166.5 KB, 113 views)
File Type: png 2.PNG (40.3 KB, 112 views)
File Type: png 3.PNG (59.8 KB, 113 views)
Suliman is offline   Reply With Quote

Old   April 12, 2019, 19:49
Default Problem in installation of OpenFOAM 2.2.x
  #2
New Member
 
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7
Suliman is on a distinguished road
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?
Attached Images
File Type: png 2.PNG (40.3 KB, 7 views)
File Type: png 3.PNG (59.8 KB, 6 views)
Suliman is offline   Reply With Quote

Old   April 12, 2019, 21:01
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
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 *
This will reassign ownership of all folders within "~/OpenFOAM" to the username "suli".
Suliman likes this.
__________________
wyldckat is offline   Reply With Quote

Old   April 13, 2019, 16:18
Default
  #4
New Member
 
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7
Suliman is on a distinguished road
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 ?
Attached Images
File Type: png 11.PNG (23.4 KB, 8 views)
File Type: png logmake.PNG (25.8 KB, 6 views)

Last edited by Suliman; April 13, 2019 at 18:14.
Suliman is offline   Reply With Quote

Old   April 13, 2019, 18:52
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
Quote:
Originally Posted by Suliman View Post
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 )
The instructions on the wiki indicate that what matters is the first error message... and how to package the file so that it can be attached here... but I guess that you cannot attach files from the computer...

Therefore, please run the following command:
Code:
grep -B 5 -A 5 -ie "Error" log.make | head -n 15
This will show the first occurrence of an error and tell us more about what actually happened.

Quote:
Originally Posted by Suliman View Post
Do you suggest to follow instructions:
sudo apt install foam ?
No, because it will not install version 2.2.

Which Ubuntu version are you using?
Suliman likes this.
wyldckat is offline   Reply With Quote

Old   April 13, 2019, 19:15
Default
  #6
New Member
 
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7
Suliman is on a distinguished road
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.
You can compress the file with gzip by running this command:
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
Attached Images
File Type: png 33333333.PNG (45.2 KB, 5 views)
File Type: png 444444.PNG (29.6 KB, 3 views)
File Type: jpg 2222.jpg (88.4 KB, 7 views)
File Type: jpg bin.jpg (87.7 KB, 4 views)

Last edited by Suliman; April 14, 2019 at 11:50.
Suliman is offline   Reply With Quote

Old   April 14, 2019, 12:08
Default
  #7
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
Quick answers:
  1. Since you're using Ubuntu on WSL and it looks like it's Ubuntu 18.04, therefore you should be following the build instructions from here: https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04 - it's for OpenFOAM 2.2.2 and Ubuntu 18.04, but it should work well with OpenFOAM 2.2.x.
  2. I'm not entirely familiar with WSL, but you can copy via command line to your drives on Windows, by checking the paths at "/mnt"... see section "What can I do with WSL?": https://docs.microsoft.com/en-us/win...-i-do-with-wsl - and it should be after the first image on that section.
  3. The error message you've gotten is usually due to missing files or something breaking up during the first build steps. Just in case it's a problem with disk space, run this command to check how much is available:
    Code:
    df -h ~/OpenFOAM
wyldckat is offline   Reply With Quote

Old   April 14, 2019, 13:49
Default
  #8
New Member
 
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7
Suliman is on a distinguished road
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
and even (icoFoam -help) was working and now it displays:

Code:
suli@DESKTOP-O6HPOJM:~/OpenFOAM/OpenFOAM-2.2.x$ icoFoam -help

Command 'icoFoam' not found, but can be installed with:

sudo apt install openfoam
2. I followed your instructions and I attached log.make file, however when I run this command I am getting different message from previous one:

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% /
Attached Files
File Type: gz log.make.gz (24.3 KB, 1 views)
Suliman is offline   Reply With Quote

Old   April 14, 2019, 15:22
Default
  #9
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
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
However, you will need to refresh the OpenFOAM shell environment, in order for these to work properly, namely by running the alias name you defined.

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.
wyldckat is offline   Reply With Quote

Old   April 14, 2019, 16:58
Default
  #10
New Member
 
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7
Suliman is on a distinguished road
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
I attached the new log.make file may be of interest to know the problem.

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
the solver simpleFoam also is not found.

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!
Attached Images
File Type: png Capture.PNG (66.0 KB, 4 views)
Attached Files
File Type: gz log.make.gz (17.6 KB, 1 views)

Last edited by Suliman; April 15, 2019 at 05:35.
Suliman is offline   Reply With Quote

Old   April 15, 2019, 17:32
Default
  #11
New Member
 
zool
Join Date: Apr 2019
Posts: 9
Rep Power: 7
Suliman is on a distinguished road
After losing hope,

I think the problem is solved using Gcc4.8

All the best
wyldckat and aerospaceman like this.
Suliman 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
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


All times are GMT -4. The time now is 06:59.