CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM without MPI (https://www.cfd-online.com/Forums/openfoam-installation/135638-openfoam-without-mpi.html)

kokizzu May 15, 2014 23:18

OpenFOAM without MPI
 
Is it possible to install OpenFOAM without MPI at all (IntelMPI, OpenMPI, etc)?

Because I only need to use it on single computer.. (run it on Xeon Phi)

wyldckat May 17, 2014 15:12

Hi kokizzu,

I don't know which installation procedure you're using, but I guess the easiest way is this:
  1. Edit the file "etc/bashrc" inside the main OpenFOAM-2.* folder.
  2. Search for this line:
    Code:

    export WM_MPLIB=OPENMPI
  3. Then change it to this:
    Code:

    export WM_MPLIB=
  4. Save and close the file.
  5. Start a new terminal, in order to make sure the shell environment is up-to-date.
Now you can try and build OpenFOAM, without MPI.

Best regards,
Bruno

kokizzu May 18, 2014 22:49

I've tried that, but still the first error shows that it requires mpi.h

Code:

========================================
Build Metis decomposition
    optional component Metis was not found
========================================
Build CGAL
+ wmakeCheckPwd /root/OpenFOAM/ThirdParty-2.3.0                                                               
+++ egrep '^processor' /proc/cpuinfo                                                                         
++ '[' 32 -ge 8 ']'                                                                                           
...skipping...                                                                                               
ptscotchDecomp.C(125): catastrophic error: cannot open source file "mpi.h"                                   
  #include "mpi.h"                                                                                           
                  ^                                                                                           
                                                                                                             
compilation aborted for ptscotchDecomp.C (code 4)                                                             
make: *** [Make/linux64IccDPOpt/ptscotchDecomp.o] Error 4

when i check, the variable on shell, it's empty

Code:

# echo $WM_MPLIB

# echo $WM_COMPILER
Icc


kokizzu May 23, 2014 11:11

thanks for the reply, i'm building without MPI but I got this error:


Code:

./Allwmake > error.log 2>&1 &
grep -i error errors.log

ptscotchDecomp.C(125): catastrophic error: cannot open source file "mpi.h"
make: *** [Make/linux64IccDPOpt/ptscotchDecomp.o] Error 4
make: *** [/root/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64IccDPOpt/lib/libSloanRenumber.so] Error 1
ERROR: ParaView not found in /root/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Icc/ParaView-4.1.0
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/DelaunayMeshTools.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMesh.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshCalcDualMesh.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshConformToSurface.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshZones.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshIO.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshFeaturePoints.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/featurePointConformer.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/featurePointConformerSpecialisations.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cvControls.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformationSurfaces.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/backgroundMeshDecomposition.o] Error 4
lnInclude/indexedVertex.H(40): catastrophic error: cannot open source file "CGAL/Triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cellShapeControl.o] Error 4
lnInclude/indexedVertex.H(40): catastrophic error: cannot open source file "CGAL/Triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cellShapeControlMesh.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cellSizeAndAlignmentControls.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/searchableSurfaceControl.o] Error 4
lnInclude/indexedVertex.H(40): catastrophic error: cannot open source file "CGAL/Triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/smoothAlignmentSolver.o] Error 4
lnInclude/indexedVertex.H(40): catastrophic error: cannot open source file "CGAL/Triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/controlMeshRefinement.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cellSizeFunction.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/uniform.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/uniformDistance.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/linearDistance.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/surfaceOffsetLinearDistance.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/linearSpatial.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/initialPointsMethod.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/uniformGrid.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/bodyCentredCubic.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/faceCentredCubic.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/pointFile.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/autoDensity.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/rayShooting.o] Error 4
make[2]: Target `libso' not remade because of errors.
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/DelaunayMeshTools.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMesh.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshCalcDualMesh.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshConformToSurface.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshZones.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshIO.o] Error 4
conformalVoronoiMesh/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformalVoronoiMeshFeaturePoints.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/featurePointConformer.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/featurePointConformerSpecialisations.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cvControls.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/conformationSurfaces.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/backgroundMeshDecomposition.o] Error 4
lnInclude/indexedVertex.H(40): catastrophic error: cannot open source file "CGAL/Triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cellShapeControl.o] Error 4
lnInclude/indexedVertex.H(40): catastrophic error: cannot open source file "CGAL/Triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cellShapeControlMesh.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/searchableSurfaceControl.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cellSizeAndAlignmentControls.o] Error 4
lnInclude/indexedVertex.H(40): catastrophic error: cannot open source file "CGAL/Triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/smoothAlignmentSolver.o] Error 4
lnInclude/indexedVertex.H(40): catastrophic error: cannot open source file "CGAL/Triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/controlMeshRefinement.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/cellSizeFunction.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/uniform.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/uniformDistance.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/linearDistance.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/surfaceOffsetLinearDistance.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/linearSpatial.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/uniformGrid.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/initialPointsMethod.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/bodyCentredCubic.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/faceCentredCubic.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/pointFile.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/autoDensity.o] Error 4
lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/rayShooting.o] Error 4
make[2]: Target `libso' not remade because of errors.
conformalVoronoiMesh/lnInclude/CGALTriangulation3DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_3.h"
make[2]: *** [Make/linux64IccDPOpt/foamyHexMesh.o] Error 4
make[2]: Target `/root/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64IccDPOpt/bin/foamyHexMesh' not remade because of errors.
CGALTriangulation2DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_2.h"
make[2]: *** [Make/linux64IccDPOpt/CV2D.o] Error 4
CGALTriangulation2DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_2.h"
make[2]: *** [Make/linux64IccDPOpt/insertFeaturePoints.o] Error 4
CGALTriangulation2DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_2.h"
make[2]: *** [Make/linux64IccDPOpt/insertSurfaceNearestPointPairs.o] Error 4
CGALTriangulation2DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_2.h"
make[2]: *** [Make/linux64IccDPOpt/insertSurfaceNearPointPairs.o] Error 4
CGALTriangulation2DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_2.h"
make[2]: *** [Make/linux64IccDPOpt/insertBoundaryConformPointPairs.o] Error 4
CGALTriangulation2DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_2.h"
make[2]: *** [Make/linux64IccDPOpt/CV2DIO.o] Error 4
CGALTriangulation2DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_2.h"
make[2]: *** [Make/linux64IccDPOpt/foamyQuadMesh.o] Error 4
CGALTriangulation2DKernel.H(36): catastrophic error: cannot open source file "CGAL/Delaunay_triangulation_2.h"
make[2]: *** [Make/linux64IccDPOpt/shortEdgeFilter2D.o] Error 4
make[2]: Target `/root/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64IccDPOpt/bin/foamyQuadMesh' not remade because of errors.
make[1]: *** [generation] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [mesh] Error 2
make: Target `application' not remade because of errors.

is it really mpi.h needed to build openFoam?

wyldckat May 26, 2014 10:17

Hi kokizzu,

I've finally managed to test this myself, namely to build OpenFOAM 2.3.0 without MPI.
What seems to happen is this:
  1. The error related to "ptscotchDecomp" can be ignored, because it needs the "libptscotch" library, which in turn needs MPI. In other words, if the MPI toolbox won't be used, then you also don't need to redistribute a mesh in parallel.
  2. Regarding the problem with CGAL: something strange happened when it was built. Run the following commands, to try and isolate the problem:
    Code:

    cd $WM_THIRD_PARTY_DIR
     
    ./Allwmake > make.log 2>&1

    Once it finishes running, check what went wrong during the build of CGAL.
  3. If nothing went wrong in #2, then try this:
    Code:

    #update the shell environment
    wmSET $FOAM_SETTINGS

    #Go into OpenFOAM's main source folder
    cd $WM_PROJECT_DIR
     
    # build once again
    ./Allwmake > make.log 2>&1


Keep in mind that since you won't be using MPI, then in theory, you also won't need to decompose your cases.

Best regards,
Bruno


All times are GMT -4. The time now is 15:14.