|
From: Darrel J. C. <gm...@th...> - 2007-11-24 23:15:38
|
Liam Healy wrote:
> Can you explain how to compile and test the console application? I
> am doing make -f MakeGmat.eclipse
> with options
> USE_MATLAB = 0
> WX_28_SYNTAX = 0
> USE_64_BIT_LONGS = 1
> and this ends in errors:
<Snipped for brevity>
No problem.
The console application does not have a GUI, so you should not see any
wxWidgets messages. I suspect that you still need to turn on the
CONSOLE_APP flag. Here's the top of my BuildEnv.mk file (it's attached
for your use as well):
# $Header$
# Build environment file for Linux
# Flags used to control the build
USE_MATLAB = 0
USE_DEVIL = 0
CONSOLE_APP = 1
DEBUG_BUILD = 0
PROFILE_BUILD = 0
WX_28_1SYNTAX = 0
# For AMD64 native code, this variable should be set equal to 1
USE_64_BIT_LONGS = 1
The problem is likely to be in the CONSOLE_APP setting -- set it to 1,
and the build process will skip all of the GUI code. This file should
be placed in the GMAT src folder. Once it is in place, you should be
able to make the console application. Let me know if that build still
fails. (The Fortran compiler warning at the top of your build log is
something I keep meaning to clean up, but it shouldn't break the build.)
Assuming that everything builds, you'll have an executable named
gmatConsole in the gmat bin folder. If you try to run it from a
terminal window, you'll see this:
djc@Arecibo:~/TS_Code/gmat/bin$ ./gmatConsole
********************************************
*** GMAT Console Application
********************************************
Goddard Mission Analysis Tool
Console Based Version
Build Date: Nov 23 2007 18:36:21
Enter a script file, q to quit, or an option:
(Looks like there is a bug -- that should read "General Mission Analysis
Tool." Okay, that's fixed now; it'll be correct in your next update
from Subversion.) The application is waiting for a script file name
now. I've attached one named testprop.script. Place that script in
your gmat bin directory, and enter its name at the prompt. When you do
that, one of four things will happen:
(1) The script will run to completion.
(2) You will see this message:
Enter a script file, q to quit, or an option: testprop.script
Error occured during initialization: GmatBase Exception Thrown:
FileManager::ReadStartupFile() cannot open:
Console Application Execution Failed: Moderator failed to initialize!
(3) You will see this message:
Enter a script file, q to quit, or an option: testprop.script
Moderator is creating core engine...
GmatBase Exception Thrown: MERCURY_POT_FILE not in the
gmat_startup_file
...<some nearly identical text removed>
Error opening DE file:./files/planetary_ephem/de/winp1941.405.
Please check file path. The next filetype in the list will be used.
Successfully set Planetary Source to use: Analytic
Setting nutation file to ./files/planetary_coeff/NUTATION.DAT
Setting planetary coeff. file to ./files/planetary_coeff/NUT85.DAT
Error occured during initialization: Utility Exception: Error
opening
ItrfCoefficientsFile (nutation) ./files/planetary_coeff/NUTATION.DAT
Console Application Execution Failed: Moderator failed to initialize!
or
(4) You will see this message:
Enter a script file, q to quit, or an option: testprop.script
Moderator is creating core engine...
GmatBase Exception Thrown: MERCURY_POT_FILE not in the
gmat_startup_file
... <lots of text removed>
*** Mission run failed.
===> Total Run Time: 0.000000 seconds
========================================
Console Application Execution Failed: Moderator::RunMission failed
Here's what you should do for each:
(1) It worked! There is an output file in the bin/output folder named
rf.txt, containing ephemeris data generated by the script. Go to
Ratsies and have Buffalo Wings, your job here is done (for now)!
(2) This message indicates that the GMAT startup file
("gmat_startup_file.txt") is not in place. Copy it from the build/linux
folder into the bin folder.
(3) This message occurs if the data files GMAT uses for planetary
ephemerides and other properties are not in place. There are
instructions in the file "bin/bin_setup.txt" for downloading these files
and copying them into place.
(4) GMAT writes its output to a folder named output by default. (This
can be changed in the startup file, gmat_startup_file.txt.) Create a
directory named "output" in your gmat bin folder, and try again.
These are the failure cases I could think of -- let me know if you see
something different (assuming the console app built, of course!)
- Darrel
--
-----------------------------------------------------------------------------------------------------
GMAT Architectural Design, Linux Development and Test Team
Darrel J. Conway, Ph.D. Thinking Systems, Inc.
Senior Scientist and CEO 6441 N Camino Libby
Phone: (623) 298-4530 Tucson, AZ 85718
FAX: (520) 232-2533 www.thinksysinc.com
djc_at_thinksysinc_dot_com
-----------------------------------------------------------------------------------------------------
|