Commit Graph

51 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
cbf61a105f Fix #64: Fixed the call to register_group_with_mm in DRHDF5 constructor. 2015-10-06 11:17:01 -05:00
Alex Lin
4f23b67f65 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-10-06 11:16:37 -05:00
John M. Penn
899b0d3efe Merge branch 'master' of https://github.com/nasa/Trick 2015-05-15 10:41:36 -05:00
John M. Penn
bc9746db6c Fix #55: Fix problem in stringstream declaration 2015-05-15 10:41:08 -05:00
Alex Lin
24fe5adaec JITEvents are not checkpointable
Changed the way JITEvents are created and handled. Instead of taking a function pointer directly we save a name of a function to the JITEvent class.  The class will dynamically look up a function that matches the name both during event creation and during checkpoint restart.

Fixes #53
2015-05-14 13:41:17 -05:00
John M. Penn
eb46419951 Fix #55 : Use stringsstreams to build paths rather than a fixed size char array. 2015-05-12 18:00:49 -05:00
Alex Lin
24a081a32b Event messages not printing
After further discussion, it was revealed that the event printouts would stop
coming out if a new event was created.  Found that the constructor of the
event was clearing out the static info_msg flag all events used to test
for printing.  Removed the assignment in the constructor and set the
initial value of the info_msg flag to false at the declaration point.

Fixes #38
2015-04-06 08:19:16 -05:00
John M. Penn
c1619156a9 Fixed the way that Trick::MemoryManager::ref_dim() calculates the sizes of elements in an unconstrained array. Fixes #37. 2015-03-30 17:36:54 -05:00
Alex Lin
7544d9cca7 Remove overloaded fields in Integrator/trick_algorithms/ABM_Integrator.hh
Removed the overloaded fields.

Fixes #33
2015-03-26 08:04:17 -05:00
John M. Penn
8536208822 Removed erroneous stringstream declaration, which compiled on MacOSX but failed on Linux. 2015-03-25 15:47:36 -05:00
John M. Penn
f5334e07d7 Merge branch 'devel'
to fix issue #25.
2015-03-25 12:06:15 -05:00
John M. Penn
08be591e32 Replace message_publish calls with MemoryManager specific calls. fixes #25 2015-03-25 12:05:25 -05:00
Alex Lin
c5456fab2a Variable Server fails to establish listen port on restart under a specific circumstance.
Added a test in the variable server listen restart job to see if the the name of the
machine in the checkpoint file matches the machine that we are running on.  We
test all of the network names avaiable on the machine.  If the name is not found then
we assume that the checkpoint was taken on another machine and wipe out the machine
name.  This will default the machine name back to localhost.

Fixes #24.
2015-03-24 15:16:35 -05:00
John M. Penn
e2be23c269 Add emitMessage, emitError, and emitWarning member functions to MemoryMananger 2015-03-23 17:21:35 -05:00
Alex Lin
306dee18a3 Clean up once include variables
Missed a couple of files where message_publish is in an ifdef __APPLE__
section.  But I decided to put message_type.h back in message_proto.h
because taking it out would affect a lot of user code.

Adds to #14.
2015-03-23 17:01:40 -05:00
Alex Lin
14a75508a3 Cleaning up once include variables and copyright cleanup.
Changed all header file once include variables to follow the same naming
convention and not start with any underscores.  Also deleted old
incorrect copyright notices.  Also removed $Id: tags from all files.

Fixes #14.  Fixes #22.
2015-03-23 16:03:14 -05:00
Derek Bankieris
678cc4b877 Corrected erroneous prototype. 2015-03-17 13:45:42 -05:00
Alex Lin
d798792544 Removed protect_ip_hang.
This is obsolete code as we don't support RedHat 5 anymore. Removed
the ifdef check and conditional code.

Fixes #18
2015-03-11 08:42:42 -05:00
Alex Lin
2d5370100b Merge pull request #1 from excaliburtb/master
Added SWIG processing for IPPythonEvent class. Should fix current event ...
2015-03-02 12:56:34 -06:00
Alex Lin
87741062e0 Getting standalone to compile. Fixes #2 2015-03-02 12:48:17 -06:00
Thomas Brain
f15d324d40 Added SWIG processing for IPPythonEvent class. Should fix current event restart problem. 2015-03-02 10:11:45 -06:00