|
[Sponsors] |
Dynamic code not compiling: codestream and #calc |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 16, 2021, 12:13 |
Dynamic code not compiling: codestream and #calc
|
#1 |
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 |
Hi Foamers,
I am using OpenFoam-v2012 on WSL. When my cases have #calc or #codestream, dynamic code failed to compile giving the following error: PHP Code:
Thank you Gebray |
|
April 16, 2021, 17:59 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
To reproduce the error, I think we need a minimal reproducible example.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
April 17, 2021, 13:56 |
|
#3 | ||
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 |
Quote:
For example let see this blockMeshdict : Quote:
|
|||
April 17, 2021, 16:30 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
One issue is the missing dollar sign for the following variables:
hex (0 1 2 3 4 5 6 7) (xcells ycells zcells) simpleGrading (1 1 1) Having said that I strongly recommend you to use #eval expression instead of #calc. With #eval, you will not need to deal with any compilation. Please search 'eval' among the tutorial cases and OpenFOAM release notes.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
April 17, 2021, 19:18 |
|
#5 | ||
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 |
Hi HPE,
Nice! Half of my problem is solved. I used #eval instead of #calc. However still the problem with #codestream persisted to continue. I was running a dambreak using interfoam. I want to introduce initial conditions for alpha.water using #codestream like this: Quote:
Quote:
|
|||
April 18, 2021, 05:21 |
|
#6 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
You have Gcc63 as the compiler type, which makes it look like you have a separate gcc installation.
You should check the value of your LD_LIBRARY_PATH to verify that libmpfr (perhaps libgmp too) are accessible. Since the compilation worked, but not the loading, use 'ldd -v' on the dynamically generated lib. Use Google or Stackoverflow or man if you aren't familiar with ldd. |
|
April 18, 2021, 08:46 |
|
#7 | ||
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 |
Thank you for the reply olesen,
which gcc on the command line shows: Quote:
To use the ldd -v [file], the file "_9a2905356e5313e2ff419c83e22111805dc3 aa4d.so" is not existing. When I look in to dynamicCode folder, there is no platforms sub-folder. Looking in to config.sh/setting, I found: Quote:
Sorry my ignorance about linux system |
|||
July 21, 2023, 11:17 |
|
#8 |
New Member
Mukul Chandra
Join Date: May 2023
Location: India
Posts: 4
Rep Power: 3 |
have you find the solution of the compilation error you were facing. Same compilation error I am also facing. Please help in this regard.
|
|
July 24, 2023, 04:34 |
|
#9 |
New Member
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3 |
I agree with Olesen, the problem stands in gcc.
I you work on a cluster, I recommend to look for the versions you have with <spack find gcc> and then use <spack load gcc...> with the latest version. If you work on your laptop, find a way to install gcc, using gcc@12.2.0 solved my codeStream problem. |
|
Tags |
calc, codestream, dynamiccode |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Invalid line number" when compiling at runtime | satter_partier | OpenFOAM Programming & Development | 7 | July 16, 2019 07:01 |