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

Unrelated script line in Optimize changes results (& causes crash)

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: P1
    • Resolution: Unresolved
    • Affects Version/s: R2014a, R2015a, R2016a, R2017a, R2018A
    • Fix Version/s: Someday
    • Labels:
    • Environment:

      Windows 7 Enterprise 64-bit
      GMAT 2014-04-17 build

      Description

      I've attached two scripts: nocrash.script and crash.script, both derived from the TESS end-to-end optimization script.

      Here's the diff between the two scripts:

      diff  C:/Users/jjparker/Desktop/nocrash.script C:/Users/jjparker/Desktop/crash.script
      1208c1208
      < 
      ---
      > P3_Altitude = tessPostPAM.Earth.Altitude
      

      crash.script has one additional line, in the second Optimize sequence, that saves the Earth altitude of the spacecraft to a variable.

      This variable is not used anywhere in the Optimize sequence. But, its presence changes the results!

      Without the line, I get a line search error in iteration 80. With the line, I get an integrator error at the same place, followed by a crash. GMAT's memory usage at this point is elevated (111 MB), but stable.

      The script takes nearly 30 min to run, so I attached a log file and some debug output to trace where the crash happens. The debug output simply logs the location and state after each Propagate statement.

        Gliffy Diagrams

          Attachments

          1. crash.script
            56 kB
          2. crash-output.zip
            69 kB
          3. GMT-4520.script
            57 kB
          4. GMT-4520-on-Mac.zip
            74 kB
          5. nocrash.script
            56 kB
          6. nocrash-output.zip
            69 kB
          7. WithLineGmatLog.txt
            87 kB
          8. WithoutLineGmatLog.txt
            87 kB

            Activity

            Hide
            gmat_wcs Wendy Shoan added a comment -

            It converges on Mac without any problems. Attaching log and debug files.

            Show
            gmat_wcs Wendy Shoan added a comment - It converges on Mac without any problems. Attaching log and debug files.
            Hide
            gmat_wcs Wendy Shoan added a comment -

            Since it works fine on the Mac, reassigning to Tom.

            Show
            gmat_wcs Wendy Shoan added a comment - Since it works fine on the Mac, reassigning to Tom.
            Hide
            djcinsb Darrel Conway added a comment -

            I did a bit more checking on Linux. While the script runs to (unconverged) completion on that patform, the behavior there is not what is expected. If the line

            P3_Altitude = tessPostPAM.Earth.Altitude 
            

            (line 1231) is in the script, the second Optimize loop runs 80 iterations before halting with a bad line search; if the line is commented out, the optimizer takes 81 iterations. Both logs are attached. This makes me think that the Parameter tessPostPAM.Earth.Altitude is changing some piece of internal data when it is computed...

            Show
            djcinsb Darrel Conway added a comment - I did a bit more checking on Linux. While the script runs to (unconverged) completion on that patform, the behavior there is not what is expected. If the line P3_Altitude = tessPostPAM.Earth.Altitude (line 1231) is in the script, the second Optimize loop runs 80 iterations before halting with a bad line search; if the line is commented out, the optimizer takes 81 iterations. Both logs are attached. This makes me think that the Parameter tessPostPAM.Earth.Altitude is changing some piece of internal data when it is computed...
            Hide
            djcinsb Darrel Conway added a comment -

            Linux log when the script includes line 1231

            Show
            djcinsb Darrel Conway added a comment - Linux log when the script includes line 1231
            Hide
            djcinsb Darrel Conway added a comment -

            Linux log when the script has line 1231 commented out

            Show
            djcinsb Darrel Conway added a comment - Linux log when the script has line 1231 commented out

              People

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

                Dates

                • Created:
                  Updated: