如何使用自定义MPI实现编译OpenFoam?

我正在尝试在CentOS 6.6中安装OpenFoam-19.06 我在/global/mpi/mympich中有一个MPI版本。 在文件etc/bashrc中,我创建了变量:

export WM_MPLIB=MYMPICH

> 在文件etc/config.sh/mpi中创建了一个新案例:

MYMPICH)
    export Foam_MPI=mympich
    export MPI_ARCH_PATH=/global/mpi/mympich
    export MPICH_PATH=$MPI_ARCH_PATH

    _foamAddPath    $MPI_ARCH_PATH/bin
    _foamAddLib     $MPI_ARCH_PATH/lib
    ;;

然后我用以下命令设置环境变量:

  

源etc / bashrc

并使用(在适当的目录中)编译第三方软件:

  

./ makeCGAL

最后,我用(在适当的目录中)编译OpenFoam

  

./ Allwmake

看来开局不错

========================================
2019-11-15 13:24:03 +0100
Starting compile OpenFoam-v1906 Allwmake
  Gcc system compiler
  linux64GccdPInt32Opt,with MYMPICH mympich
========================================

built wmake-bin (linux64Gcc)

========================================
Start ThirdParty Allwmake
========================================
using:  gcc -m64 -DOPENFoam=1906 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3 -fPIC
using:  g++ -std=c++11 -m64 -DOPENFoam=1906 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -fPIC

========================================
Build MPI libraries if required
    /global/mpi/mympich

但最终结果如下:

module.h:236:37: warning: ‘foldval’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define SCOTCH_NAME_PREFIX_INTERN   _SCOTCH
                                     ^
vdgraph_separate_ml.c:90:23: note: ‘foldval’ was declared here
   int                 foldval;
                       ^
cp: cannot stat `../bin/[agm]*': No such file or directory
make: [install] Error 1 (ignored)
cp: cannot stat `../bin/d[agm]*': No such file or directory
make: [install] Error 1 (ignored)
cp: cannot stat `../include/*esmumps*.h': No such file or directory
make: [install] Error 1 (ignored)
cp: cannot stat `../lib/*esmumps*.so': No such file or directory
make: [install] Error 1 (ignored)
    ln: OpenFoam/lnInclude
    ln: Osspecific/POSIX/lnInclude
    ln: ./lnInclude
In file included from PstreamGlobals.C:28:0:
PstreamGlobals.H:42:17: fatal error: mpi.h: No such file or directory
compilation terminated.
make: *** [/home/OpenFoam-v1906/build/linux64GccdPInt32OptMYMPICH/src/Pstream/mpi/PstreamGlobals.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from UPstream.C:32:0:
PstreamGlobals.H:42:17: fatal error: mpi.h: No such file or directory
compilation terminated.
make: *** [/home/OpenFoam-v1906/build/linux64GccdPInt32OptMYMPICH/src/Pstream/mpi/UPstream.o] Error 1
In file included from UOPwrite.C:34:0:
PstreamGlobals.H:42:17: fatal error: mpi.h: No such file or directory
compilation terminated.
In file included from UIPread.C:34:0:
PstreamGlobals.H:42:17: fatal error: mpi.h: No such file or directory
compilation terminated.

到目前为止,我还没有找到执行我要定位的好指南。

RODOMAIN 回答:如何使用自定义MPI实现编译OpenFoam?

在OpenFOAM-1712和更高版本中,提供了您所需的配置。它称为USERMPI。如果指定此选项,它将查找相应的mplib规则,您也将负责创建该规则。

最好是在gitlab跟踪器上提出文档问题/查询。

如果您想查看一个非常详细的示例,请查看spack openfoam / package.py-在其中填充了spack中的值

,

不,我认为您已经安装了mpich?或者是其他东西。我们没有名为“ mympi”的mpi。

本文链接:https://www.f2er.com/3095434.html

大家都在问