|
[Sponsors] |
[foam-extend.org] Install foam-extend-4.0 on Ubuntu 20.04.1 LTS |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 12, 2020, 23:09 |
Install foam-extend-4.0 on Ubuntu 20.04.1 LTS
|
#1 |
Senior Member
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21 |
Hello to everyone,
As many of you may need to run solids4Foam toolbox with all available features, it is recommended to use foam-extend-4.0 instead of foam-extend-4.1 as it seems to have some stability issues. Ubuntu 20.04.1 LTS doesn't come with gcc-5 and qt-4 out of the box and installing these packages using previous versions' repositories is not recommended as it may cause incompatibility and unexpected behavior through out the system. So here, we build both libraries from scratch to avoid any possible conflicts in the future. 1. First, we need to build gcc-5.5 from source: Although gcc-5 can be built successfully using "ThirdParty" scripts of foam-extend itself, the rest of the ThirdParty packages that depend on it fail to link against correct libraries properly after installing Ubuntu 20.04.1 LTS (It used to work on Ubuntu 19.10). Therefore, we build and install gcc-5 with the following approach and set foam-extend-4.0 up to use it during the compile process. 1-1 Create a folder called "workspace" in your "home" directory, you can name the folder what ever you want as it does not matter! 1-2 Download gcc-5 patch attached and put inside "workspace" folder. Note: gcc-5 needs to be patched for glib compatibility, otherwise it fails to build. 1-3 Now open the terminal and follow the instructions: Code:
cd ~ cd workspace wget https://ftpmirror.gnu.org/gcc/gcc-5.5.0/gcc-5.5.0.tar.gz tar xf gcc-5.5.0.tar.gz cd gcc-5.5.0 patch -p1 < ../glib.sanitizer.patch contrib/download_prerequisites Code:
cd .. mkdir build && cd build // Now configure gcc-5 ../gcc-5.5.0/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-5.5 --enable-checking=release --enable-languages=c,c++,fortran --enable-shared --disable-multilib --program-suffix=-5 // Change 4 to any number based on the available CPU cores make -j 4 > log.make 2>&1 // Inspect log.make for possible errors before proceeding to install sudo make install-strip Code:
/usr/local/gcc-5.5 2. Building foam-extend-4.0 Here I assume that you have already installed all the required libraries needed to build foam-extend-4.0 with the exception of qt4 and gcc-5. 2-1 Create "foam" directory and clone foam-extend-4.0 Code:
cd ~ mkdir foam cd foam git clone git://git.code.sf.net/p/foam-extend/foam-extend-4.0 foam-extend-4.0 2-2 Download the attached files and put them inside foam-extend-4.0 directory according to the following instruction: file name: fe40.patch Code:
foam/foam-extend-4.0/ Code:
foam/foam-extend-4.0/etc/ Code:
foam/foam-extend-4.0/ThirdParty/rpmBuild/SOURCES/ Code:
foam/foam-extend-4.0/ThirdParty/rpmBuild/SPECS/ Code:
foam/foam-extend-4.0/ThirdParty/rpmBuild/SOURCES/ Code:
bison-3.2.4.tar.gz cmake-3.12.1.tar.gz hwloc-1.10.1.tar.gz libccmio-2.6.1.tar.gz mesquite-2.1.2.tar.gz metis-5.1.0.tar.gz ParaView-v4.4.0-source.tar.gz parmetis-4.0.3.tar.gz ParMGridGen-1.0.tar.gz PyFoam-0.6.4.tar.gz qt-everywhere-opensource-src-4.8.7.tar.gz scotch_6.0.4.tar.gz 2.3 Open terminal and set the environment variables: Code:
cd ~/foam/foam-extend-4.0 source etc/bashrc echo "alias fe40='source \$HOME/foam/foam-extend-4.0/etc/bashrc'" >> $HOME/.bashrc 2.4 Now open terminal and start building foam-extend-4.0 Important: It also includes building qt 4.8.7 and paraview 4.4.0 with MPI, and python enabled by default. Code:
cd ~/foam/foam-extend-4.0 git apply fe40.patch // source foam-extend fe40 // build ThirdParty packages, change 4 based on the available CPU cores export WM_NCOMPPROCS=4 cd $WM_THIRD_PARTY_DIR ./AllMake.stage1 > log.stage1.make 2>&1 ./AllMake.stage2 > log.stage2.make 2>&1 ./AllMake.stage3 > log.stage3.make 2>&1 ./AllMake.stage4 > log.stage4.make 2>&1 // Now build foam-extend-4.0 fe40 cd $WM_PROJECT_DIR ./Allwmake > log.make 2>&1 // Create user directory mkdir -p $FOAM_RUN cp -r $FOAM_TUTORIALS $FOAM_RUN Note: I will probably create a repository to automate all these steps for further convenience Hope it helps... D. Khazaei |
|
May 12, 2021, 04:14 |
Some packages were not found
|
#2 |
New Member
Jiayu Sun
Join Date: Jul 2020
Location: Harbin,China
Posts: 18
Rep Power: 6 |
Hi Daniel,
Thank you for your sharing. It really helps me a lot. But I got stuck in step 2.2. I couldn't find all the packages you mentioned. The packages I didn't find are bison-3.2.4.tar.gz, cmake-3.12.1.tar.gz, parmetics-4.0.3.tar.gz, PyFoam-0.6.4.tar.gz, qt-everywhere-opensource-src-4.8.7.tar.gz. I'm sorry to disturb you.It can be found directly by Google. Jiayu Sun Last edited by Richal Sun; May 12, 2021 at 04:42. Reason: Solved |
|
May 23, 2021, 06:54 |
|
#3 |
New Member
bunyamin ismail alkis
Join Date: Feb 2019
Posts: 1
Rep Power: 0 |
ismail@ENASUS:~/foam/foam-extend-4.0$ git apply fe40.patch
error: patch failed: ThirdParty/tools/makeThirdPartyFunctionsForRPM:177 error: ThirdParty/tools/makeThirdPartyFunctionsForRPM: patch does not apply error: patch failed: wmake/rules/linux64Gcc/c:2 error: wmake/rules/linux64Gcc/c: patch does not apply error: patch failed: wmake/rules/linux64Gcc/c++:2 error: wmake/rules/linux64Gcc/c++: patch does not apply Anyone can help me resolve this ? |
|
May 23, 2021, 07:56 |
Will this work for Fedora?
|
#4 | |
Senior Member
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 141
Rep Power: 10 |
Quote:
|
||
November 5, 2021, 14:29 |
|
#5 |
Member
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 12 |
This post was really useful for me, thank you!
I don't know if this can be related to installation, but I am facing problems when running cases or meshing in parallel. For example, snappy seems to work in parallel but when it is about to write castellated mesh (1 folder), it returns the following message: Doing final balancing --------------------- Found 0 zoned faces to keep together. [0] Number of cells in new mesh : 5 [0] Number of faces in new mesh : 26 [0] Number of points in new mesh: 26 [2] Number of cells in new mesh : 20086 [2] Number of faces in new mesh : 81972 [2] Number of points in new mesh: 43650 [1] Number of cells in new mesh : 3199 [1] Number of faces in new mesh : 17227 [1] Number of points in new mesh: 13341 [1] Number of cells in new mesh : 24987 [1] Number of faces in new mesh : 111291 [1] Number of points in new mesh: 64087 [0] [0] [0] --> FOAM FATAL ERROR: [0] Problem. oldPointI:1953206 newPointI:-1 [0] [0] From function fvMeshDistribute::mergeSharedPoints() [0] in file fvMeshDistribute/fvMeshDistribute.C at line 613. [0] FOAM parallel run aborting [0] -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode 1. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. Any ideas about why this is happening? Thanks in advance foamers! |
|
March 11, 2022, 03:10 |
foam-extend-4.0 Docker Version
|
#6 |
New Member
Panchatcharam Mariappan
Join Date: Apr 2014
Posts: 17
Rep Power: 12 |
I have tried these combinations, but it did not work well. I have created the trusty version of Ubuntu (14.04) in docker and installed foam-extend-4.0. This works fine.
You can pull the images from docker Code:
docker pull pmariappan/foam-extend-4.0:latest docker -it pmariappan/foam-extend-4.0:latest bash |
|
May 3, 2023, 15:03 |
Foam extend 4.1 for Ubuntu 22.04
|
#7 |
New Member
Jefferson Galeano
Join Date: May 2023
Posts: 4
Rep Power: 3 |
Hello
How can I install Foam extend 4.1 in Ubuntu 22.04? I already try with this link: https://openfoamwiki.net/index.php/I...end-4.1/Ubuntu, but it doesn't works, as seen in the attachment. Any suggestion? |
|
November 7, 2023, 00:47 |
|
#8 | |
New Member
Join Date: Sep 2022
Posts: 3
Rep Power: 4 |
Quote:
|
||
November 8, 2023, 20:03 |
|
#9 |
New Member
Jefferson Galeano
Join Date: May 2023
Posts: 4
Rep Power: 3 |
I managed to fix it, what I did was delete one of the commands, which apparently the version does not recognize or already has it, so when I deleted it not long ago, this is how the command remained:
sudo apt-get install git-core build-essential binutils-dev cmake flex \ zlib1g-dev libncurses5-dev curl bison gnuplot gnuplot-qt gnuiplot-data \ libxt-dev rpm mercurial graphviz python3 python3-dev I selected version 18 |
|
November 10, 2023, 07:02 |
|
#10 | |
New Member
Join Date: Sep 2022
Posts: 3
Rep Power: 4 |
Quote:
|
||
May 17, 2024, 12:17 |
|
#11 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18 |
yes, you can install fe40, fe41, fe50 on ubuntu 22. fe40 and fe41 requires gcc 4.8. Thats all. Thirdparty like metis or somthing else is difficult to compile. But gcc4.8 compiles all the solvers and utilities.
I install all these openfoams in vmware. OpenFOAM-11 of11 OpenFOAM-10 of10 OpenFOAM-9 of9 OpenFOAM-8 of8 OpenFOAM-7 of7 OpenFOAM-6 of6 OpenFOAM-5.x of5x OpenFOAM-3.x of3x OpenFOAM-v2306 of2306 OpenFOAM-v2206 of2206 OpenFOAM-v2106 of2106 OpenFOAM-v2006 of2006 OpenFOAM-v1906 of1906 foam-extend-4.0 fe40 foam-extend-4.1 fe41 foam-extend-5.0 fe50 This is the link: https://pan.baidu.com/s/18vKWVbadh-F...N6IFw?pwd=p698
__________________
My OpenFOAM algorithm website: http://dyfluid.com By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
[foam-extend.org] Installing FOAM-Extend 4.0 on Ubuntu 20.04 | serfriz | OpenFOAM Installation | 19 | November 8, 2021 19:24 |
[foam-extend.org] Installing Foam Extend 4.0 on Linux Mint | andysuth | OpenFOAM Installation | 1 | May 11, 2019 09:37 |
[swak4Foam] Basic Error when installing swak4foam with foam extend 3.0 | mnobrega | OpenFOAM Community Contributions | 6 | April 1, 2014 02:47 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |