Commit Graph

80 Commits

Author SHA1 Message Date
Alex Lin
5368108723 Add direct STL checkpointing
Added queue and priority queue handling.

refs #206
2016-03-31 09:22:45 -05:00
Alex Lin
94febe62f2 Add direct STL checkpointing
Added the templates required for maps, multimaps, and pairs.

refs #206
2016-03-30 16:57:45 -05:00
Alex Lin
46aec08b80 Add direct STL checkpointing
Initial checkin of STL checkpointing.  This checkin only covers the sequential
STLs, vector, list, deque, set, and multiset.  This checkin does include the
changes in Trick header files to include/exclude our STLs properly to make a
restartable checkpoint.

refs #206
2016-03-29 09:26:49 -05:00
Alex Lin
26dfb3a000 Move the lock_memory function out of the Executive to RealtimeSync
Moved the lock memory function to the real time sync directory.  It doesn't need
to be part of the RealTimeSync class either so I left the lock/unlock code
in the C language calls for real time functions.

refs #195
2016-03-10 17:05:47 -06:00
John M. Penn
0f76eec7a1 Include stdlib.h in MemoryManager_ref_name.cpp. 2016-03-09 11:26:31 -06:00
John M. Penn
ced68e24b2 Keep track of and free the reference attr created by ref_var. Refs #154 2016-03-08 17:47:09 -06:00
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
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
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
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
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
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
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
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
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
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
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
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
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
Alex Lin
a2bc82f1e9 MemoryManager unit test needs -lpthread on Ubuntu
Added -lpthread to link line just because.

refs #91
2015-07-22 18:05:34 -05:00
Alex Lin
d72555f3cc Split CP up into components that can be called individually
After about 6 unsuccessful builds I decided to run the unit tests
before checking in these files.  I fixed the integrator unit
test that was failing from a previous issue along with problems
with the sims.

refs #86
2015-07-21 15:10:40 -05:00
Alex Lin
1bf08aeb55 Clock unit tests don't work on all platforms.
Clock unit tests don't work on virtual machine platforms.  I've
recommented them out until they can be reviewed.

refs #87
2015-07-21 14:45:19 -05:00
Alex Lin
13268aae32 Merge branch 'makeMaster' that splits up CP into several executable
components.
2015-07-21 09:58:15 -05:00
Alex Lin
e1c1bbaccf Split CP up into components that can be called individually
Initial rough checkin that partially works for the ball sim.

refs #86
2015-07-16 15:36:36 -05:00
John M. Penn
a5e7699d40 Fixes #81: Updated other Makefiles to get tests to link 2015-07-16 15:02:33 -05:00
John M. Penn
3a70ffb156 List libraries more than once to satisfy gcc linker 2015-07-15 17:29:10 -05:00
John M. Penn
619d60fff7 Fixes #81: Memory Manager tests still require libtrick.a to be linked in. 2015-07-08 14:37:17 -05:00
John M. Penn
5fb037aa00 Fixes #79: Get the Clock tests working 2015-07-01 18:21:56 -05:00
John M. Penn
63975d9f89 Fixes #78: Changed message about configure option for TPRO CTE card. 2015-07-01 18:10:53 -05:00
John M. Penn
5ecc7b2af0 Remove RELEASE call when rt_nap is set 2015-07-01 18:03:58 -05:00
John M. Penn
5d219d5e2e Fixes #76: Fixed shadowed ii index. 2015-07-01 13:16:34 -05:00
John M. Penn
03284bf97d Break the Memory Manager out of libtrick.a into libtrick_mm.a. 2015-06-30 17:57:26 -05:00
Alex Lin
cf3738d3fd Memory Manager tests trying to write io_src files in sim_services/include
Added 2 flags to trick-ICG. "-o" will specify an output directory.  Added this
option to the calls to trick-ICG for the Memory Manager tests.  Also added
a "-m" option to create the map files ICG creates for sims.  The memory manager
tests do not need these maps so we don't include the option.  Added the -m option
to the sim makefile and the master makefile so we do create the map when compile
Trick core and sims.

refs #72
2015-06-24 17:49:14 -05:00
Alex Lin
44736be398 Remove dupilcate stand-alone libraries
The test programs now need more than just -ltrick.

refs #71
2015-06-24 16:54:15 -05:00
Alex Lin
03979a2079 Memory manager test programs need libtrick_units.a
Added libtrick_units.a to the linking of memory manager test programs.

refs #71
2015-06-24 16:26:11 -05:00
Alex Lin
941eb5c1cc Remove duplicate stand-alone libraries
I changed trick comm so that there is only one version built, not a slightly different version
if you are in or out of a sim.  While I was in the trick comm code, I removed all of the
unnecessary system header file inclusions out of tc.h.   I modified each of the source files
to include the system files it requires.  Some sim_services files were including tc.h and
also had to be edited to add headers.  I removed the stand-alone makefiles out of all
of the trick_utils directories.  Finally I modified the master makefile to exclude the
trick_util directories comm, math, and units from being archived into libtrick.a.  Each of
those directories will create their own library and will be included when linking a Trick sim.

refs #71
2015-06-24 15:58:17 -05:00