CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [Other] BlockMesh Permissions Workaround Not Working - File Locations (https://www.cfd-online.com/Forums/openfoam-installation/251439-blockmesh-permissions-workaround-not-working-file-locations.html)

LaserCooling August 17, 2023 02:17

BlockMesh Permissions Workaround Not Working - File Locations
 
I'm trying the second tutorial on OpenFOAM, and I'm getting stuck on literally the first step, running BlockMesh.
My account is an admin account, so I'm getting this message

Quote:

--> FOAM FATAL IO ERROR: (openfoam-2306)
This code should not be executed by someone with administrator rights for security reasons.
It generates a shared library which is loaded using dlopen



file: system/blockMeshDict at line 17.

From static void Foam::dynamicCode::checkSecurity(const char*, const Foam::dictionary&)
in file db/dynamicLibrary/dynamicCode/dynamicCode.C at line 73.
I found these instructions, but for the life of me I can't find the the files that I would need to edit on my install.

cylinder case

I have a fresh install of v2306, using the Native Windows instructions since that seemed to be the easiest.

Here is where OpenFOAM is installed on my machine: [USER]\AppData\Roaming\ESI-OpenCFD\OpenFOAM\v2306. Can anyone give me some advice?

olesen August 22, 2023 05:01

Two things: never use root (admin) for running any programs beyond administrative tasks - even if you actually trust the sources. Running with dynamic code compilation will probably not work at all if you are using the cross-compiled windows binaries. If they are to work, they would probably need a lot more tools installed (gcc etc).


With the #eval keyword (instead of #calc), there will be no issues - since that keyword uses an internal parser and doesn't compile new code. If you have something like #codeStream etc, you will either have to skip those with the cross-compiled windows binaries or else use WSL and one of the precompiled Linux binaries (eg, for Ubuntu). You will have to make a decision.


All times are GMT -4. The time now is 04:47.