CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compilation Error (V 1.7.1; Icc 12.1.0, OpenMPI 1.4.3) (https://www.cfd-online.com/Forums/openfoam-installation/95389-compilation-error-v-1-7-1-icc-12-1-0-openmpi-1-4-3-a.html)

floydfan December 15, 2011 08:32

Compilation Error (V 1.7.1; Icc 12.1.0, OpenMPI 1.4.3)
 
4 Attachment(s)
Hello,

I followed the instruction from the wiki, while compilation continuously fails.


System:
-- Linux 2.6.18-274.7.1.el5 (CentOS 5)
-- Use system-installed intel compiler (v 12.1.0)
-- Use system-installed OpenMPI (v 1.4.3)
-- Use system-installed paraView (v 3.10.1)
-- default gcc v. 4.1.2, thus gcc44 replaces gcc function calls


Configuration changes:

in etc/bashrc
-- Line 118 (Default Compiler)
WM_COMPILER:=Icc
-- Line 135 (MPI setup)
WM_MPLIB:=SYSTEMOPENMPI
-- Line 170,171 (Environment setup for x86_64, 64bit)
export WM_CC='gcc44'
export WM_CXX='g++44'

-- Line 260 (paraView source)
Comment out _foamSource paraview3/bashrc

in etc/settings.sh
-- edit SYSTEMOPENMPI's PINC and PLIBS flag (add system-supported optimization flag)


and tried the compilation under OpenFOAM-1.7.1 directory with
./Allwmake >& makeAll.log



The first compilation error comes with

compilation aborted for derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C (code 2)
2make: *** [Make/linux64IccDPOpt/turbulentHeatFluxTemperatureFvPatchScalarField.o] Error 2

and a number of error are followed due to the absence of libcompressibleRASModel.so

ld: cannot find -lcompressibleRASModels
make: *** [$USERS_HOME/OpenFOAM/OpenFOAM-1.7.1/lib/linux64IccDPOpt/liblagrangianIntermediate.so] Error 1


I wonder if the error could be caused either by
the false compilation of third-party libraries (especially scotch - replacing WM_CC variable to gcc44 does not seem to work properly) or
false compilation flag (some OpenFOAM functions incompiatible with latest intel compiler) or
any other reason which I cannot estimate.


I am enclosing the complete log file (which is split into 4 due to the file size limitation on wiki).

Can anybody help me with this?


Best,
Jeff

wyldckat December 17, 2011 19:32

Greetings Jeff and welcome to the forum!

I won't be able to try and reproduce your steps for a few more days, but I suggest the following ideas:
  • About the issue with Scotch, use "ThirdParty-2.0.1" instead of "ThirdParty-1.7.1". Or at the very least, check the changes made in the "Allwmake" between both versions.
  • After searching for the error, I found in the 2nd "makeAll" log file:
    Quote:

    Code:

    derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C(44): error: member "Foam::NamedEnum<Enum, nEnum>::names [with Enum=Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType, nEnum=2]" cannot be specialized in the current scope
      names[] =
      ^


    Compare the old file with the new file: https://github.com/OpenCFD/OpenFOAM-...hScalarField.C vs https://github.com/OpenFOAM/OpenFOAM...hScalarField.C
    You should be able to see that the comment on the new file which indicates what needs to be placed outside of the deeper namespace onto just the "Foam" namespace:
    Code:

    // declare specialization within 'Foam' namespace
You can save yourself some punishment by either using:
  • gcc 4.5 + OpenFOAM 1.7.1 - Gcc 4.5 has been known to be faster than Icc.
  • Icc 12.1 + OpenFOAM 2.0.1 (preferably 2.0.x) - the latest OpenFOAM is compatible with the newer Icc versions.
Otherwise, there are a few more errors that you are going to trip on and have to compare the two versions for figuring out those errors.


Best regards,
Bruno

floydfan December 18, 2011 07:38

Dear Bruno,
  • gcc 4.5 + OpenFOAM 1.7.1 - Gcc 4.5 has been known to be faster than Icc.
  • Icc 12.1 + OpenFOAM 2.0.1 (preferably 2.0.x) - the latest OpenFOAM is compatible with the newer Icc versions.

Thanks for your suggestion. Let me try with the latest OpenFOAM first and come back to you with the result.

Best,
Jeff

floydfan December 18, 2011 10:36

1 Attachment(s)
Dear Bruno,

Following your suggestion, I tried OpenFOAM 2.0.1. I started with Third Party compilation. As I mentioned earlier, I am considering to use ICC, OpenMPI (with Intel compiler), system-installed paraview. Thus, third-party installation will only compile scotch library.

In a word, compilation ends up with the error (line 1056 in enclosed file):

cp -f ../bin/[agm]* $HOME/OpenFOAM/ThirdParty-2.0.1/platforms/linux64Icc/scotch_5.1.11/bin
cp: cannot stat `../bin/[agm]*': No such file or directory
make: [install] Error 1 (ignored)

The MPI compiling seems to have failed and I assume if scotch library requires gcc + gcc-based MPI library (as I mentioned above, MPICC refers to intel compiler, while gcc44 is used to compile sequential part).

Questions are,

1) GCC-based MPI is mandatory for scotch?
2) If scotch is compiled under Intel compiler, that library is still compatible with OpenFOAM? If so, how do I set the configuration file (Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-64) and Allwmake?

Thank you in advance.

Best,
Jeff

p.s. FYI, I am presenting some of environmental variables for OpenFOAM configuration:

declare -x WM_ARCH="linux64"
declare -x WM_ARCH_OPTION="64"
declare -x WM_CC="gcc44"
declare -x WM_CFLAGS="-m64 -fPIC"
declare -x WM_COMPILER="Icc"
declare -x WM_COMPILER_LIB_ARCH="64"
declare -x WM_COMPILE_OPTION="Opt"
declare -x WM_CXX="g++44"
declare -x WM_CXXFLAGS="-m64 -fPIC"
declare -x WM_LDFLAGS="-m64"
declare -x WM_LINK_LANGUAGE="c++"
declare -x WM_MPLIB="SYSTEMOPENMPI"
declare -x WM_OPTIONS="linux64IccDPOpt"
declare -x WM_OSTYPE="POSIX"

wyldckat December 18, 2011 11:30

Hi Jeff,

Quote:

cp: cannot stat `../bin/[agm]*': No such file or directory
make: [install] Error 1 (ignored)
Don't worry about this error, because the Scotch executables aren't needed for OpenFOAM.
According to the log, everything went fine. Run Allwmake in the "ThirdParty-2.0.1" again if you don't believe me ;)

Well, technically not 100% fine, because Intel's libraries gave out this warning:
Quote:

warning: feupdateenv is not implemented and will always fail
I'm not sure if this will hurt execution, but after you finish building OpenFOAM 2.0.1, run the tutorial located at "incompressible/windSimpleFoam", which will confirm if ptscotch is working as intended.

Good luck!
Bruno

floydfan December 18, 2011 11:36

Quote:

Originally Posted by wyldckat (Post 336242)
after you finish building OpenFOAM 2.0.1, run the tutorial located at "incompressible/windSimpleFoam", which will confirm if ptscotch is working as intended.

Thanks Bruno. Let me proceed with the compilation and come back to you with the result.

Best,
Jeff

floydfan December 20, 2011 05:44

Dear Bruno,

Fortunately it seems to be running fine. Testrun on windSimpleFoam finishes without any error. Thanks for lots of help.

BTW, how can I link the OpenFOAM with system-supported paraview? Which wrapper do I need to touch to set up environmental variables? Could you recommend me any webpages I can refer to?

Thanks,
Jeff

wyldckat December 20, 2011 05:56

Hi Jeff,

If you can run "paraview" without any changes on the command line, then there is no need to change anything, although you'll have to use the "-builtin" argument:
Code:

paraFoam -builtin
If it's not visible by default, edit the file "OpenFOAM-2.0.1/etc/config/paraview.sh".

If you need the official OpenFOAM plug-ins, you'll need to build your own custom build of ParaView. With any luck, if you build the same version of ParaView as the one on your system, perhaps you can then use the then newly built plug-ins with the system's ParaView.

Check my signature link, there is a link in there for another blog post of mine about ParaView+OpenFOAM ;)

Best regards,
Bruno


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