Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

dynamic libraries and Nan...??!!

iatel
Beginner
363 Views
Hello,

I have come across a need to compute some medians. I haven't done that before in Fortran, but now decided to use an IMSL routine - D_EQTIL seemed appropriate. I have to call it 252*3 times, to compute a median for that many arrays total (each array is 50,000-dimensional, although some/many elements are missing). With that, this one median loop tripled my total computation time (a whole big program ran in 6 minutes, now it runs in 18!!).

My program used to link to static libraries (using the "include 'link_f90_static.h" statement at the beginning and the project options "/libs:static /threads /dbglibs"). I decided to try using dynamic libraries instead: now the statements I changed were "include 'link_f90_dll.h'" and "/libs:dll /threads /dbglibs" in the project options. Everything else was exactly as before. The computational time went from 18 minutes back to about 6 - perfect! But now, instead of my medians, I get a whole bunch of NaN in almost all cases, with some nonsensical (relative to correct results) numbers in cases where it's not NaN.

Does this ring any bells? I'm a bit in the dark as to how exactly all the library linking works - am I forgetting to adjust something?

Thanks!
Irina
0 Kudos
1 Reply
Steven_L_Intel1
Employee
363 Views
My guess is that there is more going on than just how you link the program. I suggest that you submit a test case to Intel support.
0 Kudos
Reply