Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

EIgen robust Cholesky broken with Intel 18.0.1

Roberto1
Beginner
448 Views
Hi,
I have just noticed that the LDLT decomposition is broken with the latest Intel compiler.
The installation I have access to reports for icpc -v:
icpc version 18.0.1 (gcc version 6.4.0 compatibility)
Comparing the solutions for a random SPD matrix obtained with FullPivLU, PartialPivLU, LLT and LDLT shows that the latter is broken. You can find the code for this test on GitHub: https://github.com/robertodr/eigen-cholesky

Intel 18.0.1 results
Linear system solvers comparison
  Relative error |Ax - b| / |b| 
---------------------------------
FullPivLU    2.74599e-11
PartialPivLU 1.37848e-11
LLT          1.70863e-11
LDLT         7.02994

  Error wrt FullPivLU |x - x_flu| / |x_flu| 
---------------------------------------------
PartialPivLU 1.91271e-11
LLT          8.91642e-11
LDLT         1.00003
 
GCC 6.4.0 results
Linear system solvers comparison
  Relative error |Ax - b| / |b| 
---------------------------------
FullPivLU    2.74599e-11
PartialPivLU 1.37848e-11
LLT          1.54872e-11
LDLT         2.0482e-11

  Error wrt FullPivLU |x - x_flu| / |x_flu| 
---------------------------------------------
PartialPivLU 1.91271e-11
LLT          3.25784e-11
LDLT         1.47468e-10
 
The sample works with Intel 17 and 18.0.0 Compiling in debug mode also fixes the issue. The Eigen developers suggested setting -fp-model precise but that didn't help
Thanks in advance for any suggestions.
  Roberto
0 Kudos
3 Replies
Bridgewater__Hayden
448 Views

I'm having the same problem as you, Roberto. Did you manage to find the solution to this elsewhere btw? Any suggestions would be appreciated!

0 Kudos
Viet_H_Intel
Moderator
448 Views

Have you tried different setting for -fp-model= strict, consistent, source...?

Regards,

Viet

0 Kudos
Roberto1
Beginner
448 Views

Turning on optimizations and using -fp-model strict fixes the problem. None of the other -fp-model flags works though.

0 Kudos
Reply