source pack在unbuntu安装问题



  • 大家好,我之前尝试在unbuntu系统上安装source pack 遇到点问题,后来我按照https://openfoam.org/download/5-0-ubuntu/链接中的办法成功安装了openfoam5,之后在src/regionModel中做了些小改动编译也没有问题。
    现在我尝试将reactingParcelFilmFoam中的reactingCloud改成sprayCloud生成一个新的求解器,编译的时候出现了以下错误,与之前source pack安装的错误一致:

         -lm -o /opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sprayFilmFoam
    /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_comm_null'
    /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_group_null'
    /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_byte'
    /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_double'
    /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_op_min'
    /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_comm_world'
    /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_op_sum'
    collect2: error: ld returned 1 exit status
    /opt/openfoam5/wmake/makefiles/general:140: recipe for target '/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sprayFilmFoam' failed
    make: *** [/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sprayFilmFoam] Error 1
    

    不知道大家有没有什么建议?谢谢!


  • 网格教授 OpenFOAM教授 管理员

    我猜测你这个是源代码没写对,或者拷贝复制的时候丢了代码,undefined reference这种错误只是在编译类后捆绑到求解器的时候函数没定义导致。可能你代码里面有些函数代码块丢失了。

    以上只是猜测,因为不清楚你安装的详细过程不能确诊。