Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
4 Views

Program using IMSL LIN_SOL_GEN crashing on runtime machine

Hello all,

This has to be a silly problem but I can't seem to find the source of it.

I have created a Fortran module which I compile and link to work with Python. This module makes use of several routines of the IMSL library, including LIN_SOL_GEN. Compilation seems to work fine( I'm using static linking) and the whole thing runs fine on my machine. However, when I give the compiled file to a colleague to run on his machine (he has installed the Intel Fortran redistributables library), everything works fine except for the LIN_SOL_GEN routine. On his machine, when that particular routine is called, the program stops without any error message. Absolutely no clue whatsoever.

I have modified the terminal error flags so that IMSL routines won't stop the program, to no avail.

I have tried to use an alternate routine to perform the linear solve, LIN_SOL_SVD (basically, just changed the name of the routine called!), and the whole thing works fine on the runtime machine, albeit LIN_SOL_SVD is a lot slower than LIN_SOL_GEN for my particular problem.

I suspect this has to do with "High performance"/SMP behaviour of LIN_SOL_GEN but can't find exactly what makes it fail on the runtime machine but not on mine. Is there something special to do to make SMP routines work on runtime-only machines?

Many thanks.

 

Cédric

 

0 Kudos
3 Replies
Highlighted
4 Views

You might need to install MKL

You might need to install MKL redistributables on the target system. These are not included with the compiler redist installer.

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
4 Views

Thanks for the suggestion

Thanks for the suggestion Steve.

I've tried that but it did not fix the problem (I copied the mkl folder from the redist folder and added the copied folder to the path on the target machine). However, I think it did send me on the right path since I have now fixed the issue, which was related to the linking process.

I have found out that the crash depended on array size. When the arrays used were small enough, the program would run fine on the target machine and above a certain unknown size, it just crashed silently. I've looked at the event log and the exception code was 0x000000c5 (access violation?). That was all puzzling and didn't help. But perhaps it can be seen as a symptom for other people.

This occurred when using LIN_SOL_GEN and LSADS. I didn't have the problem when using LIN_SOL_SVD (but it's far slower since not optimised for my kind of problem, real symmetric positive definite matrix).

I have managed to resolve the problem by changing a /MD flag to a /MT and adding the mkl path to the link paths. The size of the compiled dll went from 8MB to 11MB, which indicates something was not getting statically linked (perhaps mkl?). I guess on the target machine, something strange happened because of that. Perhaps something was getting screwed up in some calls to mkl.

Anyway, problem solved.

Thanks.

Cédric

0 Kudos
Highlighted
4 Views

Ok, glad to hear it.

Ok, glad to hear it.

Retired 12/31/2016
0 Kudos