|
[Sponsors] |
[OpenFOAM.com] How to compile the same version twice on a cluster? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 7, 2021, 03:54 |
How to compile the same version twice on a cluster?
|
#1 |
Member
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 10 |
Dear OpenFoam Users,
I need to run the same OpenFoam version twice on a cluster. Once without any changes and once with custom changes. Since I have a long simulation running I can't test freely and ask you for advice on how to do it properly. My, probably stupid, idea was to just copy the files, call them OpenFoam2012b and compile them. But it can't be that easy right? Do I have to modify any make files or something so that only the in OpenFoam2012b are used? The thirdparty files are still the same, will it hurt the running installation of OpenFaom if I compile them again with the new version? Any help is appreciated! Greetings Teresa |
|
September 7, 2021, 11:31 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
Depending on the depth of changes you are trying to make they can very often be embedded into custom library instead of touching the OpenFOAM sources themselves. In some cases people don't know how to do this so they just start modifying existing models. In other cases you may need a low-level change that cannot be achieved otherwise.
For the third-party bits: in most cases you can simply reuse the same directory. I probably have about 20 or more OpenFOAM versions/repos all using the same ThirdParty. I call it "ThirdParty-common" and use a symlimk everywhere. |
|
September 8, 2021, 04:12 |
|
#3 |
Member
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 10 |
Thank you for your reply, olesen.
I indeed do not now how to make my changes using custom libraries. With modified solvers this is rather simple but parts that are used by many solvers are an issue for me. It is difficult for me to fully understand the dependencies and recent changes between versions made it even more difficult, although they sure are making it easier for people with the needed experience. I think I would need to copy all the phasesystem files, make a modified solver and find all the references within it to refer to the new phasesystem... compile it and hope for the best. But that is something I need to postpone until after some nearing deadlines. I wonder will an Openfoam who's name ist just changed compile correctly using the same old third party or do I have to make more changes for it to not interfere with the regulary named Openfoam? |
|
September 8, 2021, 07:28 |
|
#4 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
Quote:
Here are some notes about ThirdParty locations/naming etc. https://develop.openfoam.com/Develop...arty-directory I normally use the "-common" suffix mentioned in the notes with a central directory that holds various sources and compiled libraries and symlink it. For example, Code:
# My regular OpenFOAM and ThirdParty repos ~/openfoam/OpenFOAM-com ~/openfoam/ThirdParty-common # Maintenance repos ~/openfoam/main/2012/OpenFOAM-v2012 ~/openfoam/main/2012/ThirdParty-common -> ../../ThirdParty-common ~/openfoam/main/2106/OpenFOAM-v2106 ~/openfoam/main/2106/ThirdParty-common -> ../../ThirdParty-common # Misc work-in-progress repos ~/openfoam/work/some-idea1/OpenFOAM-com ~/openfoam/work/some-idea1/ThirdParty-common -> ../../ThirdParty-common ... |
||
September 9, 2021, 03:02 |
|
#5 |
Member
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 10 |
Thanks again, Olesen.
This is very helpful! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
reactingFoam crashes with no iterations | uckmhnds | OpenFOAM Running, Solving & CFD | 3 | July 17, 2022 18:41 |
[PyFoam] Installing PyFoam from pip, can't tell if its installed correctly? | EternalSeekerX | OpenFOAM Community Contributions | 0 | June 6, 2021 20:23 |
NACA0012 validation with different OF version | Ivangzp | OpenFOAM Running, Solving & CFD | 0 | February 17, 2021 11:34 |
Error building version 5.0.0 on cluster | tomf | SU2 Installation | 2 | April 2, 2017 11:56 |
wmake error | zxj160 | OpenFOAM | 0 | March 26, 2012 10:52 |