Commit Graph

66 Commits

Author SHA1 Message Date
jmpenn
5065d96a15
Pre-increment (rather than post-increment) STL iterators in for loops… (#1692)
* Pre-increment (rather than post-increment) STL iterators in for loops. #1594

* Fix a goof. #1594
2024-04-18 11:41:35 -05:00
jmpenn
c4e60d9f9a
Proposed fix for deadlock on shutdown (#1673)
* Proposed fix for deadlock on shutdown

* Terminate C style comment.

* Added needed libs for applicable tests and updated the logic for when allowing/disallowing connections.

* Need to load additional trick libs for applicable tests for Linux.

---------

Co-authored-by: Hong Chen <hong.chen-1@nasa.gov>
2024-03-28 15:15:19 -05:00
Hong Chen
2ac342cfc5
More rusage info added to the end of the run summary output enhancement (#1645)
* Added additional resource usage info for sim run.

* Fixed so voluntary context switches output uses corresponding ru_nvcsw instead of ru_nivcsw due to copy and paste error.

* Removed added resource usage data for page faults and block operations due to inconsistency on different OS.

* Updated to have voluntary and involuntary usage data for both initilization and run for sim shutdown run summary.
2024-02-29 14:52:41 -06:00
jmpenn
a2183fb60e
Fix Issue #1386 (#1659) 2024-02-27 15:07:48 -06:00
Hong Chen
fe105451b9
Dump cycle time for all type instead of just PROCESS_TYPE_AMF_CHILD. (#1638) 2024-01-18 10:40:19 -06:00
Hong Chen
25b692d055
Added executive time tic value information to S_job_execution. (#1605) 2023-10-31 10:30:41 -05:00
Hong Chen
9076a3e88f
1592 send hs run stats improvement (#1604)
* Added system CPU time and initialization system CPU time and added user wording for existing CPU time to distinguish it from system CPU time used for trick run summary.

* Updated the order of a couple of times of shutdown messages printed on screen and sim/cpu time ratio to both user and system cpu time.

* Minor change for lining up the shutdown message.
2023-10-31 10:20:17 -05:00
Hong Chen
cca7191129
1504 trick run summary enhancement for memory used (#1545)
* Added SIM RAM usage info to trick run summary.

* Fixed to use #if for determing which OS.

* Removed the system print out statement when MonitorHealthStatusTask is finished.

* Changed "M" to "MB" for RAM usage info on run summery.
2023-08-24 13:51:19 -05:00
Jacqueline Deans
33823f1a0b
Correct path and remove Mac attaching a debugger in Executive_fpe_handler.cpp (#1495) 2023-05-04 15:29:32 -05:00
Jacqueline Deans
9c7becb4ff
Handle thread shutdown gracefully and test (#1448)
---------

Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
2023-02-08 17:58:59 -06:00
Jacqueline Deans
8be3e30f7a
Fix Mac pipeline (#1454) 2023-02-07 15:35:22 -06:00
Jacqueline Deans
77fa8d78b0
Time tic precision fix and test (#1428) 2023-01-16 08:29:41 -06:00
jmpenn
2a03ff5cf4
Replace sprintf with snprintf in all of Trick source. #1384 (#1392)
* Replace sprintf with snprintf in all of Trick source. #1384

* Don't add -Werror for MacOS because of deprecated sprintf warnings which we cant get rid of because SWIG. #1384

* Fixed an unbalanced parenthesis in S_overrides.mk. #1384
2022-11-15 15:00:05 -06:00
Jacqueline Deans
9d305fec09
Add a way to disable sim objects (#1364)
* Add set_sim_object_jobs_onoff, get_sim_object_on_off, and change set_sim_object_onoff to preserve the on/off status of jobs
2022-11-15 09:16:08 -06:00
Jacqueline Deans
1cf4ef58ad
Stop attaching a debugger on segfault on Mac (#1383) 2022-11-07 15:27:00 -06:00
Scott Fennell
d0511e8fb9
1372 use temporary job pointer instead of modifying curr_job in exec_set_time_tic_value
* add integration test sim SIM_exec_set_time_tic_value
* use temporary job pointer instead of modifying curr_job in exec_set_time_tic_value
closes #1372
2022-10-28 17:19:54 -05:00
Jacqueline Deans
900f7b18be
Generate test coverage and use Coveralls for tracking and visualization (#1366)
* Add code-coverage make target and github actions workflow
* Upload coverage to coveralls
* Add coverage badge to readme
* Fix some test makefiles to correctly propagate flags
2022-10-13 14:23:16 -05:00
Scott Fennell
c390ca5ba6
replace GTEST_HAS_TR1_TUPLE with -std=c++11 (#1331) 2022-08-11 15:10:29 -05:00
Scott Fennell
167c4a6530
disable sigchld handler by default #931 (#1182)
* disable sigchld handler by default #931

* update test to set sigchld trap before testing

closes #931
2021-08-27 13:48:46 -05:00
Scott Fennell
b724f502b3
fix 32 bit test (#953)
* fix tests for 32 bit mode

* fix issues with mongoose build

* Update docker.yml
2020-02-14 10:23:19 -06:00
Scott Fennell
3415996952
iss #909 add functions to turn on/off SIGCHLD handler (#924)
closes #909
2020-01-16 10:49:36 -06:00
Scott Fennell
1d17aa579a fix sim help message and handle bad command line args #840 2019-07-10 13:53:03 -05:00
Derek Bankieris
40cf5c0b29 Note the process exit status of Monte Carlo runs
Closes #481
2019-06-21 14:02:03 -05:00
Derek Bankieris
d135353c90 Infer TRICK_HOME in Makefiles
Closes #358
2019-06-21 13:15:22 -05:00
Scott Fennell
b23b19195b
Merge pull request #818 from nasa/786-clock-stuff
Add C call to clock_tics_per_sec and also log init job elapsed time
2019-06-18 13:38:18 -05:00
Alex Lin
497f11f132
Make TRICK_CXX variable to specify c++ compiler #767 (#815)
Changed all references of TRICK_CPPC to TRICK_CXX.  Added a
warning message that TRICK_CPPC has been deprecated.
2019-06-18 11:00:08 -05:00
Scott Fennell
4d247c94db remove unneccessary includes 2019-06-18 10:39:03 -05:00
Scott Fennell
97941ac073 move init_log_stream to Executive.hh, move Executive::process_sim_args from "default data" to Executive::init 2019-06-18 10:34:56 -05:00
Scott Fennell
fadda55abf Log elapsed time in default_data, input_processor, and init jobs in file
init_log.csv
2019-06-17 14:40:01 -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
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
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
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
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
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
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
Michael Vetter
18f0d7e871 Remove trailing whitespaces
Makes it easier to edit the files. So if we press 'end of line' we are
really at the end of line.
2016-11-08 10:25:07 +01:00
Alex Lin
fa4664c4ea Move the loop that waits for scheduled threads to finish out of advance_sim_time #292
2 problems found.  Syncing scheduled threads was not happening at all because the job
was not being rescheduled.  Did not want to deal with changing job call times so I
called the new scheuduled_thread_sync routine from advance_sim_time.  That's where
it started, it'll be fine.

Also found that I was resetting job complete flags too aggressively.  The check to
test if the thread is ready to run was missing.  Added that check back in.
2016-08-30 10:56:18 -05:00
Alex Lin
e3759ac594 Move the loop that waits for scheduled threads to finish out of advance_sim_time #292
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 08:42:53 -05:00
Alex Lin
aeeaa7b3bc Move the loop that waits for scheduled threads to finish out of advance_sim_time #292
Forgot to introduce the new function.
2016-08-26 09:10:44 -05:00
Alex Lin
7c57c1d02d Move the loop that waits for scheduled threads to finish out of advance_sim_time #292
Created a new executive job that waits for the scheduled threads to finish.  We
run this right before advancing time.
2016-08-26 09:07:46 -05:00
Alex Lin
0072e7d6f0 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 10:55:27 -05:00
Alex Lin
89fda63293 Remove doxygen documentation now housed on wiki #189
moved all of the design documentation to the wiki
2016-08-02 17:50:49 -05:00
Alex Lin
6848e31ddc Remove doxygen documentation now housed on wiki #189
moved the small amount of text we had in our "requirements" document
to the wiki.
2016-08-02 16:55:36 -05:00
Alex Lin
832679b7ee Remove doxygen documentation now housed on wiki #189
Verified all documentation deleted with this issue resides on
our wiki.  Nothing is lost.  Modified the doxygen makefile and
main page to point to the wiki where the user's guide used to be.

TODO: Need to move the requirements and design doxygen files.
2016-08-02 15:41:18 -05:00
Alex Lin
3a7e756926 Unit test directories do not support gtest libs in lib64
Added library search dirs ${GTEST_HOME}/lib64 and ${GTEST_HOME}/lib
to the link line.

refs #264
2016-07-01 11:50:06 -05:00
Alex Lin
268d3407df Set and use LD in our makefiles correctly.
Changed TRICK_LD to TRICK_CPPC in the unit test makefiles.  It
should be TRICK_CPPC on these lines.

refs #131
2016-06-28 08:58:33 -05:00