Running OpenFOAM native compile on a non-admin Windows

963 Views Asked by At

I have downloaded and installed a Windows native compiled OpenFOAM from here. But when I try to run any of the OF commands (e.g., blockMesh, foamDictionary, ...) in the MSYS2 terminal I get the message:

path/to/folder/v2106/msys64/home/ofuser/OpenFOAM/OpenFOAM-v2106/platforms/win64MingwDPInt32Opt/bin/blockMesh.exe: error while loading shared libraries: libstdc++-6.dll: cannot open shared object file: No such file or directory

and in the cmd terminal, I get the error message:

                      

System Error
The code execution cannot proceed because msmpi.dll was not found. Reinstalling the program may fix this problem.

From here, I see that I might have to reinstall OpenFOAM in admin mode, which I don't have on this work machine. so I tried installing MSMPI using pacman -S msmpi as I used to do here. But I get the error message:

error: target not found: msmpi

My goal is to install and use the OpenFOAM software, doesn't matter which release, on this Windows machine without admin privileges. I would appreciate it if you could help me know how can I fix the above problems, or find another way around.

P.S.1. Searching the installation directory, I see that the libstdc++-6.dll file is in the path\to\folder\v2106\msys64\home\ofuser\OpenFOAM\OpenFOAM-v2106\platforms\win64MingwDPInt32Opt\bin. So I wonder I get the first error message. Maybe OF is not compiled properly against the library? Should I try removing the path\to\folder\v2106\msys64\usr\lib\gcc\x86_64-pc-msys\7.4.0\libstdc++.dll.a as suggested here?

P.S.2. I had written this post ages ago about different ways to install OpenFOAM on Windows. Sadly it is still a big effort to get it up and running.

P.S.3. A follow-up on this issue here on the MSYS2 Discord server.

P.S.4. Opened a new issue here on the OpenFOAM repository.

1

There are 1 best solutions below

4
On

With OpenFOAM-v2112 it is now possible to install without windows admin permissions. The original problem will still be evident with older OpenFOAM versions since they relied on installing msmpi separately.