OpenFOAM2.3.0并行计算报错:mpirun不能使用UPstream



  • 最近,需要在超算上利用OF2.3版本并行计算,提交了sbatch脚本之后,报错如下:

    --> FOAM FATAL ERROR: 
    Trying to use the dummy Pstream library.
    This dummy library cannot be used in parallel mode
    
        From function UPstream::init(int& argc, char**& argv)
        in file UPstream.C at line 37.
    
    FOAM exiting
    

    在网上查了一下,说是mpirun并没有正确编译,需要在ThirdParty-$versionNum/Allwmake文件中

    make -j $WM_NCOMPPROCS && make install
    

    后面加入

    if [ -d "$MPI_ARCH_PATH/lib64" -a ! -d "$MPI_ARCH_PATH/lib" ]; then
                ln -s $MPI_ARCH_PATH/lib64 $MPI_ARCH_PATH/lib
            fi
    

    可是操作之后依然报错,,,,请问有谁碰到过类似的问题吗?

    我加入代码之后,只是重新编译了sbashrc文件,这会有什么影响吗?



  • 补充:

    根据网上说的,加入对应代码之后,编译了ThirdParty-$versionNum/Allwmake,已经成功

    然后编译src/Pstream文件下面的 Allmake文件,会报错如下:

    '/home/zywang2/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/dummy/libPstream.so' is up to date.
    + case "$WM_MPLIB" in
    + set +x
    
    Note: ignore spurious warnings about missing mpicxx.h headers
    
    wmake libso mpi
    make: mpicc: Command not found
    SOURCE=UOPwrite.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX  -IlnInclude -I. -I/home/zywang2/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/home/zywang2/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOptSYSTEMOPENMPI/UOPwrite.o
    UOPwrite.C:29:17: fatal error: mpi.h: No such file or directory
     #include "mpi.h"
                     ^
    compilation terminated.
    make: *** [Make/linux64GccDPOptSYSTEMOPENMPI/UOPwrite.o] Error 1
    
    

    错误是 没有找到对应的mpi.h文件,,,在以前的论坛上也没有找到有效的解决办法,,,

    这个问题应该怎么解决呢?

    恳请哪位热心朋友解答一下,谢谢


Log in to reply
 

CFD中文网 2016 - 2020 | 京ICP备15017992号-2