|
[Sponsors] |
[foam-extend.org] Installing FOAM-Extend 4.0 on Ubuntu 20.04 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 20, 2020, 04:27 |
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: 6 |
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 |
|
July 8, 2020, 09:08 |
|
#2 |
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18 |
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 |
|
July 13, 2020, 17:03 |
|
#3 | |
New Member
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 6 |
Quote:
Hi Sita, you are right, I just updated the readme file with the https link! Thanks! |
||
August 5, 2020, 20:56 |
|
#4 |
New Member
Elaxender david
Join Date: Nov 2017
Posts: 17
Rep Power: 9 |
[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 |
|
August 6, 2020, 21:39 |
|
#5 |
New Member
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 6 |
||
August 7, 2020, 14:52 |
|
#6 |
New Member
André da Luz Moreira
Join Date: Feb 2019
Posts: 4
Rep Power: 7 |
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. |
|
August 7, 2020, 20:52 |
|
#7 | |
New Member
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 6 |
Quote:
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). |
||
August 15, 2020, 21:54 |
It osen't work
|
#8 | |
New Member
Elaxender david
Join Date: Nov 2017
Posts: 17
Rep Power: 9 |
Quote:
Hello I tried to do it on ubuntu20.04, but failed. |
||
March 21, 2021, 15:09 |
|
#9 |
New Member
|
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 ? |
|
March 22, 2021, 04:31 |
|
#10 |
New Member
André da Luz Moreira
Join Date: Feb 2019
Posts: 4
Rep Power: 7 |
||
March 22, 2021, 04:37 |
|
#11 | |
New Member
André da Luz Moreira
Join Date: Feb 2019
Posts: 4
Rep Power: 7 |
Quote:
|
||
November 6, 2021, 06:15 |
Unable to install using gitlab link
|
#12 |
Member
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 5 |
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. |
|
November 6, 2021, 07:05 |
Unable to install using gitlab link
|
#13 |
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18 |
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 Code:
alias fe40='source $HOME/foam/foam-extend-4.0/etc/bashrc' Sita |
|
November 6, 2021, 12:01 |
|
#14 |
Member
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 5 |
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. |
|
November 7, 2021, 06:19 |
Unable to install using gitlab link
|
#15 |
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18 |
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 Code:
echo $WM_PROJECT_DIR 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 |
|
November 8, 2021, 06:59 |
|
#16 |
Member
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 5 |
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? |
|
November 8, 2021, 07:04 |
|
#17 |
Member
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 5 |
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? |
|
November 8, 2021, 09:46 |
Unable to install using gitlab link
|
#18 |
Senior Member
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18 |
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). |
|
November 8, 2021, 14:03 |
|
#19 |
Member
Merlin Williams
Join Date: Nov 2021
Posts: 71
Rep Power: 5 |
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. |
|
November 8, 2021, 19:24 |
|
#20 |
New Member
Sergio Fraile
Join Date: Jun 2020
Location: California, USA
Posts: 7
Rep Power: 6 |
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. |
|
Tags |
foam-extend 4.0, installation guide, ubuntu 20.04 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |