Results 1 to 5 of 5

Thread: Errors in IMSL-6 manual : examples for DASPG

  1. #1
    Senior Member mecej4's Avatar
    Join Date
    Dec 2009
    Posts
    139

    Errors in IMSL-6 manual : examples for DASPG

    Example-2: Replace

    Code:
    REAL       FEETL, GRAV, LENSQ, MASSKG, MASSLB, METERL, M
    by

    Code:
    REAL, SAVE ::  FEETL, GRAV, LENSQ, MASSKG, MASSLB, METERL, M
    Example-4:

    a) Replace
    Code:
     USE IMSL_LIBRARIES
    by
    Code:
    USE NUMERICAL_LIBRARIES
    USE UMAG_INT
    (b) Remove
    Code:
    EXTERNAL   DGSPG, DJSPG
    (c) Change "numopts=1" to "numopt=1" in the two calls to UMAG.

    (d) In the second call to SCOPY, change WK(IVAL(1:)) to WK(IVAL(1):)

    (e) In the call to SAXPY, change GVAL((J+1):, 1) to GVAL((J+1):), 1

  2. #2
    Senior Member
    Join Date
    Sep 2005
    Posts
    105
    These changes will have to reviewed for the next release of IMSL Fortran. Thank you for your input.

  3. #3
    Senior Member
    Join Date
    Sep 2005
    Posts
    105
    Here are the corrected examples. They will be in the next version of IMSL Fortran, but until then you can use these.

  4. #4
    Junior Member
    Join Date
    Feb 2011
    Posts
    1

    Mike

    Those examples were very helpful. However I wonder if you can give me an example of how to change the default value of the maximum number of steps to more than 500. [IN(6) option I believe]. Also how to increase the tolerance to say 1e-6

    Thanks

    Mike

  5. #5
    Senior Member mecej4's Avatar
    Join Date
    Dec 2009
    Posts
    139
    The DASPG routines are marked "deprecated" in FNL 7.

    The third example, daspgex3.f90, shows how to read and write algorithm control variables, and the usage of these variables is explained in the manual.

    For example, to specify the iteration limit in daspgex1.f90, add the following lines of code

    Code:
    ! Set iteration limit to 10
        IOPT(1) = INUM
        CALL IUMAG ('math', ICHAP, IGET, 1, IOPT, IN)
        IOPT(1) = IN(6)
        IVAL(1) = 10
        CALL IUMAG ('math', ICHAP, IPUT, 1, IOPT, IVAL)
    and add PARAMETER and TYPE declarations for the new variables introduced as in daspgex3.f90. After making these changes, if we try to run the program, it aborts with the following printout:

    Code:
               T              Y(1)           Y(2)          Y'(1)          Y'(2)
    
     *** WARNING  ERROR 3 from DASPG.  At the current T=1.720000E-02, 10 steps
     ***          were taken on this call before reaching TOUT.
    
     *** TERMINAL ERROR 4 from D2SPG.  IDO is 4. An error condition has occurred.
         Here is a traceback of subprogram calls in reverse order:
         Routine name                    Error type  Error code
         ------------                    ----------  ----------
         D2SPG                                5           4    (Called internally)
         DASPG                                0           0
         USER                                 3           3

Posting Permissions

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