Build from sources of OpenFOAM v2006 failed with Intel Icc - issue in setAlphaField
The utility setAlphaField is not compiling with Intel Icc (I tried different versions from 2016 to 2019).
Errors of the Intel Compiler :
Internal error loop: assertion failed: find_seq_in_lookup_table: seq_number not found (shared/cfe/edgcpfe/il.c, line 4118)
The files that are crashing the Intel compiler are :
$FOAM_APP/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/cylinder/cylinderImplicitFunction.?
and also
$FOAM_APP/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/sin/sinImplicitFunction.?
Temporary workaround (which is however reducing the funtionnalities of setAlphaField) is to comment those sources in the Make/files :
$> foam
$> git diff applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/Make/files
diff --git a/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/Make/files b/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/Make/files
index b7585a9..db18694 100644
--- a/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/Make/files
+++ b/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/Make/files
@@ -1,11 +1,11 @@
/* Run-time selectable implicitFunctions */
implicitFunctions/implicitFunction.C
implicitFunctions/sphere/sphereImplicitFunction.C
-implicitFunctions/sin/sinImplicitFunction.C
+/* implicitFunctions/sin/sinImplicitFunction.C */
implicitFunctions/ellipsoid/ellipsoidImplicitFunction.C
implicitFunctions/paraboloid/paraboloidImplicitFunction.C
implicitFunctions/plane/planeImplicitFunction.C
-implicitFunctions/cylinder/cylinderImplicitFunction.C
+/* implicitFunctions/cylinder/cylinderImplicitFunction.C */
implicitFunctions/composedFunction/composedFunctionImplicitFunction.C
LIB = $(FOAM_LIBBIN)/libalphaFieldFunctions
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Mark OLESEN changed the description
changed the description
- Maintainer
@Pawan and/or @ivanspisso - have you hit these? Looks like a compiler error, but I seem to have lost access to marconi.
- Author
I am available for doing tests if needed.
The problem does not appear with Gcc.
- Maintainer
Hi Lionel,
if it is the same thing as here (https://community.intel.com/t5/Intel-C-Compiler/Internal-error-loop-assertion-failed-find-seq-in-lookup-table/td-p/1087603) it looks like a compiler bug with inheriting constructors.
For the first tests let's see if the following works:
Foam::implicitFunctions::sinImplicitFunction::sinImplicitFunction ( const dictionary& dict ) : #if 0 /// Intel compiler bug prevents inheriting constructors??? sinImplicitFunction ( dict.get<scalar>("period"), dict.getOrDefault<scalar>("phase", 0), dict.get<scalar>("amplitude"), dict.get<vector>("direction"), dict.get<vector>("up"), dict.get<vector>("origin") ) #else period_(dict.get<scalar>("period")), phase_(dict.getOrDefault<scalar>("phase", 0)), amplitude_(dict.get<scalar>("amplitude")), up_(normalised(dict.get<vector>("up"))), direction_(normalised(dict.get<vector>("direction"))), origin_(dict.get<vector>("origin")) #endif {}
Edited by Mark OLESEN - Author
Can't understand why, but this is not compiling :
wmake alphaFieldFunctions Making dependency list for source file sinImplicitFunction.C icpc -std=c++11 -pthread -fp-trap=common -fp-model precise -DOPENFOAM=2006 -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 -iquote. -IlnInclude -I/home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude -I/home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OSspecific/POSIX/lnInclude -fPIC -c implicitFunctions/sin/sinImplicitFunction.C -o /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/build/linux64IccDPInt32Opt/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/sin/sinImplicitFunction.o implicitFunctions/sin/sinImplicitFunction.C(91): error: call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type direction_(normalised(dict.get<vector>("direction"))), ^ implicitFunctions/sin/sinImplicitFunction.C(92): error: call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type origin_(dict.get<vector>("origin")) ^ implicitFunctions/sin/sinImplicitFunction.C(94): error: expected a ")" {} ^ implicitFunctions/sin/sinImplicitFunction.C(97): warning #12: parsing restarts here after previous syntax error implicitFunctions/sin/sinImplicitFunction.C(90): error: no instance of constructor "Foam::Vector<Cmpt>::Vector [with Cmpt=Foam::solveScalar={Foam::doubleScalar={double}}]" matches the argument list argument types are: (Foam::VectorSpace<Foam::Vector<Foam::solveScalar>, Foam::solveScalar, (Foam::direction)'\003'>, <error-type>, <error-type>) up_(normalised(dict.get<vector>("up")), ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(110): note: this candidate was rejected because mismatch in count of arguments inline explicit Vector(Istream& is); ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(107): note: this candidate was rejected because arguments do not match inline Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz); ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(104): note: this candidate was rejected because mismatch in count of arguments inline Vector(const VectorSpace<Vector<Cmpt2>, Cmpt2, 3>& vs); ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(100): note: this candidate was rejected because mismatch in count of arguments inline Vector(const Foam::zero); ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(91): note: this candidate was rejected because mismatch in count of arguments Vector(const Vector&) = default; ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(88): note: this candidate was rejected because mismatch in count of arguments Vector() = default; ^ implicitFunctions/sin/sinImplicitFunction.C(97): error #409: "Foam::implicitFunctions::sinImplicitFunction::sinImplicitFunction(const Foam::dictionary &)" provides no initializer for: const member "Foam::implicitFunctions::sinImplicitFunction::direction_" const member "Foam::implicitFunctions::sinImplicitFunction::origin_" implicitFunctions/sin/sinImplicitFunction.C(97): error: expected a "{" implicitFunctions/sin/sinImplicitFunction.C(97): error: expected a "}" compilation aborted for implicitFunctions/sin/sinImplicitFunction.C (code 2)
Edited by Lionel GAMET - Maintainer
Looks like some cut-paste error. You want things like
dict.get<vector>("origin")
but notdict.get("origin")
- the second one will not compile, ever. The pointy-brackets are the expected types (eg, bool, scalar, label, vector, labelList, etc).Edited by Mark OLESEN - Author
Seems not ... Also tested with just that :
Foam::implicitFunctions::sinImplicitFunction::sinImplicitFunction ( const dictionary& dict ) : period_(dict.get<scalar>("period")), phase_(dict.getOrDefault<scalar>("phase", 0)), amplitude_(dict.get<scalar>("amplitude")), direction_(normalised(dict.get<vector>("direction"))), up_(normalised(dict.get<vector>("up")), origin_(dict.get<vector>("origin")) {}
But the compiler still complains :
wmake alphaFieldFunctions Making dependency list for source file sinImplicitFunction.C icpc -std=c++11 -pthread -fp-trap=common -fp-model precise -DOPENFOAM=2006 -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 -iquote. -IlnInclude -I/home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude -I/home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OSspecific/POSIX/lnInclude -fPIC -c implicitFunctions/sin/sinImplicitFunction.C -o /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/build/linux64IccDPInt32Opt/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/sin/sinImplicitFunction.o implicitFunctions/sin/sinImplicitFunction.C(80): error: call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type origin_(dict.get<vector>("origin")) ^ implicitFunctions/sin/sinImplicitFunction.C(81): error: expected a ")" {} ^ implicitFunctions/sin/sinImplicitFunction.C(84): warning #12: parsing restarts here after previous syntax error implicitFunctions/sin/sinImplicitFunction.C(79): error: no instance of constructor "Foam::Vector<Cmpt>::Vector [with Cmpt=Foam::solveScalar={Foam::doubleScalar={double}}]" matches the argument list argument types are: (Foam::VectorSpace<Foam::Vector<Foam::solveScalar>, Foam::solveScalar, (Foam::direction)'\003'>, <error-type>) up_(normalised(dict.get<vector>("up")), ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(110): note: this candidate was rejected because mismatch in count of arguments inline explicit Vector(Istream& is); ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(107): note: this candidate was rejected because mismatch in count of arguments inline Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz); ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(104): note: this candidate was rejected because mismatch in count of arguments inline Vector(const VectorSpace<Vector<Cmpt2>, Cmpt2, 3>& vs); ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(100): note: this candidate was rejected because mismatch in count of arguments inline Vector(const Foam::zero); ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(91): note: this candidate was rejected because mismatch in count of arguments Vector(const Vector&) = default; ^ /home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/src/OpenFOAM/lnInclude/Vector.H(88): note: this candidate was rejected because mismatch in count of arguments Vector() = default; ^ implicitFunctions/sin/sinImplicitFunction.C(84): error #409: "Foam::implicitFunctions::sinImplicitFunction::sinImplicitFunction(const Foam::dictionary &)" provides no initializer for: const member "Foam::implicitFunctions::sinImplicitFunction::origin_" implicitFunctions/sin/sinImplicitFunction.C(84): error: expected a "{" implicitFunctions/sin/sinImplicitFunction.C(84): error: expected a "}" compilation aborted for implicitFunctions/sin/sinImplicitFunction.C (code 2) make: *** [/home/issrvhome1/R15/gametl/work/OpenFOAM/OpenFOAM-plus/build/linux64IccDPInt32Opt/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/sin/sinImplicitFunction.o] Error 2
Edited by Lionel GAMET - Maintainer
Can you upload the log as a file? In case the editor is swallowing things. For reference, here are my copies
- Maintainer
Using
normalised(...)
on the const value or.normalise()
on a non-const value should not be what is causing the difference.Edited by Mark OLESEN - Author
Did not see it but there was a missing parenthesis for up_ :
period_(dict.get<scalar>("period")), phase_(dict.getOrDefault<scalar>("phase", 0)), amplitude_(dict.get<scalar>("amplitude")), up_(normalised(dict.get<vector>("up"))), direction_(normalised(dict.get<vector>("direction"))), origin_(dict.get<vector>("origin"))
Now it compiles with the Intel Icc !
- Maintainer
Good to hear that it compiles, but IMO this looks like a compiler bug. Makes me wonder how many other places are lurking in the code (now or in the future) that trip up the compiler.
- Author
So in the end, I did this in the first source file
diff --git a/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/sin/sinImplicitFunction.C b/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/ index a193d2b..3d542f8 100644 --- a/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/sin/sinImplicitFunction.C +++ b/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/sin/sinImplicitFunction.C @@ -72,16 +72,14 @@ Foam::implicitFunctions::sinImplicitFunction::sinImplicitFunction const dictionary& dict ) : - sinImplicitFunction - ( - dict.get<scalar>("period"), - dict.getOrDefault<scalar>("phase", 0), - dict.get<scalar>("amplitude"), - dict.get<vector>("direction"), - dict.get<vector>("up"), - dict.get<vector>("origin") - ) -{} + period_(dict.get<scalar>("period")), + phase_(dict.getOrDefault<scalar>("phase", 0)), + amplitude_(dict.get<scalar>("amplitude")), + up_(normalised(dict.get<vector>("up"))), + direction_(normalised(dict.get<vector>("direction"))), + origin_(dict.get<vector>("origin")) +{ +}
Edited by Mark OLESEN - Author
And that in the second one :
git diff applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/cylinder/cylinderImplicitFunction.C diff --git a/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/cylinder/cylinderImplicitFunction.C b/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicit index 909087e..51633af 100644 --- a/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/cylinder/cylinderImplicitFunction.C +++ b/applications/utilities/preProcessing/setAlphaField/alphaFieldFunctions/implicitFunctions/cylinder/cylinderImplicitFunction.C @@ -69,13 +69,11 @@ Foam::implicitFunctions::cylinderImplicitFunction::cylinderImplicitFunction const dictionary& dict ) : - cylinderImplicitFunction - ( - dict.get<point>("origin"), - dict.get<scalar>("radius"), - dict.getOrDefault<scalar>("scale", 1), - dict.get<vector>("direction") - ) + origin_(dict.get<point>("origin")), + radius_(dict.get<scalar>("radius")), + scale_(dict.getOrDefault<scalar>("scale", 1)), + direction_(normalised(dict.get<vector>("direction"))), + project_(tensor::I - direction_*direction_) // outer product {}
Edited by Mark OLESEN - Author
So that it now compiles for both !
Corrected files attached as an archive patches_Icc_L.Gamet.tgz
- Maintainer
Hi @Lionel.Gamet - just for information. If you want to drop in a block of code, you can use triple back-ticks on the first and last lines.
``` literal text/code etc. ```
This is a whole lot easier than trying to indent each line by four spaces (anther alternative).
https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
- Author
The text in the bug report looks prettier now !! Thanks a lot for the correction of the Intel Icc workaround.
This might need to be integrated in the next release ... (??)
- Lionel GAMET changed the description
changed the description
- Maintainer
will discuss with andy now.
- Maintainer
Hi @Lionel.Gamet - will push the changes. Could you possibly report to Intel? Might help them find their problem.
- Mark OLESEN closed via commit 719d3f77
closed via commit 719d3f77
- Mark OLESEN mentioned in commit 719d3f77
mentioned in commit 719d3f77
- Andrew Heather mentioned in issue #2675
mentioned in issue #2675