GMAT Startup and User Defined Environment Variables ...

Development related to the GMAT core and GUI

GMAT Startup and User Defined Environment Variables ...

Postby marchand » Thu Jul 19, 2012 5:09 pm

I've observed this issue for months now, and I'd been meaning to document it so here it goes. If I define an environment variable with the path to the GMAT installation, say GMAT_HOME, somehow that messes up my ability to load user defined plugins at startup. I have NO idea why that would be the case though. I tried calling the environment variable different names, like myGMAT, but that doesn't seem to make a difference. If I delete the environment variable and reboot the problem goes away. If I choose to keep the environment variable, I can resolve the issue simply by typing the full path to the user defined plugin in the gmat startup file, rather than using relative paths. However, relative paths work fine in the startup file as long as that environment variable isnt' set. It is very strange indeed. Just wanted to document that, and see if anybody else notices that issue.
marchand
 
Posts: 86
Joined: Tue Feb 21, 2012 2:42 pm

Re: GMAT Startup and User Defined Environment Variables ...

Postby DJCinSB » Thu Jul 19, 2012 10:10 pm

Hmm, I tried doing equivalent things in Linux and we look okay there. I'll check in my Windows environment next time I run there.
DJCinSB
 
Posts: 274
Joined: Mon Jun 09, 2008 3:57 pm

Re: GMAT Startup and User Defined Environment Variables ...

Postby marchand » Thu Jul 19, 2012 10:33 pm

I guess I should ask, is there any reason why I should not define an environment variable called GMAT_HOME, or GMAT_PLUGIN_HOME?
marchand
 
Posts: 86
Joined: Tue Feb 21, 2012 2:42 pm

Re: GMAT Startup and User Defined Environment Variables ...

Postby marchand » Fri Jul 20, 2012 5:09 am

Well, after a lot of trial and error I discovered what causes the problem and what the solution is. Some of the GMAT plugins fail to load when I create the environment variables, and proceed to start GMAT without rebooting windows. If I add the environment variable, reboot windows, and then start GMAT all the plugins load fine. Now, why that is the case I'm not sure but at least I know how to get rid of the problem. I can now define GMAT_HOME and GMAT_PLUGIN_HOME without any impact on loading GMAT plugins. Curiously, VS2010 is able to see the new environment variables without rebooting windows. You do have to restart VS2010 after creating them though. In contrast, the only approach that seems to work with GMAT is to reboot the computer after defining the environment variable. I guess not all programs in windows react in the same way to changes in the environment. Of course, it could just be a nutty computer :-)
marchand
 
Posts: 86
Joined: Tue Feb 21, 2012 2:42 pm

Re: GMAT Startup and User Defined Environment Variables ...

Postby jjkparker » Fri Jul 20, 2012 4:01 pm

I can't duplicate this on Windows 7 Enterprise 64-bit, using either user environment variables or system environment variables.
Joel J. K. Parker
Flight dynamics engineer, GMAT team
http://gmatcentral.org
jjkparker
 
Posts: 617
Joined: Thu Jan 07, 2010 9:48 pm
Location: NASA Goddard Space Flight Center, Greenbelt, MD

Re: GMAT Startup and User Defined Environment Variables ...

Postby marchand » Fri Jul 20, 2012 5:46 pm

Then maybe it's just my computer! I got it to work yesterday but by rebooting after making the changes to the environment. I think the problem may be something unique to my windows installation. Basically, if I edit the User environment variables (not the system variables), either to create a new variable or edit an existing one, and then I go and try to open GMAT it says it can't load some of the user defined plugins. However, if I reboot the computer, when I start GMAT again the plugins load just fine. I think we can chuck this one off to windows, and not GMAT.

Thanks for looking into it.
marchand
 
Posts: 86
Joined: Tue Feb 21, 2012 2:42 pm

Re: GMAT Startup and User Defined Environment Variables ...

Postby DJCinSB » Fri Jul 20, 2012 8:15 pm

I also just tried it here (on Windows 7 64-bit) and don't see the issue. If you need to make that change very often, sometimes it works to just log out and back in rather than doing a full reboot.
DJCinSB
 
Posts: 274
Joined: Mon Jun 09, 2008 3:57 pm


Return to Core Development

Who is online

Users browsing this forum: No registered users and 5 guests