Results 1 to 2 of 2

Thread: Stack overflow on legacy MSIMSL code

  1. #1
    Junior Member
    Join Date
    Mar 2018
    Posts
    6

    Stack overflow on legacy MSIMSL code

    I am trying to run the code from a 2006 economics paper that uses the now obsolete "use MSIMSL", which I have changed to "use numerical_libraries", to no avail. My hunch is that there is something else that needs to be updated from the old code, but it could also be an configuration or variable assignment issue.

    Specifically, I can compile, but running the executable leads to a stack overflow error. Using the \traceback and \check:all options leads to several identical blocks where data is read into the program with the warning (406) ("In call to I/O Read routine, an array temporary was created for argument #1") referring to line 151 of the code, followed by the stack overflow error (severe 170) referring to lines 315 and 323. \heap-arrays seems to make no difference.

    I have attached an image of what the warnings and errors look like, as well as the code itself. Notable details:
    * Line 151 is the first instance where data is read into the program using a loop, so it makes sense that it's appearing many times.
    * Line 316 calls the UMPOL function (minimization using the direct search polytope algorithm), and 323 is the beginning of the subroutine comprising the remainder of the code through line 2237.
    * The program reads data from text files (totaling roughly 5.7MB), and includes the following IMSL functions (a minimization, three random numbers functions, and least squares): UMPOL, RNUN, RNNOA, RNPER, RLSE.

    I'm running a Windows 7 machine with Visual Studio Community 2015, Intel Parallel Studio XE 2017u2, and the IMSL FNL 2018.0.0. I'm compiling with the standard flags (%F90% %F90FLAGS% estimation.f90 $LINK_FNL%) and executing on via command line (Intel 64 Visual Studio 2015 environment).

    Thanks in advance.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by conda; 04-23-2018 at 05:08 PM.

  2. #2
    Senior Member mecej4's Avatar
    Join Date
    Dec 2009
    Posts
    127
    Please provide the data file(s), or at least the portion of them that are read before the stack overflow occurred.

    You may try changing the stack limit of your EXE by using the editbin utility:

    editbin estimation.exe /stack:16000000
    Last edited by mecej4; 04-24-2018 at 04:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •