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

[OpenFOAM.com] Install OpenFOAM 2.1.x on ubuntu 22.04

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2022, 09:32
Default Install OpenFOAM 2.1.x on ubuntu 22.04
  #1
New Member
 
I. L.
Join Date: Aug 2022
Location: Germany
Posts: 5
Rep Power: 3
i.linch is on a distinguished road
Dear all,

I am trying to reactivate some self-made rather old OF solver, originally implemented with OF 2.1.x.


My rough plan is first to compile OF 2.1.x to ensure the solver is working prior to thinking of re-implementation the solver in a up-to-date OF framework.


Since my current system is Ubuntu 22.04 and since OF 2.1 is pretty old, I experience several complications. Several per-requisite packages available for Ubuntu 22.04 seem to be way too modern for OF 2.1. Since I couldn't find precompiled packages old enough for OF 2.1, I decided to locally compile the required packages. Therefore I used following list: https://github.com/OpenFOAM/ThirdParty-2.1.x


I tried to compile GCC 4.6.1 and also the latest GCC-4 version 4.9.4 and both wasn't successful.


Trying to compile GCC 4.6.1 failed on my system with following error:
Code:
In file included from /home/ilya/OpenFOAM/ThirdParty-2.1.x/gcc-4.6.1/libgcc/../gcc/unwind-dw2.c:333:0:
/home/ilya/OpenFOAM/ThirdParty-2.1.x/gcc-4.6.1/libgcc/../gcc/config/i386/linux-unwind.h: In function ‘x86_64_fallback_frame_state’:
 /home/ilya/OpenFOAM/ThirdParty-2.1.x/gcc-4.6.1/libgcc/../gcc/config/i386/linux-unwind.h:54:47: error: dereferencing pointer to incomplete type
Does anyone have an idea, how to overcome this issue?


Trying to compile GCC 4.9.4 as an alternative failed with following error:
Code:
checking for gmp.h... no
 configure: error: gmp.h header not found
I do not really understand the header error since gmp was already locally compiled at this moment, but the GCC installer seems to look for system-gmp intead of the local one (s. previous log enties):
Code:
---------------
Already built: gmp-5.0.2
---------------
Already built: mpfr-3.0.1
---------------
Already built: mpc-0.9
---------------
Starting build: gcc-4.9.4

+ /home/ilya/OpenFOAM/ThirdParty-2.1.x/gcc-4.9.4/configure --prefix=/home/ilya/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gcc-4.9.4 --with-gmp=/home/ilya/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gmp-5.0.2 --with-mpfr=/home/ilya/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/mpfr-3.0.1 --with-mpc=/home/ilya/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/mpc-0.9 --with-pkgversion=OpenFOAM --enable-languages=c,c++ --enable-__cxa_atexit --enable-libstdcxx-allocator=new --with-system-zlib


....

checking for the correct version of gmp.h... yes
...

checking for the correct version of the gmp/mpfr/mpc libraries... yes
...

checking which gmp to use... system
checking gmp.h usability... yes
...
checking for gmp.h... no
configure: error: gmp.h header not found
I would appreciate any help on getting OF 2.1 run.

Cheers
Attached Files
File Type: zip makeGcc46.zip (2.0 KB, 1 views)
File Type: zip makeGcc49.zip (2.0 KB, 0 views)
File Type: zip log.makeGcc49.zip (8.2 KB, 0 views)

Last edited by i.linch; August 31, 2022 at 05:28.
i.linch is offline   Reply With Quote

Old   August 31, 2022, 04:53
Default
  #2
Member
 
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4
überschwupper is on a distinguished road
Good morning,


I have tried this with Ubuntu 20.4 and wasnt able to solve that. It was really time consuming and the outcome was nothing.



One thing I would give a try, is to use a virtual machine with an older ubuntu version and installing OF on that version
überschwupper is offline   Reply With Quote

Old   August 31, 2022, 05:11
Default
  #3
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 347
Rep Power: 11
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
I used OpenFOAM 2.1.1 in Ubuntu 16.04 and it worked fine. Versions higher than 16.04 cause serious compatibility issues.*
Install compatible Ubuntu versions for OF 2.1.x in the virtual box.*
Kummi is offline   Reply With Quote

Old   August 31, 2022, 05:38
Default
  #4
New Member
 
I. L.
Join Date: Aug 2022
Location: Germany
Posts: 5
Rep Power: 3
i.linch is on a distinguished road
Thanks a lot überschwupper and Kummi,


Could you please also explain what are the advantages and the disadvantages of installing 16.04 in a virtual machine versus usual installation on a separate partition?


Cheers
i.linch is offline   Reply With Quote

Old   August 31, 2022, 05:57
Default
  #5
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 347
Rep Power: 11
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Quote:
Originally Posted by i.linch View Post
Thanks a lot überschwupper and Kummi,


Could you please also explain what are the advantages and the disadvantages of installing 16.04 in a virtual machine versus usual installation on a separate partition?


Cheers
In order to use OpenFoam 2.1.x, ubuntu 16.04 and lower versions are compatible.*

Assuming you're running Windows or a Linux-based higher-version operating system on your computer. So, instead of installing and rebooting Ubuntu 16.04, install a software called Virtual Box. This software is a separate machine that helps you install any OS within the software without affecting your main computer. However, you need to allocate some memory space and RAM for it.

Thank you
Kummi is offline   Reply With Quote

Old   August 31, 2022, 09:12
Default
  #6
Member
 
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4
überschwupper is on a distinguished road
Both options have their advantages and disadvantages, you can find them via a quick google research.

Lower ubuntu versions may be out of support and there are some security risks because of that. I would go for a VM set up, especially when you are calculating on a different device. Far more comfortable and you are able to work on your main OS with your applications
überschwupper is offline   Reply With Quote

Old   September 7, 2022, 08:39
Default
  #7
New Member
 
Join Date: Mar 2010
Posts: 11
Rep Power: 16
samaraseeri is on a distinguished road
You can install openfoam and gcc with apt-get see https://openfoam.org/download/8-ubuntu/. beset
samaraseeri is offline   Reply With Quote

Reply

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
[OpenFOAM.org] Install OpenFOAM 6 on Ubuntu 16.04 without root access DoQuocVu OpenFOAM Installation 1 December 27, 2019 16:27
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 08:51
[OpenFOAM.org] Install openFOAM 3.0.1 in Ubuntu 16.04 LTS from Deb packs Pier84 OpenFOAM Installation 4 June 18, 2016 16:22
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
Error trying to install 2.1.x on Ubuntu 12.04 Tetragramm OpenFOAM Installation 2 June 26, 2012 07:21


All times are GMT -4. The time now is 03:58.