foam-extend-4.1安装出错
-
在ubuntu20.04中按照教程安装时出现以下问题:
SOURCE=db/dictionary/dictionaryEntry/dictionaryEntry.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -DOMPI_SKIP_MPICXX -I/include -I/home/ad/foam/foam-extend-4.1/ThirdParty/zlib-1.2.3 -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/dictionaryEntry.o db/IOstreams/Pstreams/IPread.C:29:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ db/IOstreams/Pstreams/OPwrite.C:29:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ db/IOstreams/Pstreams/PstreamReduceOps.C:26:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ db/IOstreams/Pstreams/Pstream.C:26:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ compilation terminated. compilation terminated. compilation terminated. compilation terminated. In file included from db/IOstreams/Pstreams/PstreamGlobals.C:26:0: db/IOstreams/Pstreams/PstreamGlobals.H:39:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ compilation terminated. make: *** [db/IOstreams/Pstreams/Pstream.dep:170: Make/linux64GccDPInt32Opt/Pstream.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [db/IOstreams/Pstreams/PstreamReduceOps.dep:148: Make/linux64GccDPInt32Opt/PstreamReduceOps.o] Error 1 make: *** [db/IOstreams/Pstreams/PstreamGlobals.dep:114: Make/linux64GccDPInt32Opt/PstreamGlobals.o] Error 1 make: *** [db/IOstreams/Pstreams/IPread.dep:136: Make/linux64GccDPInt32Opt/IPread.o] Error 1 make: *** [db/IOstreams/Pstreams/OPwrite.dep:136: Make/linux64GccDPInt32Opt/OPwrite.o] Error 1 + decompositionMethods/AllwmakeLnInclude + wmakeLnInclude decomposeReconstruct + wmakeLnInclude decompositionMethods + wmakeLnInclude metisDecomp + wmakeLnInclude parMetisDecomp + wmakeLnInclude scotchDecomp + decompositionMethods/Allwmake + wmakeLnInclude decompositionMethods + wmake libso decompositionMethods '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libdecompositionMethods.so' is up to date. + wmake libso metisDecomp SOURCE=metisDecomp.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -I../scotchDecomp/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/metisDecomp.o In file included from metisDecomp.C:26:0: metisDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [metisDecomp.dep:342: Make/linux64GccDPInt32Opt/metisDecomp.o] Error 1 + wmake libso parMetisDecomp SOURCE=parMetisDecomp.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -DOMPI_SKIP_MPICXX -I/include -I -I../decompositionMethods/lnInclude -I../metisDecomp/lnInclude -I../scotchDecomp/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/parMetisDecomp.o In file included from parMetisDecomp.C:26:0: parMetisDecomp.H:37:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [parMetisDecomp.dep:362: Make/linux64GccDPInt32Opt/parMetisDecomp.o] Error 1 + wmake libso scotchDecomp SOURCE=scotchDecomp/scotchDecomp.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/scotchDecomp.o SOURCE=engineScotchDecomp/engineScotchDecomp.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/engineScotchDecomp.o In file included from scotchDecomp/scotchDecomp.C:107:0: scotchDecomp/scotchDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ In file included from engineScotchDecomp/engineScotchDecomp.H:49:0, from engineScotchDecomp/engineScotchDecomp.C:26: lnInclude/scotchDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. compilation terminated. make: *** [engineScotchDecomp/engineScotchDecomp.dep:343: Make/linux64GccDPInt32Opt/engineScotchDecomp.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [scotchDecomp/scotchDecomp.dep:342: Make/linux64GccDPInt32Opt/scotchDecomp.o] Error 1 + wmake libso lagrangian/basic '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/liblagrangian.so' is up to date. + wmake libso edgeMesh '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libedgeMesh.so' is up to date. + wmake libso surfMesh '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libsurfMesh.so' is up to date. + wmake libso meshTools '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libmeshTools.so' is up to date. + wmake libso finiteVolume '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libfiniteVolume.so' is up to date. + wmake libso finiteArea '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libfiniteArea.so' is up to date. + conversion/Allwmake + wmake libso '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libconversion.so' is up to date. + wmake libso lduSolvers '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/liblduSolvers.so' is up to date. + wmake libso tetFiniteElement '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libtetFiniteElement.so' is up to date. + wmake libso decompositionMethods/decomposeReconstruct '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libdecomposeReconstruct.so' is up to date. + dynamicMesh/AllwmakeLnInclude + wmakeLnInclude dynamicMesh + wmakeLnInclude dynamicFvMesh + wmakeLnInclude topoChangerFvMesh + meshMotion/AllwmakeLnInclude + wmakeLnInclude solidBodyMotion + wmakeLnInclude fvMotionSolver + wmakeLnInclude RBFMotionSolver + wmakeLnInclude mesquiteMotionSolver + dynamicMesh/Allwmake + wmake libso dynamicMesh '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libdynamicMesh.so' is up to date. + meshMotion/Allwmake + wmake libso solidBodyMotion '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libsolidBodyMotion.so' is up to date. + wmake libso fvMotionSolver '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libfvMotionSolver.so' is up to date. + wmake libso RBFMotionSolver '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libRBFMotionSolver.so' is up to date. + wmake libso mesquiteMotionSolver SOURCE=mesquiteMotionSolver.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I/home/ad/foam/foam-extend-4.1/src/meshTools/lnInclude -I/home/ad/foam/foam-extend-4.1/src/dynamicMesh/dynamicMesh/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/mesquiteMotionSolver.o In file included from mesquiteMotionSolver.H:39:0, from mesquiteMotionSolver.C:26: /home/ad/foam/foam-extend-4.1/src/dynamicMesh/dynamicMesh/lnInclude/motionSolver.H:42:10: fatal error: twoDPointCorrector.H: No such file or directory #include "twoDPointCorrector.H" ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
貌似是无法找到mpi.h文件、decompositionMethod.H文件以及twoDPointCorrector.H文件,我是应该自己添加这些文件然后重新编译吗?
-
针对mpi.h文件,参考了这个帖子,再开始编译前输入了以下代码:
echo "export WM_THIRD_PARTY_USE_BISON_27=1" > etc/prefs.sh echo "export WM_MPLIB=SYSTEMOPENMPI" >> etc/prefs.sh echo "export OPENMPI_DIR=/usr" >> etc/prefs.sh echo "export OPENMPI_BIN_DIR=\$OPENMPI_DIR/bin" >> etc/prefs.sh
在之后的编译中mpi.h文件的问题不在出现,但decompositionMethod.H文件以及twoDPointCorrector.H文件的问题依然存在
-
仅编译src/decompositionMethods文件夹:
ad@ad:~/foam/foam-extend-4.1/src/decompositionMethods$ ./Allwmake + wmakeLnInclude decompositionMethods + wmake libso decompositionMethods Making dependency list for source file decompositionMethod/decompositionMethod.C Making dependency list for source file manualDecomp/manualDecomp.C Making dependency list for source file geomDecomp/geomDecomp.C Making dependency list for source file patchConstrainedDecomp/patchConstrainedDecomp.C Making dependency list for source file hierarchGeomDecomp/hierarchGeomDecomp.C Making dependency list for source file simpleGeomDecomp/simpleGeomDecomp.C SOURCE=decompositionMethod/decompositionMethod.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/decompositionMethod.o SOURCE=manualDecomp/manualDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/manualDecomp.o SOURCE=geomDecomp/geomDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/geomDecomp.o SOURCE=simpleGeomDecomp/simpleGeomDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/simpleGeomDecomp.o SOURCE=hierarchGeomDecomp/hierarchGeomDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/hierarchGeomDecomp.o SOURCE=patchConstrainedDecomp/patchConstrainedDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/patchConstrainedDecomp.o '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libdecompositionMethods.so' is up to date. + wmake libso metisDecomp Making dependency list for source file metisDecomp.C could not open file metis.h for source file metisDecomp.C SOURCE=metisDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -I../scotchDecomp/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/metisDecomp.o In file included from metisDecomp.C:26:0: metisDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [metisDecomp.dep:342: Make/linux64GccDPInt32Opt/metisDecomp.o] Error 1 + wmake libso parMetisDecomp Making dependency list for source file parMetisDecomp.C could not open file parmetis.h for source file parMetisDecomp.C SOURCE=parMetisDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -DOMPI_SKIP_MPICXX -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I -I../decompositionMethods/lnInclude -I../metisDecomp/lnInclude -I../scotchDecomp/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/parMetisDecomp.o In file included from parMetisDecomp.C:26:0: parMetisDecomp.H:37:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [parMetisDecomp.dep:362: Make/linux64GccDPInt32Opt/parMetisDecomp.o] Error 1 + wmake libso scotchDecomp Making dependency list for source file scotchDecomp/scotchDecomp.C Making dependency list for source file engineScotchDecomp/engineScotchDecomp.C could not open file scotch.h for source file scotchDecomp/scotchDecomp.C SOURCE=scotchDecomp/scotchDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/scotchDecomp.o SOURCE=engineScotchDecomp/engineScotchDecomp.C ; g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/engineScotchDecomp.o In file included from scotchDecomp/scotchDecomp.C:107:0: scotchDecomp/scotchDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from engineScotchDecomp/engineScotchDecomp.H:49:0, from engineScotchDecomp/engineScotchDecomp.C:26: lnInclude/scotchDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [scotchDecomp/scotchDecomp.dep:342: Make/linux64GccDPInt32Opt/scotchDecomp.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [engineScotchDecomp/engineScotchDecomp.dep:343: Make/linux64GccDPInt32Opt/engineScotchDecomp.o] Error 1