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

[OpenFOAM.org] Moving OF-bin from fedora over to ubuntu 19.10

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

Like Tree1Likes
  • 1 Post By JonW

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 10, 2019, 16:14
Default Moving OF-bin from fedora over to ubuntu 19.10
  #1
Member
 
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 94
Rep Power: 15
JonW will become famous soon enough
I usually compile openfoam on a fedora pc and thereafter just tarball the whole thing and put it (i.e. the OF) on the computer it needs to be on. Recently, I have set up ubuntu 19.10 on one of the pc at work. However, moving binaries between fedora and ubuntu requires only few mods and the following is what I have done,...

(1)
sudo ln -s /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.40.10.3 /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.20

(2)
...and to make paraview work as before, then...

sudo ln -s /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so.40.10.0 /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so.20

(3)
Finally in .bash_alias, then I but...

alias of6='export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/openmpi/lib/:$LD_LIBRARY_PATH && source $HOME/OpenFOAM/OpenFOAM-6/etc/bashrc && PS1="[of6][\W] " '


This has worked on OpenFOAM 6, as well as on OpenFOAM 2.3.1 (haven't tested this on other versions).NB! This might also work if you are working with opensuse/ubuntu as well.


Hope this is of some help
cheers
gcengineer likes this.
JonW is offline   Reply With Quote

Old   December 27, 2019, 16:22
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,956
Blog Entries: 43
Rep Power: 122
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 question: But are you now able to compile new custom code with OpenFOAM on the Ubuntu machine?
Because that is usually the only problem that can happen in this kind of installation transfer between two different Linux Distributions and/or versions.

Another detail to keep in mind is that the symbolic links you are creating should be for compatible MPI libraries.

Beyond this, if you're willing to look into it, there is something named AppImage https://appimage.org/ - which allows compiling an application in one distribution and deploy it in any other. I have been wanting to look into this myself, but haven't found the time to do it, but for OpenFOAM it's less straight forward as well, given that OpenFOAM does not provide only a single executable...
__________________
wyldckat is offline   Reply With Quote

Old   December 30, 2019, 16:33
Default
  #3
Member
 
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 94
Rep Power: 15
JonW will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
Quick question: But are you now able to compile new custom code with OpenFOAM on the Ubuntu machine?
Because that is usually the only problem that can happen in this kind of installation transfer between two different Linux Distributions and/or versions.

Another detail to keep in mind is that the symbolic links you are creating should be for compatible MPI libraries.

Beyond this, if you're willing to look into it, there is something named AppImage https://appimage.org/ - which allows compiling an application in one distribution and deploy it in any other. I have been wanting to look into this myself, but haven't found the time to do it, but for OpenFOAM it's less straight forward as well, given that OpenFOAM does not provide only a single executable...

Hi and sorry for the late reply
Yes, new solvers can be compiled.
The funny thing is, before I made the link to the mpilibs, nothing worked, not even what had already been compiled. What I got for any app I tried was...

[2.3.1][~] foamToVTK -help
foamToVTK: error while loading shared libraries: libmpi.so.20: cannot open shared object file: No such file or directory

I guessing many of the classes either has-a or is-a base-class that includes mpi stuff (?)

Cheers
J.


P.S. I will look at the stuff you recommended above, thanks for the info.
JonW is offline   Reply With Quote

Old   January 20, 2020, 09:05
Default moving Fedora 29 bins over to fresh install of Fedora 31
  #4
Member
 
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 94
Rep Power: 15
JonW will become famous soon enough
Dear fedora folks:

...same problem when moving bins from f29 over to f31 (i.e. with fresh install of f31).

Do...

sudo ln -s /usr/lib64/openmpi/lib/libmpi.so.40.20.2 /usr/lib64/openmpi/lib/libmpi.so.20
sudo ln -s /usr/lib64/openmpi/lib/libmpi_cxx.so.40.20.1 /usr/lib64/openmpi/lib/libmpi_cxx.so.20

...and with .bashrc (at least this works for me)...

alias of23x='export PATH=/usr/lib64/openmpi/bin/:$PATH && export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib/:$LD_LIBRARY_PATH && source $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc && PS1="[2.3.x][\W] " '

Hope this helps
cheers
J.


New info: I was bit too fast here
this works for OF2.3.1, but not for higher versions. Fedora 31 is apparently little bit more trouble than ubuntu 19.10.
JonW 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
HELP - Moving car simulation in fluent Brad Wells FLUENT 7 January 4, 2018 19:55
[snappyHexMesh] jagged, ragged edges... ziemowitzima OpenFOAM Meshing & Mesh Conversion 138 July 23, 2012 23:41
[Other] How to set up a dynamic mesh for a piston moving through a tube of variable diameter? karkar OpenFOAM Meshing & Mesh Conversion 0 July 4, 2012 06:54
Moving mesh in Fluent fivos FLUENT 0 April 2, 2010 09:45
moving cylinder blur boy Main CFD Forum 4 October 12, 2001 05:32


All times are GMT -4. The time now is 19:17.