Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-2923

MATLAB interface max loop count

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P1
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: R2013a
    • Component/s: MATLAB Interface
    • Labels:
      None
    • Environment:

      Windows 7 Enterprise 64-bit
      2012-07-10 build

      Description

      There seems to be some sort of timeout in the MATLAB interface that prevents long scripts from running.

      The attached script calls myfunc.m, which has a dummy for loop that iterates x number of times. When called with x = 1e11, MATLAB standalone takes almost 300 seconds to execute. But when called from GMAT, it returns in less than 10 seconds.

        Gliffy Diagrams

          Attachments

          1. myfunc.m
            0.1 kB
          2. myfunc.m
            0.1 kB
          3. test.script
            0.1 kB
          4. test.script
            0.1 kB

            Activity

            jjkparker Joel Parker created issue -
            Hide
            jjkparker Joel Parker added a comment -

            More info here:
            http://gmat.ed-pages.com/forum/viewtopic.php?f=48&t=43532&p=45099#p45097

            This might be an artifact of something going on inside the Matlab engine

            Show
            jjkparker Joel Parker added a comment - More info here: http://gmat.ed-pages.com/forum/viewtopic.php?f=48&t=43532&p=45099#p45097 This might be an artifact of something going on inside the Matlab engine
            Hide
            shughes Steven Hughes added a comment -

            What is happening on return? Does the mission stop? Is data lost?

            CCB P1 2013a

            Show
            shughes Steven Hughes added a comment - What is happening on return? Does the mission stop? Is data lost? CCB P1 2013a
            shughes Steven Hughes made changes -
            Field Original Value New Value
            Priority P2 [ 3 ] P1 [ 1 ]
            Fix Version/s R2013a [ 10201 ]
            Hide
            jjkparker Joel Parker added a comment -

            It continues with no indication that anything is going wrong.

            Show
            jjkparker Joel Parker added a comment - It continues with no indication that anything is going wrong.
            Hide
            jjkparker Joel Parker added a comment -

            Something's definitely going on. See the updated attachments.

            When supplied with an input of 1e10, the loop appears to iterate 1e10 times using MATLAB, but only 2147483648 times using GMAT.

            Show
            jjkparker Joel Parker added a comment - Something's definitely going on. See the updated attachments. When supplied with an input of 1e10, the loop appears to iterate 1e10 times using MATLAB, but only 2147483648 times using GMAT.
            jjkparker Joel Parker made changes -
            Attachment myfunc.m [ 13516 ]
            Attachment test.script [ 13515 ]
            jjkparker Joel Parker made changes -
            Assignee Joel Parker [ jjkparker ] Linda Jun [ gmatloj ]
            Hide
            shughes Steven Hughes added a comment -

            Perhaps a solution is to be able to set a time out value in the startup file. I suspsect having no value for time out would cause other problems.

            Show
            shughes Steven Hughes added a comment - Perhaps a solution is to be able to set a time out value in the startup file. I suspsect having no value for time out would cause other problems.
            shughes Steven Hughes made changes -
            Summary MATLAB interface timeout MATLAB interface max loop count
            shughes Steven Hughes made changes -
            Assignee Linda Jun [ gmatloj ] Joel Parker [ jjkparker ]
            Hide
            shughes Steven Hughes added a comment -

            ccb: p1 13a

            explore more and see if Mathworks has insight.

            Show
            shughes Steven Hughes added a comment - ccb: p1 13a explore more and see if Mathworks has insight.
            Hide
            jjkparker Joel Parker added a comment -

            The function input is correctly reaching MATLAB as 1e10. I've submitted it to Mathworks as a service request.

            Show
            jjkparker Joel Parker added a comment - The function input is correctly reaching MATLAB as 1e10. I've submitted it to Mathworks as a service request.
            Hide
            jjkparker Joel Parker added a comment -

            This actually isn't a bug: running the function manually in GMAT's MATLAB Engine window shows this warning:

            Warning: FOR loop index is too large. Truncating to 2147483647. 
            

            This warning is never reported to the GMAT message window (see bug GMT-3779).

            Changing myfunc.m to use a while loop instead shows correct behavior.

            Show
            jjkparker Joel Parker added a comment - This actually isn't a bug: running the function manually in GMAT's MATLAB Engine window shows this warning: Warning: FOR loop index is too large. Truncating to 2147483647. This warning is never reported to the GMAT message window (see bug GMT-3779 ). Changing myfunc.m to use a while loop instead shows correct behavior.
            jjkparker Joel Parker made changes -
            Resolution Won't Fix [ 2 ]
            Status Open [ 1 ] Resolved [ 5 ]
            Hide
            jjkparker Joel Parker added a comment -

            Closing; no further tests or documentation needed.

            Show
            jjkparker Joel Parker added a comment - Closing; no further tests or documentation needed.
            jjkparker Joel Parker made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: