Commit Graph

100 Commits

Author SHA1 Message Date
Alex Lin
9604e019bf ICG not setting default checkpointing io correctly. #308
If a checkpoint_io field is found we were or'ing this in to bits already
set by default.  Clear the bits first.
2016-09-14 09:33:08 -05:00
Alex Lin
6dc3d85cd3 ICG not setting default checkpointing io correctly. #308
Changed the default io value from 3 which left out checkpointing to 15 which does
include checkpointing.
2016-09-13 16:33:24 -05:00
Alex Lin
122033701b unintended performance issue with integ_loop at end of scheduled job classes #243
Previous commit did not update the job complete flags correctly.  Brought the fix
back from 17 to 15.
2016-08-30 13:08:01 -05:00
Alex Lin
0b91b1b163 tc_init is not thread-safe #289
Made the global sockaddr variables local and cleared them with a memset.
2016-08-29 13:10:10 -05:00
Alex Lin
60b09907a3 Move the loop that waits for scheduled threads to finish out of advance_sim_time #292
Same error as in 17. When we moved the thread sync code, a loop to clear all job
complete flags was left out causing unit test errors.
2016-08-29 10:11:05 -05:00
Alex Lin
2a113d1925 Unintended performance issue with integ_loop at end of scheduled job classes #243
Created a new executive job that waits for threads to finish and readies them
for their next frame of execution.  Created a new job class system_thread_sync
after the top of frame jobs and before the input processor is run to sync the
threads.  Along the way cleaned up instrumentation jobs on the threads to fix #290.
2016-08-24 11:18:42 -05:00
Alex Lin
16af60313f Add a printout when ICG parses header file with no Trick header comment #281
Added the printout.
2016-08-19 10:21:43 -05:00
Alex Lin
79288d2b5b Data products not plotting the last recorded data point #162
Needed to save last point for comparison streams as well.
2016-08-04 08:37:27 -05:00
Alex Lin
11f4b5282e Data products not plotting the last recorded data point #162
porting fix from 16 back to 15.
2016-08-03 17:08:15 -05:00
Alex Lin
4de4bf0692 Monte carlo AttributeError's caused by bad configuration still returns zero in master sim #269
If there were bad runs, the master will now exit with a non-zero status.
2016-08-03 15:01:43 -05:00
Alex Lin
bd37006244 CheckPointAgent.cpp has a noted memory leak (confirmed) and proposed optimization #232
Changed the vector to use instances of the VarNameElement instances.  Memory leak is gone.
2016-07-28 13:11:59 -05:00
Alex Lin
86b5158e84 Monte carlo AttributeError's caused by bad configuration still returns zero in master sim #269
The return code from parsing the monte carlo input was always set to zero and not checked.
Retured the return code from parsing the input. Added an exit if the input was not parsed
correctly.
2016-07-26 13:34:59 -05:00
Alex Lin
2784232457 Some Trick jobs are labeled "simobject.classPtr->Foo()" trick_dp barfs on the "->" string
Backporting fix that does not split string on '-' character if it is part of "->" string.

refs #51
2016-06-30 15:40:10 -05:00
Alex Lin
bb3a788c5f ICG still processing comments in files it is supposed to skip, one more time
Tested the name of the header file right when a class is starting processing.  If
the class is in a file that is in an ICG_EXCLUDE directory, we quit processing
right there.

refs #251
2016-06-15 17:41:39 -05:00
Alex Lin
4a54ff169b Need to include SimTime.hh for ICG and swig processing.
Added the sim time header files to files_to_ICG.hh and sim_services.i so it will be processed.

refs #247
2016-06-15 16:58:57 -05:00
Alex Lin
9d840f334f Symbolic links are my nemesis
Found 2 more places where we should be using the absolute path.

refs #240
2016-05-24 13:30:56 -05:00
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
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
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
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
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
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