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

[foam-extend.org] Installing FOAM-Extend 4.0 on Ubuntu 20.04

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes
  • 4 Post By serfriz
  • 1 Post By serfriz
  • 2 Post By MFWilliams

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2020, 04:27
Post Installing FOAM-Extend 4.0 on Ubuntu 20.04
  #1
New Member
 
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 4
serfriz is on a distinguished road
Hello everyone, I have spent some time this week trying to make foam-extend 4.0 work with my Ubuntu 20.04 installation. So I decided to share what I learned here and help other users. I created a git repository with the changes and steps needed to make it work: https://gitlab.com/serfriz/foam-extend-4.0-ubuntu-20.04

Please, note that my installation directory is ~/Apps/FOAM-Extend/ so if you want to install it in the default ~/foam/ folder you will have to modify the etc/bashrc file. Also, paraview is set to compile without python to avoid some compilation errors (I don't need it).

Please let me know if you have any questions!

Last edited by serfriz; June 20, 2020 at 04:35. Reason: fix link
serfriz is offline   Reply With Quote

Old   July 8, 2020, 09:08
Default
  #2
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 16
sita is on a distinguished road
Hi Sergio,

Brilliant, that's exactly what I was looking for, that'll save me loads of time (and frustration...), thanks a lot!

Just to let you know: to get the git clone working, I had to use the https-link, as the git version gave me a "Permission denied (publickey)" error. Could be a problem on my side, not sure, just thought I should let you know.

Best wishes,
Sita
sita is offline   Reply With Quote

Old   July 13, 2020, 17:03
Default
  #3
New Member
 
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 4
serfriz is on a distinguished road
Quote:
Originally Posted by sita View Post
Hi Sergio,

Brilliant, that's exactly what I was looking for, that'll save me loads of time (and frustration...), thanks a lot!

Just to let you know: to get the git clone working, I had to use the https-link, as the git version gave me a "Permission denied (publickey)" error. Could be a problem on my side, not sure, just thought I should let you know.

Best wishes,
Sita

Hi Sita, you are right, I just updated the readme file with the https link!


Thanks!
serfriz is offline   Reply With Quote

Old   August 5, 2020, 20:56
Default
  #4
New Member
 
Elaxender david
Join Date: Nov 2017
Posts: 17
Rep Power: 7
Engin.shlxtn is on a distinguished road
[QUOTE=serfriz;775251]Hello everyone, I have spent some time this week trying to make foam-extend 4.0 work with my Ubuntu 20.04 installation. So I decided to share what I learned here and help other users. I created a git repository with the changes and steps needed to make it work: https://gitlab.com/serfriz/foam-extend-4.0-ubuntu-20.04

Please, note that my installation directory is ~/Apps/FOAM-Extend/ so if you want to install it in the default ~/foam/ folder you will have to modify the etc/bashrc file. Also, paraview is set to compile without python to avoid some compilation errors (I don't need it).
Hello




It doesn't work in Linux mint20.I worked coordinating the points.

thanks
Engin.shlxtn is offline   Reply With Quote

Old   August 6, 2020, 21:39
Default
  #5
New Member
 
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 4
serfriz is on a distinguished road
Quote:
Originally Posted by Engin.shlxtn View Post
Hello

It doesn't work in Linux mint20.I worked coordinating the points.

thanks

Sorry, I haven't tried with Linux Mint. Some of the steps include installing packages for Ubuntu, so they might not work with Linux Mint.
Oliva likes this.
serfriz is offline   Reply With Quote

Old   August 7, 2020, 14:52
Default
  #6
New Member
 
André da Luz Moreira
Join Date: Feb 2019
Posts: 4
Rep Power: 5
andredaluzmoreira is on a distinguished road
Out of curiosity: any reason for using 4.0 instead of 4.1?

Btw, I'm finishing up a script to build a Docker image with foam-extend 4.1 base on Ubuntu 18.04, and I already have a script for a CentOS image. I'll post the link here when I make sure everything runs smoothly.
andredaluzmoreira is offline   Reply With Quote

Old   August 7, 2020, 20:52
Default
  #7
New Member
 
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 4
serfriz is on a distinguished road
Quote:
Originally Posted by andredaluzmoreira View Post
Out of curiosity: any reason for using 4.0 instead of 4.1?

Btw, I'm finishing up a script to build a Docker image with foam-extend 4.1 base on Ubuntu 18.04, and I already have a script for a CentOS image. I'll post the link here when I make sure everything runs smoothly.

I read there were still some bugs in foam-extend 4.1 and the library solids4foam is only fully compatible with foam-extend 4.0 (for now).
serfriz is offline   Reply With Quote

Old   August 15, 2020, 21:54
Default It osen't work
  #8
New Member
 
Elaxender david
Join Date: Nov 2017
Posts: 17
Rep Power: 7
Engin.shlxtn is on a distinguished road
Quote:
Originally Posted by serfriz View Post
Hello everyone, I have spent some time this week trying to make foam-extend 4.0 work with my Ubuntu 20.04 installation. So I decided to share what I learned here and help other users. I created a git repository with the changes and steps needed to make it work: https://gitlab.com/serfriz/foam-extend-4.0-ubuntu-20.04

Please, note that my installation directory is ~/Apps/FOAM-Extend/ so if you want to install it in the default ~/foam/ folder you will have to modify the etc/bashrc file. Also, paraview is set to compile without python to avoid some compilation errors (I don't need it).

Please let me know if you have any questions!

Hello


I tried to do it on ubuntu20.04, but failed.
Engin.shlxtn is offline   Reply With Quote

Old   March 21, 2021, 15:09
Default
  #9
New Member
 
Wassim Abdel Nour
Join Date: Feb 2021
Posts: 7
Rep Power: 3
wa$$im is on a distinguished road
Heelo serfriz,

Thank you for your post, this is exactly what i was looking for.

Unfortunately, i didn't succeed to compile, and my final output message was this:
Error: Current directory is not $WM_PROJECT_DIR
The environment variables are not consistent with the installation.
Please source configuration files.

Examples:
bash: . etc/bashrc
tcsh: source etc/cshrc

If you sourced the configuration files, please check the 'foamInstall' entry.


Whereas, i executed the commands in your tutorial line by line.
Do you mind, please, helping me finding the issue ?

I got the following output when sourcing:
wassim@MSI:~/Apps/FOAM-Extend/foam-extend-4.0$ source etc/bashrc
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/etc/settings.sh: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/etc/aliases.sh: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory

could it be the reason of failure ?
wa$$im is online now   Reply With Quote

Old   March 22, 2021, 04:31
Default
  #10
New Member
 
André da Luz Moreira
Join Date: Feb 2019
Posts: 4
Rep Power: 5
andredaluzmoreira is on a distinguished road
Quote:
Originally Posted by Engin.shlxtn View Post
Hello


I tried to do it on ubuntu20.04, but failed.
Can you be more specific on why it failed? You might be able to get some help this way...
andredaluzmoreira is offline   Reply With Quote

Old   March 22, 2021, 04:37
Default
  #11
New Member
 
André da Luz Moreira
Join Date: Feb 2019
Posts: 4
Rep Power: 5
andredaluzmoreira is on a distinguished road
Quote:
Originally Posted by wa$$im View Post
Heelo serfriz,

Thank you for your post, this is exactly what i was looking for.

Unfortunately, i didn't succeed to compile, and my final output message was this:
Error: Current directory is not $WM_PROJECT_DIR
The environment variables are not consistent with the installation.
Please source configuration files.

Examples:
bash: . etc/bashrc
tcsh: source etc/cshrc

If you sourced the configuration files, please check the 'foamInstall' entry.


Whereas, i executed the commands in your tutorial line by line.
Do you mind, please, helping me finding the issue ?

I got the following output when sourcing:
wassim@MSI:~/Apps/FOAM-Extend/foam-extend-4.0$ source etc/bashrc
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/etc/settings.sh: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/etc/aliases.sh: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory
-bash: /home/wassim/foam/foam-extend-4.0/bin/foamCleanPath: No such file or directory

could it be the reason of failure ?
Your environment variables seem to be configured wrong. I haven't looked at the tutorial you are following, but if you're running from a folder different from the standard one, you must modify your bashrc correctly. If I remember right, foam-extend does not recognise the the folder the installation files are located automatically, so anything different from the standard must be manually added.
andredaluzmoreira is offline   Reply With Quote

Old   November 6, 2021, 06:15
Default Unable to install using gitlab link
  #12
Member
 
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 3
MFWilliams is on a distinguished road
Hello,


I have tried to intall foam-extend-4.0 using the gitlab link posted but have failed to be able to install correctly.


The code compiles and the installation process finishes, but whenever I go to try run a tutorial case and input the command blockMesh, I get an error sayingthat command does not exise.


I am running it on WSL Ubuntu 20.04.
MFWilliams is offline   Reply With Quote

Old   November 6, 2021, 07:05
Default Unable to install using gitlab link
  #13
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 16
sita is on a distinguished road
Hi Merlin,

Silly question perhaps, but have you sourced foam-extend first? That is, did you enter a command like
Code:
source $HOME/foam/foam-extend-4.0/etc/bashrc
or does your .bashrc contain a line like
Code:
alias fe40='source $HOME/foam/foam-extend-4.0/etc/bashrc'
and did you use this alias before trying to run a tutorial?

Sita
sita is offline   Reply With Quote

Old   November 6, 2021, 12:01
Default
  #14
Member
 
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 3
MFWilliams is on a distinguished road
Hi Sita,


Yes i think I did do that. I entered these lines of code which are quoted in the gitlab page:


source etc/bashrc
echo "alias fe40='source \$HOME/Apps/FOAM-Extend/foam-extend-4.0/etc/bashrc'" >> $HOME/.bashrc



And yes I checked using 'nano' that the bashrc contained this line:
alias fe40='source $HOME/foam/foam-extend-4.0/etc/bashrc'





Yes i also initialised the alias using fe40 when starting up a new window of Ubuntu.
MFWilliams is offline   Reply With Quote

Old   November 7, 2021, 06:19
Default Unable to install using gitlab link
  #15
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 16
sita is on a distinguished road
Ah, too bad, well, it was worth a try... In that case I'm afraid it's going to be harder to find out what's wrong with your install. What's the response if you enter something like
Code:
echo $WM_PROJECT
or
Code:
echo $WM_PROJECT_DIR
These commands should return "foam" and the install directory of foam-extend, respectively. If they return nothing, the foam-extend environment wasn't loaded properly, most likely.

Also, if you look through the log.firstInstall file you created when compiling foam-extend (Step 6 in the GitLab instructions), do you encounter any error messages?

Sorry I can't be of more help, good luck!

Sita
sita is offline   Reply With Quote

Old   November 8, 2021, 06:59
Default
  #16
Member
 
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 3
MFWilliams is on a distinguished road
I did get these errors when doing step 3 of the gitlab instructions:


The following packages have unmet dependencies:
mercurial : Depends: mercurial-common (= 5.3.1-1ubuntu1) but it is not going to be installed
Depends: python2 (< 2.8) but it is not going to be installed
Depends: python2 (>= 2.7~) but it is not going to be installed
Depends: python2:any (< 2.8)
Depends: python2:any (>= 2.7~)
python : PreDepends: python-minimal (= 2.7.11-1) but it is not going to be installed
Depends: libpython-stdlib (= 2.7.11-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


Can anyone make any sense of this and help me out?
MFWilliams is offline   Reply With Quote

Old   November 8, 2021, 07:04
Default
  #17
Member
 
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 3
MFWilliams is on a distinguished road
Then I also got these errors when I inputted in 'source etc/bashrc':


-bash: /usr/bin/mpicc: No such file or directory
-bash: /usr/bin/mpicc: No such file or directory
-bash: /usr/bin/mpicc: No such file or directory
-bash: /usr/bin/mpicc: No such file or directory

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

sudo apt install lam4-dev # version 7.1.4-6build2, or
sudo apt install mpich # version 3.3.2-2build1
sudo apt install openmpi-bin # version 4.0.3-0ubuntu1


Again, can anybody help me with this?
MFWilliams is offline   Reply With Quote

Old   November 8, 2021, 09:46
Default Unable to install using gitlab link
  #18
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 16
sita is on a distinguished road
It looks like something went wrong when you tried to install the required libraries in step 3. Without these, your foam-extend install may fail (check the install log for errors to see whether this was indeed the case). Also, you seem to be missing mpicc, which means that you need to install one of the MPI packages listed in the error message (e.g. sudo apt install openmpi-bin openmpi-doc libopenmpi-dev).

I find it difficult to help you with this, but what you could try is to install the required libraries one by one, instead of all in one go (as is done in step 3 of the GitLab instructions). Then you can see for each package if anything goes wrong, and if so, whether you have a suitable alternative already installed (for example, my own Ubuntu 20.04 foam-extend install log says it used hg as a client for the mercurial stuff).
sita is offline   Reply With Quote

Old   November 8, 2021, 14:03
Default
  #19
Member
 
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 3
MFWilliams is on a distinguished road
Thank you for your help. I have managed to install correctly using the steps from the foam-extend 4.0 wiki page


My exact steps from a fresh installation of Ubuntu 20.04 to succesful compilation (without swak4foam) are listed in the attached document.
Attached Files
File Type: docx Successful Installation process.docx (17.3 KB, 47 views)
sita and Liz1219 like this.
MFWilliams is offline   Reply With Quote

Old   November 8, 2021, 19:24
Default
  #20
New Member
 
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 4
serfriz is on a distinguished road
Hey guys, sorry I haven't been very responsive, I saw some of you have issues with the installation directory and setting the environment variables. As I said in my first post, the repository is configured to install foam-extend in the directory "$HOME/Apps/FOAM-Extend/foam-extend-4.0", if you want to install it in the standard "$HOME/foam/foam-extend-4.0" you will have to modify the "etc/bashrc" file and the alias in "$HOME/.bashrc" to point to it. The line to modify is "foamInstall=$HOME/Apps/FOAM-ExtendfoamInstall=$HOME/Apps/FOAM-Extend"

Also make sure you source your $HOME/.bashrc and activate the environment with the alias before trying to run foam extend.
serfriz is offline   Reply With Quote

Reply

Tags
foam-extend 4.0, installation guide, ubuntu 20.04

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[foam-extend.org] How to install foam-extend 4.0 in UBUNTU 18.04 silvino OpenFOAM Installation 19 June 21, 2022 16:57
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 12:04
[swak4Foam] Basic Error when installing swak4foam with foam extend 3.0 mnobrega OpenFOAM Community Contributions 6 April 1, 2014 02:47
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 09:19


All times are GMT -4. The time now is 10:35.