gerlero/openfoam-app

Some tutorial run scripts fail with library errors

gerlero opened this issue · 8 comments

Not sure if this is the same error, but execution fails when I run certain tutorial scripts. It seems to be that OpenFOAM can't find ___.so files.

For example, when I run $FOAM_TUTORIALS/incompressible/simpleFoam/backwardFacingStep2D, I get the following warning in the simpleFoam.log file.
Screenshot 2022-02-16 at 11 33 54

Initially found since I tried to run it where I was calling for libforces.so,
Screenshot 2022-02-16 at 11 37 37

Seems related. Unfortunately, this specific case doesn't look like it would be covered by #6 as of now (which is failing CI on Intel anyway...). Just out of curiosity, are you using Intel or M1?

A workaround I can find is to re-source the OpenFOAM etc/bashrc and then manually input the lines of the Allrun script one by one, i.e.:

source /Volumes/OpenFOAM-v2112/etc/bashrc

. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions
restore0Dir
runApplication blockMesh
runApplication simpleFoam

I get no warnings in log.simpleFoam when I run it that way.

I am running a Mac Mini M1.

Running

source /Volumes/OpenFOAM-v2112/etc/bashrc

. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions
restore0Dir
runApplication blockMesh
runApplication simpleFoam

in ~/Desktop/backwardFacingStep2D gives me the same error as before. It is possible that I am doing something wrong here. I have attached my log.simpleFoam file in case it is of interest.
Screenshot 2022-02-16 at 12 41 24

log.simpleFoam.zip

That's strange. Here's my log after running the same commands on a copy of $FOAM_TUTORIALS/incompressible/simpleFoam/backwardFacingStep2D for reference: log.simpleFoam.zip

Are you running the previous snippet directly from the shell (not as a script)? Only thing I think might help is to add an extra command (this is taken from #6, but in my case I didn't really need it):

source /Volumes/OpenFOAM-v2112/etc/bashrc
FOAM_DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions
restore0Dir
runApplication blockMesh
runApplication simpleFoam

I'm running the snippets directly from the shell in the copied $FOAM_TUTORIALS/incompressible/simpleFoam/backwardFacingStep2D directory (which is for testing purposes in my ~/Desktop/....

Using the new snippet you provided, OpenFOAM seems to run and no warnings are raised in the log.simpleFoam file. Interesting... Are you also running an M1?

Yup, I'm running an M1 MacBook Air.

I'm still working on #6; trying a different approach to fix this.

v1.1.0 is out with #6 and should fix all of these. Thanks @AnvarAtayev