Native Windows binaries using MSYS2
It appears as if the natively compiled OpenFOAM package using MSYS2 and MinGW compilers/toolchain, requires admin rights. This is counterproductive as anyone having admin privileges would rather WSL immediately. Trying to install the package on a Windows machine without the admin rights leads to the infamous
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
errors and others as I have explained here. MSYS2 folks tried helping me here on their Discord server, to no avail. The MSYS2 now updates, but we are stuck at msmpi
dependency. It would be great if you could
- provide a temporary workaround to solve the missing
libstdc++-6.dll
andmsmpi.dll
- update/upgrade the underlying MSYS2 layer of the package
- provide some versions without MPI or use the MSYS2/MinGW native packages over externally installed ones.
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Mark OLESEN assigned to @Pawan
assigned to @Pawan
- Maintainer
Hi @Pawan - if you have any immediate ideas/workarounds etc, please add notes here.
- Reporter
Hi
i)Please note that binaries has been cross compiled in Linux environment using mingw-tool chain.
We have not compiled it directly on MSYS2. Error you are getting is more to do msmpi i.e
it shows msmpi is not installed.ii) MSMPI is bundled with installer but can be installed only when running via admin mode.
MSMPI can be downloaded from this location but separately need to be installed but
again it require, admin permission to do so. msmpiRegards
Pawan - Reporter
- Please ask your IT to install msmpi in your system. It is provided by microsoft and they should have no issue to install it.
- Regarding MSYS2 installed by pacman etc, we can look into it but it will get expedited if some one fund that work
- Reporter
Based on my knowledge, yes, no other way .
I am no expert, but why not use the available MSYS2/MinGW MSMPI packages? they do not require admin privileges AFIK.
- Reporter
Thanks. I will try that.
Ideally, it would be great if we could have PortableApps and/or Chocolatey packages to have a painless installation of OpenFOAM on Windows OS. Please consider that a huge portion of your potential users work on a machine without admin privileges and asking IT for these sorts of installations doesn't help.
- Please register or sign in to reply
- Kutalmış Berçin added community label
added community label
As a follow-up on this discussion: I was informed here on OpenFOAM discord about this great effort to compile OpenFOAM with Microsoft Visual Studio.
- Maintainer
I did see a thread on cfd-online, but was still waiting for a response. Not sure why the person felt the need to rip out most of the copyright and license notices (a clear GPL violation). Some of the changes seem spurious. For example, he claims that the original token/Istream include was completely broken, but that only becomes true when you discard the header include guards and replace them with
#pragma once
like they did. The various changes are chaotic and difficult to retrace. Why not start as a fork of an existing repo and add changes from there? This pretty much prevents the possibility adopting any of the changes. Why did he have the need to add in a windows-specific regex instead of using the C++11 regex like we already do in OpenFOAM? - Maintainer
Probably - I didn't check all of the issues for their repo. Nonetheless, there may be a desire to have MSVC support, but the rejigged code still has to be readable, must continue to work with other OS's and compilers, needs to be either properly integrated or it should be clear which delta changes should be applied to the upstream OpenFOAM code base.
As an interesting example - take a look at https://github.com/Atizar/RapidCFD-dev/commit/fe0e0ce50c2448bebcba8bd605ff897ea0858703 The number and location of changes is quite impressive, but long-term maintenance will not be much fun.
- Foad mentioned in issue #2288 (closed)
mentioned in issue #2288 (closed)
- Maintainer
Additional point: https://github.com/microsoft/Microsoft-MPI/issues/57
- Maintainer
what happens if you specify WM_MPLIB=dummy in the prefs.sh (or bashrc) file? I would have thought that this should work.
- Maintainer
No. All of the OpenFOAM parts are assembled with vendor-independent layer, it is called Pstream. This allows you to recompile those bits (eg, for OPENMPI, INTELMPI, etc) without recompiling the rest of OpenFOAM.
There is always a "dummy" implementation compiled as well. It completes the linkage for OpenFOAM, but it you try to start with it in parallel, it emit a complaint and exit.
You (or someone else) will need to check if it was always shipped, or gets clobbered by the ms-mpi interface. I don't have windows.
- Maintainer
forget it, I just checked with the packaging - not possible. But I've just made a change to also pack in the dummy version (next release).
- Mark OLESEN mentioned in commit 83243cf0
mentioned in commit 83243cf0
- Maintainer
@foadsf - modified the 'packer' script to include the following:
- libPstream.dll-msmpi : the MPI interface with msmpi
- libPstream.dll-dummy : a no-op MPI interface. Serial only
- libPstream.dll : a copy of the
-msmpi
or the-dummy
version.
@Pawan will see if he can built that into the installer. Eg, if Admin and want MSMPI -> install and use the libPstream.dll-msmpi, otherwise copy the libPstream.dll-dummy on top of libPstream.dll so that it should (hopefully) at least work in serial without Admin rights.
- Reporter
Hi Foad,
If you install latest OpenFOAM-v2112 by downloading OpenFOAM-v2112-windows-mingw.exe and install it without admin right, you will be able to run OpenFOAM on single processor without any issue. Let me know if you face any issue. Can you check and let us know whether it work for you. Thanks Pawan
- Maintainer
Closing out as solved. Reopen if needed
- Mark OLESEN closed
closed