Ok.  I was worried about performance because maybe you have to wait few seconds 
for the process to be killed off.  But, we could try it the way you suggest 
first.

Do you know what the syntax would be and where to put in in the main test 
script.  (We only want to kill the server processes not the main matlab command 
window)

From: John McGreevy <[email protected]>
Sent: Monday, July 29, 2019 10:32 AM
To: Cooley, D S. (GSFC-5950) <[email protected]>; McGreevy, John J. 
(GSFC-583.0)[EMERGENT SPACE TECH., INC] <[email protected]>
Cc: Kazmi, Syeda A. (GSFC-5830) <[email protected]>; 
[email protected]
Subject: [EXTERNAL] RE: Matlab question

We could just kill the existing server MATLAB processes before every GMAT 
script instead of needing a list of scripts that use MATLAB.

From: Cooley, D S. (GSFC-5950) <[email protected]<mailto:[email protected]>>
Sent: Monday, July 29, 2019 10:30
To: John McGreevy 
<[email protected]<mailto:[email protected]>>; 
McGreevy, John J. (GSFC-583.0)[EMERGENT SPACE TECH., INC] 
<[email protected]<mailto:[email protected]>>
Cc: Kazmi, Syeda A. (GSFC-5830) 
<[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>
Subject: RE: Matlab question

How about if we created a list of all GMAT scripts that needed matlab.

Then inside the main Windows matlab test script, T6_NightlyRunDef_RetrySVN.m, 
we add logic to kill existing server matlab processes right before we ran a 
script that needs matlab.


Right now, we have the following  before the script runs.

        mProc =  System.Diagnostics.Process.GetCurrentProcess();
        mPid = mProc.Id;
        pidcmd = 'tasklist /fi "IMAGENAME eq MATLAB.exe" /fo list';
        fprintf('Current MATLAB PID is %d\n', mPid);
        [pidStatus, pidOutput] = system(pidcmd);




From: John McGreevy 
<[email protected]<mailto:[email protected]>>
Sent: Monday, July 29, 2019 10:25 AM
To: Cooley, D S. (GSFC-5950) <[email protected]<mailto:[email protected]>>; 
McGreevy, John J. (GSFC-583.0)[EMERGENT SPACE TECH., INC] 
<[email protected]<mailto:[email protected]>>
Cc: Kazmi, Syeda A. (GSFC-5830) 
<[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>
Subject: [EXTERNAL] RE: Matlab question

I'm not sure if that can be done or how to do that.

From: gmat-nav 
<[email protected]<mailto:[email protected]>> On 
Behalf Of Cooley, D S. (GSFC-5950) via gmat-nav
Sent: Monday, July 29, 2019 10:13
To: McGreevy, John J. (GSFC-583.0)[EMERGENT SPACE TECH., INC] 
<[email protected]<mailto:[email protected]>>
Cc: Kazmi, Syeda A. (GSFC-5830) 
<[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>;
 '[email protected]' 
<[email protected]<mailto:[email protected]>>
Subject: [gmat-nav] Matlab question

John,

Suppose you have a GMAT script that uses the fmincon matlab interface.

Suppose that before you even call your matlab function, you want to kill all 
existing Matlab command window, regserver, processes (not the main matlab 
window but the process spawned by previous GMAT calls to Matlab.  Regserver 
commands I think they are called)

Is there a way to do it from within the GMAT script?

Thanks,
steve
_______________________________________________
Gmat-buildtest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gmat-buildtest
  • [Gmat-build... Cooley, D S. (GSFC-5950) via Gmat-buildtest
    • Re: [G... John McGreevy
      • Re... Cooley, D S. (GSFC-5950) via Gmat-buildtest
        • ... John McGreevy
          • ... Cooley, D S. (GSFC-5950) via Gmat-buildtest
            • ... John McGreevy
      • Re... Slojkowski, Steven E. (GSFC-595.0)[OMITRON] via Gmat-buildtest

Reply via email to