I am attaching a minimal Fortran program that links to the Intel MKL to make use of the LAPACK function gels, which solves a linear least squares problem.
When I compile and run this program with Intel Fortran Composer XE 2013, the output is totally wrong. Compiling and running with Intel Fortran Composer XE 2011 gives the correct results. The output from both is attached.
The very strange thing is that the results are correct on both compilers if you change line 3 of the code to nt = 513 or any smaller number, whereas they stay incorrect for any nt >= 514. This is not due to weird values - the values being read in are all real, finite numbers.
The output also shows the compilation and linking lines (I used the most recent MKL link line helper). There you see the exact version numbers of the compilers. I should note that the Composer XE 2013 runs on Ubuntu 12.04, whereas the Composer XE 2011 runs on CentOS 6 (and used to run on Ubuntu 10.10, also giving the correct results). So it could be an issue with Ubuntu 12.04.
Let me know if I can be of any help.
EDIT: If you call gelsy instead of gels, then the results are correct. I updated the main.f90, so there is a logical 'use_gelsy_instead', and also it now outputs the info flag of the gels command.