Scott Fennell
d2e81257c2
#687 do not warn or convert unit --
2018-10-30 10:40:46 -05:00
Scott Fennell
e86027f825
revert scan-build changes, need further testing before merge
2018-10-22 15:11:29 -05:00
Scott Fennell
389e2837fc
add -std=c++11 to MonteCarlo
2018-10-22 11:40:55 -05:00
Scott Fennell
bc35e64406
Merge pull request #673 from nasa/#scan-build
...
#671 fix all non memory manager scan-build bugs.
2018-10-20 13:16:35 -05:00
Pappy Van Winkle
121fa84081
Use correct format specifiers.
...
Used http://www.cplusplus.com/reference/cstdio/printf/ as a reference.
2018-10-11 22:52:04 -05:00
Pappy Van Winkle
af2575da5b
Remove all unused variables (style warning).
2018-10-11 22:05:50 -05:00
Scott Fennell
5b63559312
fix error message syntax errors
2018-10-03 15:31:22 -05:00
Scott Fennell
53886fb54d
add else block for code clarity and to aid static analysis JITInputFile.cpp
2018-10-03 10:49:11 -05:00
Scott Fennell
8f20710761
replace garbage value on enum error PythonPrint.cpp
2018-10-03 10:45:15 -05:00
Scott Fennell
d1957c650b
handle garbage values/invalid input ClassicCheckPointAgent
2018-10-03 10:34:11 -05:00
Scott Fennell
e4dcd42b2b
fix unreachable code MonteVarFile.cpp
2018-10-01 16:22:27 -05:00
Scott Fennell
28863c58a6
remove memory leaks and garbage return values TrickBinary.cpp
2018-10-01 15:55:04 -05:00
Scott Fennell
605f5d0f6d
remove dead assignment DataRecordGroup.cpp
2018-10-01 14:16:19 -05:00
Scott Fennell
0b2218e449
remove dead assignment IPPython.cpp
2018-10-01 13:55:02 -05:00
Scott Fennell
424043b146
remove 'delete this' double delete in JSONVariableServerThread destructor
2018-10-01 13:33:51 -05:00
Scott Fennell
2cdd4bf380
free memory leaks MonteVarFile.cpp
2018-10-01 13:24:37 -05:00
Scott Fennell
7b3b47aa39
init value and style change VariableServerListenThread.cpp
2018-10-01 10:26:17 -05:00
Scott Fennell
2c43321076
remove dead assignments VariableServerThread_loop
2018-10-01 10:13:39 -05:00
Scott Fennell
53f3b308f5
Merge branch 'master' of https://github.com/nasa/trick
2018-09-25 10:41:35 -05:00
Scott Fennell
77e0e73b3f
various static analyser bug fixes
2018-09-25 10:41:14 -05:00
jmpenn
fccf32093b
Explicitly specify void arg for C functions that take no arguments. ( #670 )
...
* Clock empty args to void
* command_line func empty args to void
* DataRecord func empty args to void
* debug_pause func empty args to void
* echojobs func empty args to void
* ExternalApplication func empty args to void
* FrameLog func empty args to void
* MasterSlave func empty args to void
* MonteCarlo func empty args to void
* outdllist func proto empty args to void
* sie func empty args to void
* SimTime func empty args to void
* UnitTest func empty args to void
* var_server func empty args to void
* wcs func empty args to void
2018-09-19 11:25:04 -05:00
jmpenn
7b694931ef
Warning fixes ( #658 )
...
* Suppress expected, benign warnings from Bison and Flex generated code.
* Trick::MessageThreadedCout::thread_body should return NULL.
2018-08-16 16:02:11 -05:00
John M. Penn
3ff8fc6bc0
Fix enums in MonteCarlo_test.cpp. REF #650
2018-08-08 14:36:10 -05:00
jmpenn
84f67ef79f
Update all enums in MonteCarlo with prefixes, so as to not conflict with other enums. ( #650 )
2018-07-25 13:05:10 -05:00
Scott Fennell
a0eaf5b794
#624 Remove invalid delete in empty rec_buffer, checkpoint load no longer crashes.
2018-07-09 09:23:28 -05:00
Derek Bankieris
ed5a5426b1
Revert "Infer TRICK_HOME automatically"
...
This reverts commit 6e18294100
.
Refs #637
2018-06-22 08:12:38 -05:00
Derek Bankieris
6e18294100
Infer TRICK_HOME automatically
...
Refs #358
2018-06-21 11:40:40 -05:00
jmpenn
882b568b86
Fix enums in MonteCarlo ExitStatus to less susceptible to conflict wi… ( #628 )
...
* Fix enums in MonteCarlo ExitStatus to less susceptible to conflict with other code. ref #609
* Add MC_ prefix to ExitStatus enums. Ref #609
2018-06-05 15:10:08 -05:00
Alex Lin
a8314b1497
Merge pull request #615 from nasa/framelog_fix
...
#588 top_of_frame and _end_of_frame fix for scheduled threads
2018-05-16 09:16:36 -05:00
Alex Lin
bf1ab16793
Merge pull request #617 from iamthad/pr_set_ptracer
...
Fix debugger attach when ptrace is restricted
2018-05-16 09:16:14 -05:00
Alex Lin
1e783fb49c
When we are copying recorded data into a buffer we use a pointer to track the
...
buffer position. This pointer wasn't used in DR_Changes_Step and was corrupting
the pointer initialization later in the write function.
2018-05-16 09:08:39 -05:00
anon
0212ed1650
#588 top_of_frame and _end_of_frame for child threads
2018-05-11 09:49:17 -05:00
Thadeus Fleming
54fe22684a
Fix debugger attach when ptrace is restricted
...
Trick's backtrace or attach functionality fails on systems like Ubuntu
where the use of ptrace(2) is restricted. Where it is defined, use the
PR_SET_PTRACER prctl with the argument PR_SET_PTRACER_ANY to allow any
process to attach.
2018-05-10 07:19:30 -05:00
Alex Lin
2db059679b
Merge pull request #590 from abrogley/unit-test-return-code
...
Unit test exit code
2018-04-12 08:47:44 -05:00
jmpenn
9d7ba05c76
Implement Event condition and action lists as array of ptrs to objects rather than contiguous arrays. ref #587 ( #597 )
2018-04-10 17:17:21 -05:00
John M. Penn
ad05aad2d2
Merge branch 'master' into Issue595
2018-04-10 16:07:46 -05:00
Scott Fennell
af6727408c
Limit log file size ( #594 )
...
* #585 create new method to set max file size for DataRecordGroups. Needs testing and DRD interface function
* #585 dre implementation and other improvements, needs more work
* #585 update dre, add intf for drd max size functions. Still requires better comments, wiki updates, some refactoring, and testing
* #585 refactor trick-dre
* format trick-dre
* improve readability of dre output for set_max_file_size
2018-04-10 16:02:44 -05:00
John M. Penn
adf4482135
Update MemoryManager::delete_var to just issue a warning message when debug_level > 0. ref #595
2018-04-10 15:34:06 -05:00
John M. Penn
f3be6c9ec0
Add a Memory Manager Test and a MM input parser error msg fix. Ref #587
2018-04-06 15:18:33 -05:00
Aaron Brogley
0d7a082b2f
Adding Trick Unit Test return code functionality.
2018-03-28 10:09:22 -05:00
Scott Fennell
f6fa9cdf3e
#506 added additional check on run directory to prevent creation as defaul… ( #566 )
...
* added additional check on run directory to prevent creation as default output directory
* #506 edited error messages to include strerror
2018-03-14 15:18:37 -05:00
Derek Bankieris
37b1e02455
Replace perror with strerror
...
Instead of printing the numeric value of errno, how about we do
something helpful?
2018-03-08 14:50:13 -06:00
Derek Bankieris
1179007fa1
Infer TRICK_HOME automatically
...
Refs #358
2018-03-08 14:44:36 -06:00
Derek Bankieris
2ce53dadd2
Move pymods into share/trick
...
Fixes #574
2018-03-05 15:17:22 -06:00
Alex Lin
d97f482219
Allow the FrameLog class to use a different clock #571
...
Added a clock reference that to the FrameLog class that defaults
to the GetTimeOfDay clock. This clock has fast access and is
non intrusive to real-time operations using a different clock.
Added a function to set the clock to something else if desired.
2018-02-28 17:33:09 -06:00
Derek Bankieris
27bf0b030b
Dequeue timed-out runs if the slave later returns
...
Fixes #569
2018-02-28 14:13:05 -06:00
Derek Bankieris
8bdcd28631
Don't use TRICK_HOST_CPU in MonteCarlo SHH command
...
Fixes #564
2018-02-27 09:38:12 -06:00
Alex Lin
0936cee67e
Separate verbosity levels for Monte Carlo dispatches and parametrizations #548
...
Changed verbosity check from INFORMATIONAL to ALL as requested.
2018-02-20 09:56:14 -06:00
Alex Lin
15bfd75b32
Don't resize active event array size with every operation #562
...
Started the active event allocation at 100 events. If more are needed, we
add 100 allocations each time. The array is never reduced in size if
events are deleted, events are moved to the front of the array and the
remaining elements are set to NULL.
2018-02-14 17:28:21 -06:00
Alex Lin
bc8d1a3796
The total overruns printout at sim exit prints the wrong parameter. #560
...
Changed the printout to print the total number of overruns.
2018-02-08 16:18:11 -06:00
Pappy Van Winkle
d7e8d48a8a
Creating additional C-interface routines for UnitTest. #511
2018-02-03 19:56:08 -06:00
Alex Lin
8f76605f3b
Create Message client that writes to screen on a separate thread #553
...
Created a new message class that will copy incoming messages to a
buffer area. The buffer area is pre allocated during simulation
initialization. On a separate thread the buffer area is written
to std::cout.
2018-01-25 15:59:19 -06:00
Alex Lin
c4b872c26e
Don't start or wait for disabled threads in the executive #549
...
Added check to see if thread is enabled when starting it and waiting
for it to finish. If it is disabled, skip it.
2018-01-23 09:37:02 -06:00
Alex Lin
12c7dbd4cf
Trick's new variable server address is hard to debug if you don't know it changed #546
...
Created a second multicast socket to broadcast the sims variable server information
on the old address.
2018-01-19 16:49:08 -06:00
Alex Lin
d4ffa4002b
Add NULL pointer check to remove_event. #545
...
Added the NULL pointer check and return immediately if the pointer is NULL.
2018-01-18 13:23:38 -06:00
Nick Kapliev
c8619dbea7
Fixed MonteCarlo EOF problem. #459 ( #531 )
...
* Added tests for MonteCarlo varfile eof line problem
* Remove redundant variables in MonteCarlo varfile test
* Fixed MonteCarlo varfile eof line problem. #459
2017-12-13 12:01:31 -06:00
Christopher LaChance
6184aa6cd9
Some unit test warnings addressed. ( #515 )
...
* Removed purple warnings from unit test compilation.
* "Fixed const corectness bug. Added more warning fixes."
* Fixed warning issue.
* Removed null checking and (char*) casting.
* Changed sizeof parameter to variable from data structure.
2017-11-29 15:35:16 -06:00
Christopher LaChance
0e772525c7
Fixed the MC 'file failed to open' error.
2017-11-22 12:51:34 -06:00
Christopher LaChance
21e3804638
Removed outdated MonteVarFile exception unit test.
2017-11-02 11:40:28 -05:00
Christopher LaChance
5ea826c67b
Modified unit test to account for new logic.
2017-11-01 09:00:59 -05:00
Christopher LaChance
a68ea46f14
Fixed issue with open file being reopened.
2017-10-31 13:56:04 -05:00
Christopher LaChance
cf75a15be8
Removed redundant checks and this-> keywords.
2017-10-31 13:17:14 -05:00
Christopher LaChance
0dbdc2d7b9
Changed streampos comparison from NULL to 0.
2017-10-31 10:02:10 -05:00
Christopher LaChance
0a90c11541
Implemented a fix for multiple concurrent file handles.
2017-10-27 14:35:54 -05:00
Alex Lin
6271283c31
Revert Trick::Clock::clock_spin shouldn't call RELEASE() #489
...
Added a stub exec_get_rt_nap function in the test directory that
always returns false. That is the cleanest way to satisfy the
call for the unit tests.
2017-10-20 15:03:31 -05:00
Christopher LaChance
c8f916e818
Merge pull request #488 from nasa/NonNumericValues
...
Non-numerical values can now be used in Monte Carlo data files.
2017-10-17 08:40:29 -05:00
Christopher LaChance
db4e0dd024
Returned brace style to K&R at John's behest.
2017-10-16 14:03:48 -05:00
Christopher LaChance
f81d7b0c16
Swapped line read in to std::getline().
2017-10-16 12:56:45 -05:00
Alex Lin
56ddfab6a5
Revert Trick::Clock::clock_spin shouldn't call RELEASE() #489
...
Reverting change, adding back RELEASE call in clock_spin loop.
2017-10-16 10:39:31 -05:00
Christopher LaChance
ebe4174b5c
Converted data file traversal from strtold to strtok.
2017-10-12 10:00:54 -05:00
Christopher LaChance
24894ea08a
Merge pull request #487 from nasa/VariableInformation
...
Added additional variable information to the Monte_Runs data file.
2017-10-11 09:48:42 -05:00
Christopher LaChance
1efedefdf7
Added additional variable information to the Monte_Runs data file.
2017-10-10 11:12:33 -05:00
Alex Lin
8aa8f31e3d
Frame logging for child threads not working. #484
...
Prepended "trick_" to the frame scheduled time variable name.
2017-10-06 10:22:38 -05:00
John M. Penn
db2f00cc4e
Changed 'git' to 'trick-gte'. Ref #475
2017-09-13 14:46:28 -05:00
Thadeus Fleming
bf2759c5c0
Remove deprecated dynamic exception specifiers.
...
Resolves #461
2017-07-28 20:49:42 -05:00
John M. Penn
841473583c
Updated var server multicast address to 239.3.14.15. Ref #452
2017-07-05 16:40:22 -05:00
John M. Penn
d0b9cda9f2
Fixed variable server debug messages. Ref #447
2017-06-26 17:50:54 -05:00
Christopher LaChance
345971e31a
Replaced socket_init calls with tc_init.
...
Some classes were still calling socket_init which had been removed. Replaced those calls with tc_init.
Make compiled and make test successfully ran all tests. Jenkins should be happy now.
2017-06-21 08:59:22 -05:00
Christopher LaChance
34cc3ae8e5
Removed default_port_flag and socket_init.
2017-06-16 15:20:04 -05:00
Derek Bankieris
39aef15a8e
Infer TRICK_HOME automatically
...
Refs #358
2017-06-02 13:37:28 -05:00
John M. Penn
2edd7b986d
Add include of errno.h to MonteVarFile.cpp. Ref #431
2017-05-22 14:07:25 -05:00
John M. Penn
d7e3aa4b5c
Make failed ifstream error message more informative. Ref#431
2017-05-22 13:47:25 -05:00
Alex Lin
dce161ad94
Suppress units conversion messages in input file. #414
...
Added a routine to shoot_the_units_conversion_messenger.
2017-04-20 11:34:50 -05:00
John M. Penn
9a5bbb160a
Get rid of yyset_lineno in the parsers. Ref #404
2017-03-30 19:53:33 -05:00
John M. Penn
56ce1c75cc
Fix yyset_out, yyset_lineno calls and remove yyset_in calls in parsers. Ref #404
2017-03-30 16:14:28 -05:00
John M. Penn
a7039aea61
Create va_list versions of Integrator state load and unload member functions. Ref #401
2017-03-28 17:55:27 -05:00
Derek Bankieris
2335f6bb69
Correct Monte Carlo compiler error on CentOS 7
...
Also change the Cannon sim monte_post jobs to use mc_read/write instead
of tc_read/write
Refs #396
2017-03-24 08:11:32 -05:00
Derek Bankieris
80ab0767e2
Combine command and data sockets in Monte Carlo
...
Refs #396
2017-03-23 12:22:40 -05:00
Derek Bankieris
17a5028e43
Infer TRICK_HOME automatically
...
Refs #358
2017-03-21 10:24:02 -05:00
Derek Bankieris
47847a8aef
Add ability to pass options to slave sims
...
Refs #395
2017-03-20 10:46:10 -05:00
Alex Lin
2450f51781
Add name of parameter to error message coming out of MemoryManager_restrore_stls #382
...
Printing the name now.
2017-02-15 09:00:34 -06:00
Derek Bankieris
4146b440b8
Make trick (Python package) a namespace package
...
Namespace packages are a mechanism for splitting a single Python
package across multiple directories on disk. With the addition of
$(TRICK_HOME)/pymods/trick, there now exists a package named 'trick' at
$(TRICK_HOME)/pymods and in each SIM_* directory. This change allows sims
to import modules from both locations.
Refs #365
2017-01-20 10:30:21 -06:00
Derek Bankieris
a6b68bb101
Infer TRICK_HOME automatically
...
Refs #358
2017-01-20 09:39:04 -06:00
Alex Lin
008337e69b
Monte Carlo dry runs produce monte_input files #318
...
The input file that is created while running monte carlo runs is done
in 3 different places. There was no easy way to collect all of those
lines in one place, so I duplicated the lines in the dryrun function.
2017-01-12 16:52:05 -06:00
Alex Lin
2c93f2ac75
Improve error handling when duplicate variable added to a DRHDF5 #353
...
Added a printout that shows the logging group and variable name that
had a problem when trying to add to the HDF5 recording.
2017-01-12 08:44:30 -06:00
Alex Lin
4b28951c1c
When doing input file verification the exit code is always 1. #335
...
After doing verification of the input file we return the exit code
of the python processor.
2017-01-11 17:40:05 -06:00
Alex Lin
0197df7103
Test output xml does not validate. #372
...
Removed the parent attribute.
2017-01-09 09:52:48 -06:00
Alex Lin
a831cbfaa8
Merge pull request #366 from iamthad/use_stderr
...
Use std::cerr instead of std::cout for error messages
2016-12-20 15:02:23 -06:00
Derek Bankieris
7a08829d3d
Introduce makefile variable TRICK_SYSTEM_LDFLAGS
...
Like other TRICK_SYSTEM variables, users should not modify this.
This renders TRICK_LDFLAGS and TRICK_USER_LINK_LIBS redundant. While we
would like to eventually remove TRICK_USER_LINK_LIBS, it's not likely to
ever actually happen.
Refs #369
2016-12-14 12:36:21 -06:00
Derek Bankieris
76f6a003b3
Add -std=c++11 to VariableServer Makefile
...
Refs #367
2016-12-14 10:06:01 -06:00