Intel and Stan-math tests

53 views
Skip to first unread message

Sebastian Weber

unread,
Jul 14, 2015, 10:31:10 AM7/14/15
to stan...@googlegroups.com
Hi!

To cut a long story short: The Stan-math library tests only pass successfully with the Intel 14 compiler, when the options

-fp-model precise -fp-model source

are turned on. Intel is so liberal to ignore a couple of floating point standards in favor for more optimization by default. The above options make sure these optimization are not used and FP math is more conservative. Specifically, the test/unit/math/fwd/core/operator_minus_equal_test.cpp fails otherwise!

The Intel 15 compiler, however, does not work with the stan-math library tests. The issue is in Eigen which has not integrated all those needed changes due to Intel 15 into their library (albeit they have fixed the stuff since over a year):

http://eigen.tuxfamily.org/bz/show_bug.cgi?id=874

Apparently they have never merged this into Eigen (it's also not in 3.2.5).

Cheers,
Sebastian

Sebastian Weber

unread,
Jul 14, 2015, 11:21:28 AM7/14/15
to stan...@googlegroups.com
Small addendum: The Intel 15 compiler + MKL works with Eigen if one sets these flags:

-DEIGEN_USE_MKL_ALL -DMKL_BLAS=1 -DNDEBUG -fp-model precise -fp-model source

The important bit is MKL_BLAS=1 which is the value of this macro as it used to be in earlier versions of the Intel MKL (it is a deprecated macro and got removed in Intel15).

No guarantees(!!!!), but the tests do work.

Sebastian

Sebastian Weber

unread,
Jul 17, 2015, 2:38:18 AM7/17/15
to stan...@googlegroups.com
Hi!

I created a bug report at Eigen and ask them to merge the forgotten patch:

http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1041

Let's hope they merge this quickly with stable to make Eigen out-of-the box compatible with MKL 11/Intel 15.

Sebastian

Ben Goodrich

unread,
Jul 18, 2015, 9:40:03 PM7/18/15
to stan...@googlegroups.com, sdw....@gmail.com
Yeti has a Intel Compiler 15 under

/vega/opt/parallel_studio_xe_2015_update1/composer_xe_2015.1.133/bin/intel64/

Ben
Reply all
Reply to author
Forward
0 new messages