Commit Graph

150 Commits

Author SHA1 Message Date
John M. Penn
9b652d0a11 Back out free of attributes in assignment production. refs #154 2016-03-07 12:32:16 -06:00
John M. Penn
ec37898fb1 Fix memory leaks in CheckpointAgent input parser. refs #154 2016-03-03 17:38:41 -06:00
Alex Lin
7d5e501012 Add option to validate pointer addresses in variable server clients
Added an option on the settings panel in TV to toggle validating
addresses.  Removed the now deprecated resolve_bad_refs button.

refs #193
2016-02-25 11:11:02 -06:00
Alex Lin
3abf0b31c4 Add option to validate pointer addresses in variable server clients
Forgot I left the validate_address on for testing.  Turned if off now.

refs #193
2016-02-25 10:09:49 -06:00
Alex Lin
51715a0650 trick-sniffer calls trick-simcontrol by old name
Changed the system call to use the new name.

refs #194
2016-02-25 09:02:23 -06:00
Alex Lin
543bbc0585 Add option to validate pointer addresses in variable server clients
Added a flag called validate_address to each variable server thread.  When
activated each pointer address will be tested to see if it is in memory
the memory manager is tracking.  If it is then everything proceeds normally.
If it does not, then an error return value is returned for the value of this
variable.

refs #193
2016-02-25 08:56:04 -06:00
Alex Lin
2c5a46a8bc Trick::MemoryManager::add_attr_info improperly removes the const keyword
Changed the search from "const" to "const " because we're intersted in
removing the const keyword preceding a type name.

refs #184
2016-02-22 09:52:28 -06:00
Derek Bankieris
912778423b Fix Sniffer to use the new binary names, which are prepended with trick- 2016-02-22 09:42:22 -06:00
Alex Lin
39868aba46 Functions with enumerated default arguments cause bad python code to be generated
OK, all the previous checkins were the wrong way to fix this issue.  The SWIG
compactdefaultargs feature and the shadow feature clash for our DRBinary class.
I turn off compactdefaultargs for the DRBinary class, leaving it on for
everything else.

refs #176
2016-02-18 11:04:07 -06:00
Alex Lin
4ab940a691 Revert "Functions with enumerated default arguments cause bad python code to be generated"
This reverts commit 30fbd682ee.
2016-02-18 10:59:36 -06:00
Alex Lin
30fbd682ee Functions with enumerated default arguments cause bad python code to be generated
Found a lot more data recording groups that have the same problem.

refs #176
2016-02-18 10:21:12 -06:00
Alex Lin
83572b20cb Print some timing statistics when the sim exits
Saved the timestamps on the default gettimeofday clock as close to
the beginning of the simulation, after initialization is finished and
at the end of shutdown.  Printed out the elapsed time as well as
the number of overruns counted by RealtimeSync.

refs #183
2016-02-17 16:27:37 -06:00
Alex Lin
b4f0906e03 Merge in the er7_utils integrators
Added .gitignore for created makefiles in er7_utils.

refs #180
2016-02-11 14:13:25 -06:00
Alex Lin
6eef449a1c Don't process header files installed by Homebrew
Added /usr/local/Cellar to ICG's list of system header locations.

refs #181
2016-02-11 09:33:53 -06:00
Alex Lin
8a535cc44f Merge in the er7_utils integrators
Wasn't supposed to add the CheckpointHelper.

refs #180
2016-02-10 11:21:54 -06:00
Alex Lin
4c3015851f Merge in the er7_utils integrators
Taking in the latest er7_utils directory and adding it into Trick in the
same location it was as an external repository.  Made one change to
the files_to_ICG.hh file in the repository to remove the CheckpointHelper
header files.  Those go in the Trick files_to_ICG.hh file.

refs #180
2016-02-10 09:32:53 -06:00
Alex Lin
6461b50d7d Setting framelog sample size does not work.
Setting the frame log size only resized the time line graph, not the normal
frame log groups.  Added code to change the size of the normal frame log
groups in addition to the time line.

refs #177
2016-02-04 16:13:05 -06:00
Alex Lin
447585ad16 ICG processing files it is supposed to skip
We pull file names out of the clang infrastructure to match where
classes are defined.  We use the file name to pull comments and find
and process Trick header comments.  Up to now clang gave us the realpath
of files and when we looked up comments we already had the realpath and
everything worked.  In clang 3.6 in some places we are not getting the
realpath anymore which confuses ICG.  Added code to get the realpath of
any file name we use throughout the code.

refs #167
2016-02-04 15:43:14 -06:00
Alex Lin
71dab9ed45 Introduce Open Dynamics Engine examples
I want Trick to parse and understand ODE header files.  The ODE header files
include some typedef constructs ICG was skipping.  Added code to handle the
typedefs we did not handle before.  Also made a small change the way
TRICK_ICG_EXCLDUE and TRICK_EXCLUDE are used so that they support excluding
individual files as well as directories.
2016-01-29 09:27:41 -06:00
Alex Lin
692d962b90 Sending the variable server a variable name that lists a composite type causes core dump
Duplicating change from 15.1.1.
If a variable resolves to a class/structure type the variable server tries to free the
attributes associated with that variable name.  But the attributes usually point to
a fixed place in memory that is not allocated.  I removed the free statement.  I don't
believe this will lead to a memory leak.

refs #165
2016-01-26 16:02:15 -06:00
Alex Lin
a8c8c49f0d Stripchart does not start with input file
Found that the stripchart calls itself when reading variables
from an input file.  The command to call itself was using the old
executable name trick_stripchart instead of the new trick-stripchart.

refs #166
2016-01-20 16:50:23 -06:00
Alex Lin
7e542440d1 Add a time variable in seconds to the variable server
Added a time variable that is in seconds.  A created a special case
for var_add if you add "time" then this variable will be added to
the list of variables returned.

trick.var_add("time")

refs #151
2016-01-14 10:49:27 -06:00
Alex Lin
903ff05960 data record buffering optimizations
Added a loop to set each 1024th byte in the recording array to 1 once the
memory has been allocated.  Need to test if this is good enough to get Linux
to allocate the memory.

Added a current recording buffer pointer to use instead of using array offsets.
This should be more cpu cache efficient.

Changed the memcpy calls to direct casted integer assignments based on the size of the
parameter.  If the parameter is not size 1,2,4,or 8 we fall back to a memcpy.

refs #155
2016-01-14 08:31:13 -06:00
Alex Lin
a08b313457 configure script does not check for clang/llvm
Use the clang executable we find in the configure script for building ICG.

refs #130
2016-01-13 09:22:46 -06:00
Alex Lin
ce1962b55d make doxygen broken
Updated the directory names in the doxygen files to match the new directory locations
of our source code files.  The documentation builds now.  But we still need to
remove the duplicate documentation that is now in the wiki, because the wiki is
more up to date.

refs #158
2016-01-13 09:18:09 -06:00
Alex Lin
87a48b36f5 make javadoc broken
The makefile rule javadoc was misnamed docs in trick_source/java/makefile. I fixed hundreds
of warnings and errors that were present when creating the java docs.

refs #159
2016-01-12 16:39:47 -06:00
Alex Lin
ff39984568 Input processor crashes if second event with same name is created
When allocating a new event, if the same name is used, no allocation is
created and NULL is returned.  We start trying to use the returned value
which seg-faulted.  I added a check to only continue if the returned value
from the allocation is not NULL.

refs #149
2015-12-02 10:44:27 -06:00
Alex Lin
1afac18399 Add additional thread synchronization mechanisms
Created a thread trigger container class to hold all of the various thread triggering
mechanisms.  I wanted to avoid allocating/freeing trigger mechanisms.  I added
an eventfd and futex trigger types.  Updated SIM_threads_simple test sim to use
show how to set the thread trigger type.

refs #148
2015-12-02 10:35:25 -06:00
Alex Lin
519cdaf7f1 Unit tests failing on the Mac.
Added the library directory /usr/X11/lib to the search path when
compiling the DPX test directory.

refs #144
2015-11-19 14:41:18 -06:00
Alex Lin
ca51142553 Configure script does not set up GSL correctly
The configure script does not set up the defines for GSL correctly which causes our GSL
support code not to compile correctly. Fixed it.

refs #143
2015-11-18 08:30:21 -06:00
Derek Bankieris
aedd6b2be3 I'm not sure why we're padding floats and doubles in vs_format_ascii. It results in sending a bunch of useless spaces which hurts efficiency. Values are already tab-delimited, so fixed-width fields are unnecessary. We're not padding anything else, so don't pad these! 2015-11-17 14:18:59 -06:00
Derek Bankieris
2f5c219f98 Add file name to error messages about invalid @trick_parse argument. 2015-10-21 11:23:02 -05:00
Alex Lin
161e6fa23e Save X11 include and library information from configure
Temporary hardcoded patch to get data products to build under
El Capitan.

refs #133
2015-10-02 08:41:47 -05:00
John M. Penn
fcb419d534 Add demonstration of getting units from MemoryManager::ref_attributes(). Fixes #132 2015-09-30 17:30:51 -05:00
Alex Lin
952b899093 ICG doesn't handle inherited template classes correctly
When a template is in a namespace the type that is marked for the node containing
the full definition of the type is elaborated.  We need to go into
the elaborated name and get the underlying type.  Added code to do this
and tests to see if the type we are checking is itself a template or the
elaborated type is a template.  Sorry, this probably only makes sense to me.

refs #124
2015-09-18 13:18:05 -05:00
Alex Lin
57c76041f5 Get the value of a variable not parsed by SWIG in python
Wrote a python routine called get_value_by_ref_name that takes
a variable name string as an argument.  The string is passed to
ref_attributes to find the address and returns a REF2 structure.  The REF2
structure is passed to ref_to_value and the type and value of the variable
is returned in a structure.  We call vval_<type> to extract the raw value
from the structure and return that to python space.

Made a couple of other bug fixes in the FieldVisior and cpp input file
example found while investigating this issue.

refs #123
2015-09-18 09:03:24 -05:00
Alex Lin
7523c7b36c gxplot depends on Motif
Removed all motif dependencies.  I removed the motif based table renderer that
is duplicated here in gxplot.  The same table renderer is in fxplot with one
main difference, the one in fxplot actually renders tables, this one was not
working.  Also removed an error message dialog box that depended on
motif, replacing them with std::cerr calls. Removed -lXm when linking gxplot

refs #121
2015-09-17 16:58:29 -05:00
Alex Lin
80b8f99723 MTV/variable server crashes if checkpoint has less malfunctions then currently running sim
Added a case statement for the bad ref type to the binary data handler.  We handle a bad
ref as an integer, because that is what the sim sends us.  This fixes MTV.

refs #117
2015-09-14 15:11:20 -05:00
Derek Bankieris
c11f04644c refs #118
Removed unused VarClient.java.
2015-09-14 14:30:24 -05:00
Alex Lin
e58ba61d8e MTV/variable server crashes if checkpoint has less malfunctions then currently running sim
Did two things to stop the crash.  1.  When following an address path if we hit a NULL
address, stop processing and return the NULL.  2.  When trying to resolve addresses in
copy_sim_data, if a NULL address is returned then reset the reference to unresolved and
return a dummy value.

Need to fix MTV to handle dummy value returns.

refs #117
2015-09-14 11:33:11 -05:00
Alex Lin
94a99fb9ea Support new Trick comment tags
Changed parenthesis to curly brace... er I mean curly bracket.  Well too late, in
the code I called it curly brace. It's these "{}". Oh well.  Also found that the
dependency_only headers were not actually reading the dependencies.  Added the list
of dependency only files to the list of files to get dependencies from.

refs #114
2015-09-14 11:26:09 -05:00
Alex Lin
9b381f2edc Support new Trick comment tags
Added new doxygen style tags for truning on/off Trick attributes processing,
comment processing, and library dependencies.  Here are the tags we recognize

(@|\)trick_parse(everything|attributes|dependencies_only)
(@|\)trick_exclude_typename(class_name)
(@|\)trick_link_dependency(link_name)

refs #114
2015-09-10 14:50:22 -05:00
John M. Penn
f3ee79374b Delete obsolete .d files in the trick_models directory. 2015-08-31 19:24:56 -05:00
Alex Lin
80fb82e9f6 Add methods in base SimObject to turn whole sim object on/off.
Added enable/disable methods to the SimObject base class.  Used
enable/disable to be consistent with the JobData class that already
had these defined.

fixes #103
2015-08-05 15:17:32 -05:00
Alex Lin
119e7908d3 JITInput files not working
Added TRICK_SYSTEM_CXXFLAGS and TRICK_SYSTEM_CFLAGS to the gte list of
variables stored in a simulation.  These variables are used to
compile JIT input files.

refs #104
2015-08-05 14:15:39 -05:00
Alex Lin
e692b81fdb Setting initial sim time causes lockup
Found two issues.  First is that the next call times for
all of the jobs was not calculated correctly.  Second is
that the if the user wants to sync the sim to a real time
clock interval, the initial sync to the real time clock was pausing
the full starting sim time instead of syncing to the clock
interval.

refs #99
2015-08-04 16:36:19 -05:00
John M. Penn
5778add741 Ref #96 : Fix to many args warning. 2015-08-04 16:26:28 -05:00
John M. Penn
36cf0a72db Fixes #96 by adding space delimiters between values. 2015-08-04 15:51:47 -05:00
John M. Penn
c680c974f6 Refs #44 : Set precision to 15 for MonteVarFixed 2015-08-04 15:46:44 -05:00
John M. Penn
f2ca099baf Fixes #44: Changed the MonteRun values that are used and that are recorded to be the same precision. Also increased the precision from 10 to 15 significant digits. 2015-07-29 16:56:23 -05:00