When attempting to compile MSM_OCR v1.0 with icpc v17.0.4, the following error prevents the correct compilation of Fusion.cpp:
icpc -O2 -xHost -ftz -fp-speculation=safe -fp-model source -Wall -ansi -pedantic -Wno-long-long -g -std=c++11 -DHAS_HOCR -DNDEBUG -m64 -O2 -xHost -m64 [...] -c -o Fusion.o Fusion.cpp
[...]
/opt/easybuild/software/MPI/intel/2017.4.196-GCC-6.4.0-2.28/impi/2017.3.196/MSM/1.0/extras/include/ELC/ELC.h(268): error: more than one instance of overloaded function "abs" matches the argument list:
function "abs(int)"
function "std::abs(long long)"
function "std::abs(long)"
argument types are: (REAL)
REAL q = abs(c);
^
detected during:
instantiation of "void ELCReduce::PBF<REAL>::reduceHigher(int) [with REAL=REAL={double}]" at line 36 of "Fusion.cpp"
instantiation of "void MESHREG::Fusion::reduce_and_convert(ELCReduce::PBF<REAL={double}> &, OPTIMIZER &, MESHREG::Reduction) [with OPTIMIZER=DISCRETEOPT::DiscreteModelDummy]" at line 302 of "Fusion.cpp"
/opt/easybuild/software/MPI/intel/2017.4.196-GCC-6.4.0-2.28/impi/2017.3.196/MSM/1.0/extras/include/ELC/ELC.h(291): error: more than one instance of overloaded function "abs" matches the argument list:
function "abs(int)"
function "std::abs(long long)"
function "std::abs(long)"
argument types are: (REAL)
addCancelTerm(it, elc_idx, abs(c));
^
detected during:
instantiation of "void ELCReduce::PBF<REAL>::reduceHigherApprox() [with REAL=REAL={double}]" at line 47 of "Fusion.cpp"
instantiation of "void MESHREG::Fusion::reduce_and_convert(ELCReduce::PBF<REAL={double}> &, OPTIMIZER &, MESHREG::Reduction) [with OPTIMIZER=DISCRETEOPT::DiscreteModelDummy]" at line 302 of "Fusion.cpp"
This can be easily solved with the addition of the following include statement in ELC.h:
When attempting to compile
MSM_OCR v1.0
withicpc v17.0.4
, the following error prevents the correct compilation ofFusion.cpp
:This can be easily solved with the addition of the following include statement in
ELC.h
: