Results 1 to 5 of 5

Thread: Variable size problem (NCOL>=34) with DCDIST()

  1. #1
    Junior Member
    Join Date
    Mar 2006
    Posts
    11

    Question Variable size problem (NCOL>=34) with DCDIST()

    Hello,

    I am using the IMSL version that came with Compaq Fortran Version 6.6 with the same compiler and Visual Studio 6.0. I am having problems running DCDIST() ( REAL*8 version of CDIST() ) with 34 or more variables.
    Everything works fine with 33 or less variables (NCOL<34) but when I use the subroutine with 34 or more DCDIST() hangs. I get no errors back. I have to press control-C to stop it. I have the reserve stack at 250 megabytes (for both Debug and release) so I don't think that's the problem. I tried to read any info/warns/errors that may be returned with

    CALL ERSET (0, 1, -1)

    but, again, the system hangs at the DCDIST() call. I've been using many IMSL rountines the past several years and this is the first strange hang bug I've encountered. Is it a bug?

  2. #2
    Senior Member ed's Avatar
    Join Date
    Aug 2005
    Posts
    312
    The problem was actually with an underlying routine where there was a limit that involved the product of NCOL and NROW. Specifically, if (NRA*NCA) is greater than IMACH(5)/NRA or IMACH(5)/NCA then the algorithm will fail due to an integer overflow.

    This issue was identified in IMSL Fortran v4 and fixed for future releases.


    The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

  3. #3
    Junior Member
    Join Date
    Mar 2006
    Posts
    11

    Any fixes for my version

    Ed,

    Are there any patches I can apply for the CDIST routine?
    I hope I don't have to re-purchase the entire Fortran IMSL library as that would really be laime.

    -james


    BTW

    I see you have the Eagles logo? I'm from West Philly. Eagles Rock, glad to see TO off to Dallas...

  4. #4
    Junior Member
    Join Date
    Mar 2006
    Posts
    11

    Do you mean IMACH(5)/LDX not IMACH(5)/NROW ?

    Quote Originally Posted by ed
    The problem was actually with an underlying routine where there was a limit that involved the product of NCOL and NROW. Specifically, if (NRA*NCA) is greater than IMACH(5)/NRA or IMACH(5)/NCA then the algorithm will fail due to an integer overflow.

    This issue was identified in IMSL Fortran v4 and fixed for future releases.
    I have only about 60 something rows and 36 columns, but my Leading dimension on the DIST matrix is 8001.
    I'm assuming IMACH(5) is INT*4 equals about 2e6
    so 2e6/8001=2135 which is about where my error is.
    So my question is: do you mean when NRA*NCA is greater than IMACH(5)/LDX, IMSL will hang?

  5. #5
    Senior Member ed's Avatar
    Join Date
    Aug 2005
    Posts
    312
    Unfortunately, there is no patch fix available. The issue was with an underlying subroutine that affected 3 or 4 functions and was only fixed with the release of IMSL Fortran v5.

    From reading notes in the database, if NCA*NRA*NCA or NCA*NRA*NRA is greater than about 2e6, the underlying function hangs. The fix was to change a variable from INT*4 to INT*8.

    And yes, I've been an Eagles fan for 20 years or so through all those thin years (I grew up in Delaware). And it was a great day to see TO go to Dallas, but I fear those 2 games next year. It would have been better to see him go to the AFC....


    The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

Posting Permissions

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