Results 1 to 6 of 6

Thread: How to decide of check the workspace of LSLXG in IMSL

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Posts
    3

    How to decide of check the workspace of LSLXG in IMSL

    Hi everyone,
    I have a question about the value of workspace in IMSL. Now I use the function of LSLXG to solve a sparse system of linear equations. In the IMSL users' guide, it said the workspace may be explicitly provided by set the value of IPARAM(5). When the matrix is large enough ,I found I must set this value to avoid the error of "core dump". So I have two questions:
    1. How to decide the value of the workspace (that is the value of IPARAM(5))?
    2. If I set a very large value of the workspace and the program is compiled successful. Is it possible to find out the real value of the workspace it used and I could reset it properly?

    Any answers or ideas or useful materials are welcome!Thank you in advance.

    jorsey

  2. #2
    You may have already seen this, but the Comments section of the documentation for LSLXG includes details about workspace, including


    Workspace may be explicitly provided, if desired, by use of L2LXG/DL2LXG. The reference is:

    CALL L2LXG (N, NZ, A, IROW, JCOL, B, IPATH, IPARAM, RPARAM, X, WK, LWK, IWK, LIWK)
    The additional arguments are as follows:
    WK Real work vector of length LWK.
    LWK The length of WK, LWK should be at least 2N + MAXNZ.
    IWK Integer work vector of length LIWK.
    LIWK The length of IWK, LIWK should be at least 17N + 4 * MAXNZ.

    The workspace limit is determined by MAXNZ, where
    MAXNZ = MIN0(LWK-2N, INT(0.25(LIWK-17N)))

  3. #3
    Junior Member
    Join Date
    Apr 2014
    Posts
    3
    Hi omega,
    Thank you very much for your reply. Yes, I have already seen this in users' guide. But I still can't understand: the value of LWK and LIWK is decided by MAXNZ, but the last line shows MAXNZ is decided by LWK and LIWK. Could you help me explain more about that? Really appreciate your help.

    jorsey

  4. #4
    Senior Member mecej4's Avatar
    Join Date
    Dec 2009
    Posts
    132
    I agree that the documentation is not clear on workspace allocation and, if we think of MAXNZ as the maximum possible value of NZ for which the workspace provided would be sufficient, we would be wrong. Here is the relevant portion of text from the IMSL Version 4 manual for LSLXG:
    MAXNZ is the maximal number of nonzero elements at any stage of the
    Gaussian elimination. In the absence of other information, setting MAXNZ
    equal to 3 * NZ is recommended. Higher or lower values may be used
    depending on fill-in
    It would be helpful if the IMSL people confirmed that this statement is still valid for later versions of IMSL. With this important text omitted, the documentation for the current version of IMSL-Fortran leaves MAXNZ undefined and open to false interpretation.
    Last edited by mecej4; 04-11-2014 at 07:41 AM.

  5. #5
    Junior Member
    Join Date
    Apr 2014
    Posts
    3
    Hi mecej4,

    Thank you very much for your reply. It's really useful.

  6. #6
    Junior Member
    Join Date
    Sep 2005
    Posts
    12
    We have confirmed that the description of MAXNZ was inadvertently dropped from the comments section of the LSLXG documentation. The description shown in the post dated 04-05-2014 is correct, and will be reinserted in a future version. Thanks for letting us know about it.

    IMSL Technical Support

Tags for this Thread

Posting Permissions

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