JeffersonLab / qphix

QCD for Intel Xeon Phi and Xeon processors
http://jeffersonlab.github.io/qphix/
Other
13 stars 11 forks source link

ICC 15.0.0 causes NaNs in the BLAS #1

Closed bjoo closed 9 years ago

bjoo commented 10 years ago

Tried compiling with the most recent parallel studio (2015) with ICC 15.0.0 20140723. The BLAS components produced NaNs in the solver.

Works fine with Composer 2013 SP1.1.106 -- icc (ICC) 14.0.1 20131008

bjoo commented 9 years ago

Verified that the issue persists for Parallel Studio 2015 Update 3.

icpc (ICC) 15.0.3 20150407 Copyright (C) 1985-2015 Intel Corporation. All rights reserved.

Would need a workaround...

bjoo commented 9 years ago

I have fixed this in the scalar tests, by marking the src and dst pointers in the StreamInSpinor, StreamOutSpinor, WriteSpinor etc as volatile. After this things worked even with the latest icc. I am not sure whether this is needed because:

) of some OpenMP reason (see for example sec 3.2 of http://michaelsuess.net/publications/suess_leopold_common_mistakes_06.pdf ) ) premature compiler optimisation (somehow the compiler was not aware of the side effect of the function and optimized it away). Certainly I could build the code with gcc-4.8.2 and that worked OK.

In any case, the fixed file is on branch

icc15-hotfix

I've pulled it into master and into devel. Please check that it works for you.

I will close this ticket now with a feeling of achievement :) but will reopen it again if needed.

m-schroeck commented 9 years ago

Great! Thanks for the fix! I've pulled the hotfix into qphix-tmf and I can confirm that it works fine with icpc (ICC) 15.0.2 20150121.