- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I noticed that the subroutine sprsin in numerical recipes produces catastrophic error if compiled with ifort 15.
The problem seems due to the line
sa%jcol=pack(spread(arth(1,1,n),1,n),mask)
It is possible to reproduce the error by compiling the code test_err1.f90
ifort test_err1.f90
./a.out
At the same time I found that this line
sa%irow = pack(spread(arth(1,1,NDIM),2,NDIM),mask(:,:))
in test_err2.f90 produce bad results.
gfortran compiler and old version of ifort produce correct results.
I use Ubuntu 14.04.2 LTS 64bit
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, we'll take a look.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Escalated as issue DPD200371368. Thanks for the nice examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's a workaround.
Declare a local variable such as this:
integer, dimension(NDIM,NDIM) :: arth_temp
and then replace the problem statement with these two lines:
arth_temp = spread(arth(1,1,NDIM),1,NDIM) sa%irow = pack(arth_temp,mask(:,:))
This is effectively what the compiler needs to do anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I expect this to be fixed in Update 1 to the 16.0 compiler.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page