windows - 在非管理员 Windows 上运行 OpenFOAM native 编译

标签 windows mingw-w64 msys2 openfoam ms-mpi

我已经从 here 下载并安装了 Windows native 编译的 OpenFOAM 。但是,当我尝试在 MSYS2 终端中运行任何 OF 命令(例如,blockMeshfoamDictionary...)时,我收到消息:

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

在 cmd 终端中,我收到错误消息:

                      

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

来自here ,我发现我可能需要在管理模式下重新安装 OpenFOAM,而我的工作机器上没有该模式。所以我尝试使用 pacman -S msmpi 安装 MSMPI,就像我以前那样 here 。但我收到错误消息:

error: target not found: msmpi

我的目标是在没有管理员权限的 Windows 计算机上安装和使用 OpenFOAM 软件,无论哪个版本。如果您能帮助我了解如何解决上述问题或找到其他解决方法,我将不胜感激。

P.S.1.搜索安装目录,发现libstdc++-6.dll文件位于path\to\folder\v2106\msys64中\home\ofuser\OpenFOAM\OpenFOAM-v2106\platforms\win64MingwDPInt32Opt\bin。所以我想知道我收到了第一条错误消息。也许OF未编译properly反对图书馆?我应该尝试按照建议删除 path\to\folder\v2106\msys64\usr\lib\gcc\x86_64-pc-msys\7.4.0\libstdc++.dll.a here

P.S.2.我写过this post很久以前就了解了在 Windows 上安装 OpenFOAM 的不同方法。遗憾的是,要让它启动并运行仍然需要付出很大的努力。

P.S.3. 此问题的后续行动 here on the MSYS2 Discord server .

P.S.4.打开了一个新问题 here on the OpenFOAM repository .

最佳答案

使用 OpenFOAM-v2112,现在无需 Windows 管理员权限即可安装。 对于较旧的 OpenFOAM 版本,最初的问题仍然很明显,因为它们依赖于单独安装 msmpi。

关于windows - 在非管理员 Windows 上运行 OpenFOAM native 编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70256103/

相关文章:

windows - 如何强制 make 在 Windows/MSYS2 上使用 bash 作为 shell

bash - 以最后退出代码 0 启动 bash

javascript - 如何使用 JavaScript 打开 Windows 程序?

c++ - MinGW-w64 编译因 nullptr_t 而失败

c++ - 错误:在mingw64上构建cmake + boost项目时, 'GetSystemTimeAsFileTime'的类型冲突

c++ - 使用Mingw-w64使用-m32选项(32位代码)进行编译时出错

windows - 使用 Msys2 为 mingw 安装 Rust 和 Cargo 的分步说明?

windows - 我如何在 Windows 上使用 git-new-workdir?

将在 Mac 上创建的 .c 文件转换为 Windows

python - 为什么定位 Shadow dom 元素在第 5 个元素处失败?