|
[Sponsors] |
Dynamic code not compiling: codestream and #calc |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 5 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 11 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#3 | ||
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 5 ![]() |
Quote:
For example let see this blockMeshdict : Quote:
|
|||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 11 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#5 | ||
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 5 ![]() |
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:
|
|||
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,554
Rep Power: 36 ![]() ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#7 | ||
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 5 ![]() |
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 ![]() |
|||
![]() |
![]() |
![]() |
Tags |
calc, codestream, dynamiccode |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Invalid line number" when compiling at runtime | satter_partier | OpenFOAM Programming & Development | 7 | July 16, 2019 06:01 |