Commit Graph

137 Commits

Author SHA1 Message Date
Alex Lin
15f677ec48 ICG still processing files it shouldn't
In comment handling we were not using the absolute path where we should
have been.  This was tagging comments coming from the wrong file.

refs #238
2016-05-18 17:04:35 -05:00
Alex Lin
de6c28d36d Use udunits package for units conversions
To support backwards compatibility with measurement units I added the udunit symbol
names that we don't use into 13/15.  This includes "rad" instead of "r" and
"degree" instead of "d".

refs #231
2016-05-11 15:53:50 -05:00
Alex Lin
34e135ed61 configure needs to properly enforce java version dependency
Changed the minimum java version from 1.6 to 1.8 in the configure script.

refs #234
2016-05-11 10:12:50 -05:00
Alex Lin
9b68fa9d9e Gaussian distribution set_sigma(0) produces strange monte carlo output directory, suspected gsl only
Found that when we hex pack numbers out of the random number generator we should zero pad
these numbers to 16 digits.  Otherwise if the resulting number is an odd number of digits we
get an error.  We already do this for file data.

refs #236
2016-05-11 10:07:02 -05:00
Alex Lin
5b27723501 Can't build trick 15.2.0 with --gsl=/usr
The _HAVE_GSL flag was not being passed into all compilation lines when
GSL was present.  Added them to to CFLAGS and CXXFLAGS so it is.

refs #235
2016-05-11 09:20:08 -05:00
Alex Lin
3f7676a740 Invoking trick-ICG without any arguments results in a Segmentation fault
ICG dies on a strdup if the the input file is empty.  Added a check for
an empty input file name.  We exit with an error message if there is
no input file given.

refs #229
2016-04-27 11:34:47 -05:00
Alex Lin
c4a5e8b310 Debugger command on mac is now lldb not gdb
Added a test to set the debugger command to gdb or lldb depending
on availability.  Created a new script for lldb to run.  Modified
the script for gdb to backtrace all threads.

refs #227
2016-04-20 14:23:16 -05:00
Alex Lin
c10d2897f9 Release 15.2.0
Backporting some changes in ICG that better supports clang/llvm installations in
Linux.

refs #228
2016-04-19 17:05:42 -05:00
Alex Lin
489737d34c Release 15.2.0
It's been a while since we tested 15.x on the mac.  The makefile
for ICG needed updating to what is essentially in 16.  Added the
one change required for clang 3.8.  Updated the version to 15.2.0
in trick_ver.txt.  Finally removed the check for libclang.a.  The
more recent clang releases are delivering libclang.dylib and I'm
too lazy to make big changes in the configure script to search
for it.  The header file check should be enough.

refs #228
2016-04-19 16:08:33 -05:00
Alex Lin
0bd8c2f09e trick comm byteswap functions can't handle sizes above 65536 bytes
Backporting fix that adds pthread specific swap buffer for both
tc_read and tc_write.

refs #187
2016-04-19 14:36:56 -05:00
Alex Lin
be5835f92f Variable server restart issues
Backporting addition to suspend accepting new variable server connections and
all communications to variable server clients for the duration of reloading
a checkpoint

refs #168
2016-04-19 14:24:25 -05:00
Alex Lin
f1a26615f1 Data products will not compile if TRICK_FORCE_32BIT is set.
The makefiles need to compile the units directory and they were
not at this time.  The units need to be compiled in the native
bit size regardless of whether we are forcing 32 bit or not.

refs #225
2016-04-18 09:59:52 -05:00
Alex Lin
56290d0306 Remove catches for non-Trick exceptions
Back-ported changes to not catch unknown exceptions and print a
stack trace to where the exception occurred.

refs #220
2016-04-15 16:10:53 -05:00
John M. Penn
5166946144 Fix address arithmetic in MemoryManager_ref_assignment.cpp and add unit test. refs #224 2016-04-15 15:56:52 -05:00
Alex Lin
a00b5dc847 echo_jobs and debug_pause are not working
Changed the sim_object names in echo_jobs and debug_pase from "instrumentation"
to "trick_instrumentation"

refs #223
2016-04-14 13:28:32 -05:00
John M. Penn
9012aaed2f Fix address arithmetic in ClassicCheckPointerAgent::write_rvalue. Refs #221
Conflicts:
	trick_source/sim_services/CheckPointAgent/ClassicCheckPointerAgent.cpp
2016-04-14 13:12:19 -05:00
Alex Lin
7a511fb236 15.2 will not compile under Centos 7 anymore
Copied the CXXFLAGS from 16 back to 15.

refs #222
2016-04-14 11:10:07 -05:00
Alex Lin
552f73d3a5 Math with temperature values is not as expected.
For addition and subtraction,  we created a new routine that
only scales second units to the first.  We apply it to all
conversions when adding and subtracting, but it only changes
the temperature results, because that is the only units that
has a bias factor. The comparision conversion routines were not
changed.

refs #202
2016-03-16 17:03:18 -05:00
Alex Lin
4ff8591b12 ATTRIBUTES for classes with non-locally typedef'd members is wrong
Interesting case.  I found that we should process the canonical type names where
we were not before.  This resolves all typedefs and should be be more
accurate in the future.  When we process the canonical type we need to ignore
the processing of the non-canonical type.  We set a flag after
the canonical type is processed to ignore any type that is processed after.

refs #198
2016-03-10 14:16:18 -06:00
Alex Lin
92558b81fa Add option to validate pointer addresses in variable server clients
Adding prototype for new var_validate_address function.

refs #193
2016-02-25 12:36:19 -06:00
Alex Lin
38b5c2092f 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

Conflicts:
	trick_source/java/src/trick/common/utils/VariableServerConnection.java
2016-02-25 12:33:49 -06:00
Alex Lin
6ef4517335 Add option to validate pointer addresses in variable server clients
Back ported validate_address fix from trunk.

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 10:08:07 -06:00
Alex Lin
352ec7d821 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:56:57 -06:00
Alex Lin
3b6adb01d0 Don't process header files installed by Homebrew
Added /usr/local/Cellar to ICG's list of system header locations.

refs #181
2016-02-22 09:43:31 -06:00
Alex Lin
2661835797 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

Conflicts:
	trick_source/codegen/Interface_Code_Gen/CommentSaver.cpp
	trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp
2016-02-18 14:06:47 -06:00
Alex Lin
49de908a30 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 13:43:09 -06:00
Alex Lin
c6614fff75 Functions with enumerated default arguments bad
After digging around the SWIG issues database I found a feature
compactdefaultargs that creates a call to functions with default
arguments like it did before.  The important part is that the
code runs.

refs #176
2016-02-18 13:43:07 -06:00
Alex Lin
f4950b736b 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-18 13:43:03 -06:00
Alex Lin
41c8637826 Merge in the er7_utils integrators
Added .gitignore for created makefiles in er7_utils.

refs #180
2016-02-18 13:43:00 -06:00
Alex Lin
1c5f682297 Merge in the er7_utils integrators
Wasn't supposed to add the CheckpointHelper.

refs #180
2016-02-18 13:42:56 -06:00
Alex Lin
2c794060f4 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

Conflicts:
	Makefile
	autoconf/configure.ac
	configure
	include/trick/files_to_ICG.hh
	share/trick/makefiles/Makefile.common
	share/trick/makefiles/config_user.mk.in
	trick_source/sim_services/Integrator/Makefile
	trick_source/trick_swig/Makefile
2016-02-18 13:39:16 -06:00
Alex Lin
a7cf791d58 Print some timing statistics when the sim exits
I failed at the cherry-pick merge, I didn't merge in the include files correctly.

refs #183
2016-02-18 13:06:10 -06:00
Alex Lin
347e102f40 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

Conflicts:
	trick_source/sim_services/RealtimeSync/src/RealtimeSync.cpp
2016-02-18 12:52:29 -06:00
Alex Lin
e714aecdb8 er7_utils rkn4 directory is not compiled
Yup, it's not.  No one notices we've left it out for a couple of
years now.  I've added the directory to the list of directories to compile.

refs #173
2016-01-29 10:17:04 -06:00
Alex Lin
f02078f0b0 typedef of const structures not understood by SWIG
I kind of took the easy way out on this one, I remove any
structure definitions that matches the pattern
typedef const struct A {...} constA ; out of out of
convert_swig before they get to SWIG.

refs #169
2016-01-26 15:19:06 -06:00
Alex Lin
d1f5bea580 Sending the variable server a variable name that lists a composite type causes core dump
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-19 15:06:32 -06:00
Alex Lin
e6ddb253fa Hole in makefile dependency list allows python files to be compiled before directory exists
Added a rule that lists the destination library directory as a dependency for all of the
linked python compiled files.

refs #164
2016-01-19 15:01:00 -06:00
Alex Lin
7fd79f9d56 Bug in pre-built library support
Moved the check to exclude directories in make_swig_makefile to after the
test to see if we should expect them.  This way we will write the code we are
expecting even though we will not be generating the code itself.

refs #163
2016-01-19 14:47:35 -06:00
Alex Lin
c14515908e 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-19 11:01:10 -06:00
Alex Lin
7781b0b3f3 Updating trick_ver.txt 2015-12-08 17:44:29 -06:00
Alex Lin
9af14cf45c Unit tests failing on the Mac
X library path needed to be updated when OS is 10.11 (El Capitan).

refs #144
2015-12-03 11:01:55 -06:00
Alex Lin
09c467e423 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-03 10:10:39 -06:00
Alex Lin
c3b886c6e5 Add additional thread synchronization mechanisms
file location different in 15 than it is in 16.  Modified include
files to accomodate.

refs #148
2015-12-03 08:53:47 -06:00
Alex Lin
014d78e388 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 17:09:14 -06:00
Alex Lin
03d89ef56a 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

Conflicts:
	trick_source/sim_services/Executive/include/Threads.hh
	trick_source/sim_services/Executive/src/Executive_set_thread_rt_semaphore.cpp
	trick_source/sim_services/Executive/src/Threads.cpp
2015-12-02 17:08:39 -06:00
Dan Jordan
5011fdd1eb Added optional var=value support for trick-CP as passthroughs to the
make system.
                             ***     ***
                           **   ** **   **
                          *       *       *
                          *   MAKE_out    *
                           *             *
                            **         **
                              **     **
                                ** **
       -------------------        *        --------------------
   ../                     \..         ../                     \..
  /                           \       /                           \
 |.,       __   _..._          \     /        ....     ___         |
 /  \     /  `-'     `-------...    ..--`````'    `--'    \.    ./` \
 |   \--_-               /    o ``X'  o    \                '--/    |
 |         ( ( ( ( (    /    \   /``\   /   \  ) ) ) ) )            |
 |   /---\                   ./|`    |`\.                  ..-..    |
 |  /     \-..-........-```/`./       \..`--.........-.  ./     `-./
  `'\                      /             \.            ``       /--
      \___________________/                \___________________/
2015-12-02 16:54:07 -06:00
Alex Lin
9792288e6c Revert "Fixes #68: Changed the path where TrickDPActionController expects to find jar files"
This reverts commit 2789727fc5.
2015-10-06 15:53:07 -05:00
Alex Lin
634f25bee3 GUIs using sie file die on Windows quotation marks
We already parse the string character by character escaping newlines, tabs, and
other special characters.  In the case of these quotation marks, we replace them
with the ASCII single and double quotes.

refs #134
2015-10-06 15:20:50 -05:00
Alex Lin
01a8294dd8 Merge branch '15.1.dev' of https://github.com/nasa/trick into 15.1.dev 2015-10-06 12:46:49 -05:00
John M. Penn
2789727fc5 Fixes #68: Changed the path where TrickDPActionController expects to find jar files 2015-10-06 11:18:16 -05:00