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.org] Failed to compile OpenFOAM 3.0.1 with icc (https://www.cfd-online.com/Forums/openfoam-installation/173590-failed-compile-openfoam-3-0-1-icc.html)

xuegy June 22, 2016 23:35

Failed to compile OpenFOAM 3.0.1 with icc
 
System Ubuntu 15.10, Installed the latest Parallel Studio XE (icc 16.0.3, intel MPI 5.1.3). If I use default settings (GCC and Open MPI), there will be no error.

I modified 2 settings:
in $WM_PROJECT_DIR/etc/bashrc
Code:

export WM_COMPILER=Icc
export WM_MPLIB=INTELMPI

in $WM_PROJECT_DIR/etc/config/settings.sh I modified the entry
Code:

INTELMPI)
export MPI_ARCH_PATH=$I_MPI_ROOT
_foamAddPath $MPI_ARCH_PATH/bin64
_foamAddLib $MPI_ARCH_PATH/lib64
_foamAddMan $MPI_ARCH_PATH/man

And I didn't touch anything else.

Following the steps on https://openfoamwiki.net/index.php/I...u#Ubuntu_14.04 , I can compile ParaView successfully. Also I can execute $WM_THIRD_PARTY_DIR/platforms/linux64Icc/ParaView-4.4.0/bin/paraview

However I can't compile OpenFOAM. In the log file
Code:

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

========================================
Build Scotch decomposition library scotch_6.0.3
    /home/gux215/OpenFOAM-icc/ThirdParty-3.0.1/platforms/linux64IccInt64/scotch_6.0.3
    scotch header in /home/gux215/OpenFOAM-icc/ThirdParty-3.0.1/platforms/linux64IccInt64/scotch_6.0.3/include
    scotch libs  in /home/gux215/OpenFOAM-icc/ThirdParty-3.0.1/platforms/linux64IccDPInt64Opt/lib

========================================
Build Metis decomposition
    optional component Metis was not found
========================================
Build CGAL
    CGAL headers in /home/gux215/OpenFOAM-icc/ThirdParty-3.0.1/platforms/linux64Icc/CGAL-4.7/include
    CGAL libs    in /home/gux215/OpenFOAM-icc/ThirdParty-3.0.1/platforms/linux64Icc/CGAL-4.7/lib

========================================
Done ThirdParty Allwmake
========================================

I don't know why wmake will compile ThirdParty for the second time?
And here's the error:
Code:

ptscotchDecomp.C(126): catastrophic error: cannot open source file "ptscotch.h"
      #include "ptscotch.h"
                          ^

compilation aborted for ptscotchDecomp.C (code 4)
/home/gux215/OpenFOAM-icc/OpenFOAM-3.0.1/wmake/rules/General/transform:8: recipe for target '/home/gux215/OpenFOAM-icc/OpenFOAM-3.0.1/platforms/linux64IccDPInt64OptINTELMPI/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.o' failed
make: *** [/home/gux215/OpenFOAM-icc/OpenFOAM-3.0.1/platforms/linux64IccDPInt64OptINTELMPI/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.o] Error 4

I found the same error on the internet, but it's OpenFOAM 1.7.1 and there's no solution in the end.

adiraman9 July 13, 2016 16:03

I also had this same issue and spent the better part of the day trying to figure out what was happening. So the issue is that ptscotch is not installed along with scotch. If you look at the Allwmake file in the ThirdParty folder it checks to see if the environment variable FOAM_MPI is defined (i.e it is set to something other than dummy), if not then it skips the ptscotch installation. So i just added

Code:

INTELMPI)
export MPI_ARCH_PATH=$I_MPI_ROOT
export FOAM_MPI=mpi
_foamAddPath $MPI_ARCH_PATH/bin64
_foamAddLib $MPI_ARCH_PATH/lib64
_foamAddMan $MPI_ARCH_PATH/man

in $WM_PROJECT_DIR/etc/config/settings.sh
and finally got it to compile !
Hope this helps


All times are GMT -4. The time now is 20:02.