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

VS2019 Fortran with IMSL - Problem with ZANLY Function

Wayne_Y
Novice
592 Views

Hi there, I am currently using the DZANLY function from the IMSL numerical library to solve an equation, using the following line of codes with each of the inputs defined.

 CALL D_ZANLY (F, z, NKNOWN=nknown, NNEW=nnew, NGUESS=nguess, ZINIT=zinit, INFO=info, ERRABS=ERRABS, ERRREL=ERRREL)

However, upon execution, the code seems to stop immediately once it reaches this line, and does not give any output / warnings / errors. It just stops once the D_ZANLY function is called upon. Does anyone know why this happens? Thank you.

Labels (1)
0 Kudos
5 Replies
Steve_Lionel
Black Belt Retired Employee
572 Views

This symptom most often means that the stack has overflowed. For some reason, this sometimes causes the program to quietly exit.  It may be that the overflow is happening within IMSL (which is not supported here - you'd have to contact RogueWave), but as a first attempt, increase the stack reserve size. If you are using Visual Studio, this is project property Linker > System > Stack Reserve Size. The default is 10MB, so try 100000000. Don't make this larger than necessary.

mecej4
Black Belt
553 Views

This post is a continuation of your earlier post on the same IMSL example code, and starting a new thread  is not good under such circumstances.

Your example code contains no output statements; the line after the one that calls the IMSL routine is the program END statement. Thus, you told the program not to give any output.

I do not have your version of IMSL. With an older version, namely, IMSL 7,  and Intel Fortran 2013SP1, building with the default options gave me an EXE with 1 MB of stack ("100000 size of stack reserve"), and that was enough to run the program from the command line as well as in Visual Studio 2013 . I added a print statement for the resulting eigenvalues, and the output appeared to be correct.

Wayne_Y
Novice
516 Views

My apologies, it is the same line of code, but in this case I was using the D_ZANLY function for a different application. The earlier post was a simple example that I was trying to make sure I was able to call the function properly.

In this case, I was using it for a different application and I was able to link it properly, but encountered the problem of the code exiting without giving any errors / warnings etc. To confirm, I created a .dat file and included a write statement before and after the D_ZANLY function and only the one before was captured. I tried increasing the Stack Reserve Size but that does not seem to work.

mecej4
Black Belt
496 Views

There can be any number of reasons why your "different application" failed, and we cannot speculate or study more than one or two of those in a reasonable amount of time. The debugger may indicate that the program is hanging up at a particular line of code, but the causes may well be located elsewhere.

Please provide the example code that you said is not working properly, and see the sticky post in this forum for details on how to report the problem.

Ulrich_M_
New Contributor I
508 Views

In the F function, print z and the return value to check those make sense.

Reply