weird error in codes when building v1912 with intel icc
Summary
I'm new to OpenFOAM and I'm trying to compile OpenFOAM-v1912 using Icc and IntelMPI, only to find the following confusing error. It seems like an error in codes. But it just makes no sense, because I have successfully compiled it with gcc(v4.8.5) and openmpi(1.10.7), and it worked just fine. THANKS A LOT for helping. I'd be more than delighted to hear any suggestions. Ideas about what the problem might be will also be of great help.
wallBoundedStreamLine/wallBoundedParticleTemplates.C(121): error: no operator "==" matches these operands
Steps to reproduce
I edited OpenFOAM-v1912/etc/bashrc from
...
export WM_COMPILER=Gcc
...
export WM_MPLIB=OPENMPI
...
to
...
export WM_COMPILER=Icc
...
export WM_MPLIB=INTELMPI
...
and I got "ld: cannot find -lmpi" error so I edit OpenFOAM-v1912/wmake/rules/General/Icc/c++
CC = icpc -std=c++11
to
CC = mpiicc -std=c++11
then under directory OpenFOAM-v1912/ , I ran
./Allwmake -j16
Details of the error from the promts:
wmake reactingEulerFoam/phaseSystems
wmake reactingEulerFoam/interfacialModels
wmake reactingEulerFoam/interfacialCompositionModels
wmake reactingEulerFoam/derivedFvPatchFields
wmake reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem
wmake reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels
wmake reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem
wmake reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels
wmake field
mpiicc -std=c++11 -fp-trap=common -fp-model precise -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-unknown-pragmas -diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076 -O3 -DNoRepository -ftemplate-depth-100 -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/finiteVolume/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/fileFormats/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/surfMesh/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/meshTools/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/sampling/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/lagrangian/basic/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/lagrangian/distributionModels/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/thermophysicalModels/basic/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/transportModels -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/transportModels/compressible/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/TurbulenceModels/turbulenceModels/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/TurbulenceModels/incompressible/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/TurbulenceModels/compressible/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/transportModels/compressible/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/thermophysicalModels/basic/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/thermophysicalModels/solidThermo/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/thermophysicalModels/chemistryModel/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/thermophysicalModels/reactionThermo/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/thermophysicalModels/specie/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/fvAgglomerationMethods/pairPatchAgglomeration/lnInclude -IlnInclude -I. -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/OpenFOAM/lnInclude -I/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/OSspecific/POSIX/lnInclude -fPIC -c wallBoundedStreamLine/wallBoundedStreamLine.C -o /share/software/OpenFOAM/OpenFOAM-v1912-ICC/build/linux64IccDPInt32Opt/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.o
wallBoundedStreamLine/wallBoundedParticleTemplates.C(121): error: no operator "==" matches these operands
operand types are: Foam::cell == const Foam::label
cell() == mesh().faceOwner()[face()]
^
/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/lagrangian/basic/lnInclude/particle.H(70): note: this candidate was rejected because arguments do not match
bool operator==(const particle&, const particle&);
^
/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/OpenFOAM/lnInclude/labelBits.H(123): note: this candidate was rejected because function is not visible
inline friend bool operator==(const labelBits& a, const labelBits& b)
^
/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/OpenFOAM/lnInclude/objectMapI.H(85): note: this candidate was rejected because arguments do not match
inline bool Foam::operator==(const objectMap& a, const objectMap& b)
^
/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/OpenFOAM/lnInclude/triFaceI.H(406): note: this candidate was rejected because arguments do not match
inline bool Foam::operator==(const triFace& a, const triFace& b)
^
(followed by lots of rejected candidates)
instantiation of "bool Foam::wallBoundedStreamLineParticle::move(TrackCloudType &, Foam::wallBoundedStreamLineParticle::trackingData &, Foam::scalar={Foam::doubleScalar={double}}) [with TrackCloudType=Foam::wallBoundedStreamLineParticleCloud]" at line 212 of "/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/lagrangian/basic/lnInclude/Cloud.C"
instantiation of "void Foam::Cloud<ParticleType>::move(TrackCloudType &, ParticleType::trackingData &, Foam::scalar={Foam::doubleScalar={double}}) [with ParticleType=Foam::wallBoundedStreamLineParticle, TrackCloudType=Foam::wallBoundedStreamLineParticleCloud]" at line 275 of "wallBoundedStreamLine/wallBoundedStreamLine.C"
wallBoundedStreamLine/wallBoundedParticleTemplates.C(138): error: no operator "=" matches these operands
operand types are: Foam::cell = Foam::label
cell() = nbrCelli;
^
detected during:
instantiation of "bool Foam::wallBoundedStreamLineParticle::move(TrackCloudType &, Foam::wallBoundedStreamLineParticle::trackingData &, Foam::scalar={Foam::doubleScalar={double}}) [with TrackCloudType=Foam::wallBoundedStreamLineParticleCloud]" at line 212 of "/share/software/OpenFOAM/OpenFOAM-v1912-ICC/src/lagrangian/basic/lnInclude/Cloud.C"
instantiation of "void Foam::Cloud<ParticleType>::move(TrackCloudType &, ParticleType::trackingData &, Foam::scalar={Foam::doubleScalar={double}}) [with ParticleType=Foam::wallBoundedStreamLineParticle, TrackCloudType=Foam::wallBoundedStreamLineParticleCloud]" at line 275 of "wallBoundedStreamLine/wallBoundedStreamLine.C"
compilation aborted for wallBoundedStreamLine/wallBoundedStreamLine.C (code 2)
make: *** [/share/software/OpenFOAM/OpenFOAM-v1912-ICC/build/linux64IccDPInt32Opt/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.o] Error 2
Environment information
- OpenFOAM: v1912 (codes from https://sourceforge.net/projects/openfoam/files/v1912/OpenFOAM-v1912.tgz)
- ThirdParty from https://sourceforge.net/projects/openfoam/files/v1912/ThirdParty-v1912.tgz
- Intel suite: parallel_studio_xe_2020_cluster_edition
- Intel icc: icc (ICC) 19.1.0.166 20191121
- Intel MPI lib: for Linux* OS, Version 2019 Update 6 Build 20191024
- OS Kernel: Linux version 3.10.0-1062.el7.x86_64 (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) )
- OS: CentOS 7.7.1908
- CPU: 72 * Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz