Commit Graph

245 Commits

Author SHA1 Message Date
Jacqueline Deans
0788dcfa9b Replace TrickComm with new connection_handler library 2023-06-26 12:23:58 -05:00
Jacqueline Deans
c2e42f4ef4 Refactor and test Variable Server.
- Split VariableServerThread into VariableServerSession and VariableReference classes
- Use C++ streams for data handling
- Unit tests
2023-06-26 12:23:58 -05:00
Jacqueline Deans
e89bf083b2 update version numbers to prerelease 19.7.0-beta 2023-06-23 12:08:39 -05:00
Jacqueline Deans
7e183656e1 update version numbers for Trick Simulation Environment 19.6.0 2023-06-23 12:05:28 -05:00
Jacqueline Deans
2e0e580c98
Add make spotless target to get rid of config info, patch together various other spots missed by clean (#1515) 2023-06-13 09:50:19 -05:00
Jacqueline Deans
d76de7e1ee
Allow for read only S_sie.resource (#1420) 2023-04-17 17:23:48 -05:00
ddj116
9099792947
Integrate MonteCarloGenerate capability from EG CML and associated TrickOps enhancements (#1415)
* Provide MonteCarloGenerate capability

Intermediate commit, this squash represents all of Isaac Reaves' work
during his Fall 2022 Pathways internship tour

[skip ci]

* TrickOps: Add phase, [min-max] range, and overhaul YAML verification

* Add new "phase:" mechanism to TrickOps Runs and Builds to support
  project-specific constraints on build and run ordering
  - phase defaults to zero if not specified and must be between -1000
    and 1000 if given.
  - jobs can now optionally be requested by their phase or phase range
  - See trickops/README.md for details
* Add [min-max] notation capability to run: entries and compare: entries
  - [min-max] ranges provide definition of a set of runs using a common
    numbering scheme in the YAML file, greatly reducing YAML file size
    for monte-carlo and other zero-padded run numbering use cases
  - See trickops/README.md for details
* YAML parsing changes
  - Overhaul the logic which verifies YAML files for the expected
    TrickOps format. This is now done in TrickWorkflowYamlVerifier and
    provides much more robust error checking than previous approach
  - .yaml_requirements.yml now provides the required types, ranges, and
    default values as applicable to expected entries in YAML files
  - valgrind: is now an sub-option to run: entries, not its own section
    Users should now list their runs normallly and define their flags in
    in that run's valgrind: subsection
  - parallel_safety is now a per-sim parameter and not global. Users
    should move their global config to the sim layer
  - self.config_errors is now a list of errors. Users should now
    check for empty list when using instead of True/False
* Robustify the get_koviz_report_jobs unit test to work whether koviz
  exists on PATH or not
* Adjust trickops.py to use the new phase and range features
   - Make it more configurable on the command-line via argparse
   - Move SIM_mc_generation tests into test_sims.yml

[skip ci]

* Code review and cleanup from PR #1389

Documentation:

* Adjust documentation to fit suggested symlinked approach. Also
  cleaned up duplicate images and old documentation.
* Moved the verification section out of markdown and into a PDF since it
  heavily leverages formatting not available in markdown.
* Clarify a couple points on the Darwin Trick install guide
* Update wiki to clarify that data recording strings is not supported

MCG Code:

* Replace MonteCarloVariableRandomNormal::is_near_equal with new
  Trick::dbl_is_near from trick team

MCG Testing:

* Reduce the set of SIM_mc_generation comparisons. After discussion
  the trick team, we are choosing to remove all comparisons to
  verif_data/ which contain random-generated numbers since
  these tests cannot pass across all supported trick platforms.
* Fix the wrong rule on exlcuding -Werror for Darwin builds
  of SIM_mc_generation
* Remove data recording of strings in SIM_mc_generation

Trickops:

* Replace build_command with build_args per discussion w/ Trick team
  Since we only support arguments to trick-CP, replace the build_command
  yaml entry with build_args
* Disable var server connection by default in SingleRun if TrickWorkflow.quiet
  is True
* Guard against multiple Job starts
* Remove SimulationJob inheritance layer since old monte-carlo wasn't
  and never will be supported by TrickOps
* Ignore IOError raise from variable_server that looks like "The remote
  endpoint has closed the connection". This appears to occur when
  SingleRun jobs attempt to connect to the var server for a sim that
  terminates very early

[skip ci]

* Adjust phasing of old/new MCG initialize functions

* Clarify failure message in generate_dispersions if new/old MC are both
  used.
* Adjust the phasing order of MCG intialize method to be before
  legacy MC initialized. Without this, monte-carlo dry run completes with
  success before the check in generate_dispersions() can run
* Add -Wno-stringop-truncation to S_override.mk for SIM_mc_generation
  since gcc 8+ warns about SWIG generated content in top.cpp

* Introduce MonteCarloGenerationHelper python class

This new class provides an easy-to-use interface for MCG sim-module
users:

1. Run generation
2. Getting an sbatch array job suitable for SLURM
3. Getting a list of SingleRun() instances for generated runs, to be
   executed locally if desired

---------

Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
2023-03-06 09:25:50 -06:00
John M. Penn
b2aa92ae81 Rename Trick17_Tutorial_Review to Trick_Tutorial_Review. 2023-02-09 15:06:00 -06:00
John M. Penn
096881a6be Remove old Trick 13 Tutorial Review. 2023-02-09 14:59:06 -06:00
Jacqueline Deans
8be3e30f7a
Fix Mac pipeline (#1454) 2023-02-07 15:35:22 -06:00
Jacqueline Deans
5ff52a01c5
Add option to terminate sim on python event error (#1434) 2023-01-20 15:46:10 -06:00
Jacqueline Deans
48f6f76ef3
Fix various issues in scheduled CI jobs (#1419)
- Update S_overrides.mk for SIM_test_varserv so it links correctly in 32 bit (why did only that one have a problem? the world will never know)
- Stop testing Debian Bookworm on python2.7 since support was removed
- Fix some TrickOps unit tests
2022-12-14 17:04:09 -06:00
Jacqueline Deans
cb89e4dd7e Update version numbers to prerelease 19.6.0-beta 2022-11-29 16:58:30 -06:00
Jacqueline Deans
0f4ca88da6 Update version numbers for Trick Simulation Environment 19.5.1 2022-11-29 16:56:55 -06:00
Jacqueline Deans
d0f679b31a update version numbers to prerelease 19.6.0-beta 2022-11-17 16:00:00 -06:00
Jacqueline Deans
e86e7fd968 update version numbers for Trick Simulation Environment 19.5.0 2022-11-17 15:54:02 -06:00
Jacqueline Deans
d9e7ac250d
Refactored sim tests to run through TrickOps (#1390) 2022-11-17 15:43:29 -06: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
Jacqueline Deans
61a378553d update version numbers to prerelease 19.5.0-beta 2022-07-20 16:53:18 -05:00
Jacqueline Deans
9363603f0f update version numbers for Trick Simulation Environment 19.4.0 2022-07-20 16:47:07 -05:00
Scott Fennell
3cd2a1606f
1308 gcc ver (#1309)
* add correct GCC verno to ICG for llvm >= 10

Co-authored-by: Jacqueline Deans <jndeans@jslal0520121056.jsc.nasa.gov>
Co-authored-by: Deans <jdeans289@gmail.com>
2022-07-20 11:38:42 -05:00
Fennell, Scott P 263712616
7b85aa6632 Trick Simulation Environment 23.0.0-beta 2022-02-08 15:07:01 -06:00
Fennell, Scott P 263712616
a317c22274 Trick Simulation Environment 19.3.1 2022-02-08 10:46:10 -06:00
Scott Fennell
826b220e77
restrict checkpointing on char* vectors in default_trick_sys
related to #1209
2021-12-13 12:59:15 -06:00
Scott Fennell
e696521aa0
fix comment typo in trick_default_sys
closes #1209
2021-12-13 11:28:57 -06:00
John M. Penn
a691ae0d6d Fix message in share/trick/swig/unit_test.py #1208 2021-12-07 14:16:56 -06:00
ddj116
4b2dc2f8ec
Replace deprecated yaml.load() with yaml.safe_load() (#1199)
Closes #1198

Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
2021-11-02 09:47:55 -05:00
Penn, John M 047828115
5b3770d15a Fix civetweb header inclusion problem. #1188 2021-10-18 11:32:33 -05:00
Penn, John M 047828115
1179703b6d Refactor civitweb linkage #1188 2021-10-14 18:17:04 -05:00
Scott Fennell
4a9d9482ef
1194 trick system icg exclude (#1195)
* Fix ICG errors while processing system header files closes #1189

Found an InitPreprocessor call and am using it.  Not sure which version
of clang it was added, just using for the version I'm on (10) and above.
Also found some GCC defines that are used during normal compilation.
Added these to our list of defines during ICG.  This clears up all of
the errors I've been seeing.

* Fix ICG errors while processing system header files #1189

OK, found the flag that activates the ATOMIC defines I was previously
hardcoding.

* #1194 add trick-system-icg-exclude

Co-authored-by: Alex Lin <alexander.s.lin@nasa.gov>
2021-10-12 12:02:03 -05:00
Penn, John M 047828115
0b373d96cf Refactor web server configuration. #1188 2021-09-29 18:00:33 -05:00
Penn, John M 047828115
90639e35d5 In Makefile.common, don't allow TRICK_CIVET to be enabled. #1188 2021-09-14 01:10:11 -05:00
Penn, John M 047828115
f272e89e1b Comment out inappropriate alloc_info tests. 2021-08-30 15:22:06 -05:00
Scott Fennell
82c55d405d
Merge master into branch to fix web server tests (#1185)
* suppress warning for detached head during civitweb clone

closes #1180

* disable sigchld handler by default #931 (#1182)

* disable sigchld handler by default #931

* update test to set sigchld trap before testing

closes #931

* Fixed webserver http_alloc test (#1184)

Co-authored-by: cherpin00 <44306236+cherpin00@users.noreply.github.com>
2021-08-28 16:20:34 -05:00
Penn, John M 047828115
e487e5609f Initial excision of DMTCP from Trick. #28 2021-08-27 19:38:56 -05:00
Penn, John M 047828115
4c52ed2753 Merge Caleb Herpins port of Trick webserver from Mongoose to CivetWeb #730. 2021-08-18 13:15:10 -05:00
Penn, John M 047828115
6df675c7ee Remove deprecated Clocks and unit tests, and update Trick::Clock documentation. #87 2021-08-02 00:40:55 -05:00
Dan Jordan
0be5f72e35 Robustify YAML config file validation, enhance unit tests
* Fixed run path/too/deep duplication logic
* Add more unit testing to cover edge cases in the YAML file
* Unify type checking to reduce code duplication
* Empty sections like run: are still ignored but now produce an error
  to remind the user to clean them up.
* Make get_sims() work with labels=None
* Test SIMs within deep directory structures to exercise pathing logic
* Add test for invalid sim path: syntax

Refs #1159
2021-06-25 16:02:12 -05:00
Fennell, Scott P 263712616
68cf81736c Trick 19.4.0 Pre-release ver no 2021-06-23 11:49:41 -05:00
Fennell, Scott P 263712616
15534f7f56 Trick Release 19.3.0 2021-06-23 11:39:47 -05:00
Derek Bankieris
9b7e18af15 Create link_list files for Trickification
ICG and make_makefile_swig create py_link_list and io_link_list files
listing the files to be linked during sim builds. Trickified projects
require slightly altered lists.

Fixes #1155
2021-06-02 13:56:21 -05:00
Keith Vetter
832fc4e8a7
Fix compiler shadow warning for issue #1141 (#1150)
closes #1141 

If you use the -Wshadow flag, there are few compiler warnings
for shadowing. You can recreate with the Ball L1 sim:

    % vi S_overrides.mk
    TRICK_CFLAGS += -Wshadow -I../models
    TRICK_CXXFLAGS += -Wshadow -I../models
    % trick-CP
    ...

    In file included from build/S_source.cpp:3:0:
    build/../S_source.hh: In member function ‘void EventManagerSimObject::create_thread_process_event()’:
    build/../S_source.hh:425:23: warning: declaration of ‘name’ shadows a member of 'this' [-Wshadow]
    char* name = strdup(oss.str().c_str()) ;

To fix the S_source* generated code, it is just a
matter of changing default_trick_sys.sm.
2021-05-26 22:13:31 -05:00
Derek Bankieris
2c06ae6eaf Rename SIM_*/trick to SIM_*/.trick
Hide the non-zipped Python modules to indicate to users that changing
them will have no effect on the sim.

Refs #1144
2021-05-19 17:33:13 -05:00
Derek Bankieris
8d314fa1b1 Zip SWIG-generated python modules
Closes #1144
2021-05-19 17:23:33 -05:00
ddj116
1d9ea79107
Introducing TrickOps - An Extensible Sim Testing Framework (#1130)
* Introducing TrickOps - An Extensible Sim Testing Framework

Features:

* Multiple simultaneous sim builds, runs, file vs. file comparisons,
  arbitrary post-run analyses, valgrind of runs
* Real-time progress bars for sim builds and runs
* Exit code management lets users easily define success & failure
* Failed comparisons can optionally generate koviz error reports

See share/trick/trickops/README.md for details

* Add GitHub Actions Workflow for TrickOps for Ubuntu:20.04 & CentOS latest

* Adds python unit and doc tests to github actions for push / pull requests
  for Ubuntu:20.04 and CentOS 8:latest. MacOS still forthcoming.
* Also updates documentation with TrickOps information
* Remove duplicate / overwriting SIM_ definitions in ExampleWorkflow.py

* Address Code Review / Discussion

* Reduce set of sims tested in ExampleWorkflow.py to stable set
* Add ExampleWorkflow.py to GitHub Actions
* Clarify documentation and add image of TrickOps in action
* Error/Ignore valgrind entries in YAML file if platform == darwin

* Fix run.compare() logic error and add unit test to cover it

Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
2021-05-03 14:39:20 -05:00
Fennell, Scott P 263712616
92ad2a8063 reapply prerelease version numbers to master branch 2021-03-12 13:49:27 -06:00
Fennell, Scott P 263712616
7b933255aa Trick Release 19.2.3 2021-03-12 13:42:49 -06:00
Scott Fennell
6691b14e9e
1093 c str (#1119)
* update checkpoint_map.hh #1093

* #1093 update checkpoint_pair.hh

* #1093 update checkpoint_queue.hh

* #1093 update MM_write_checkpoint.cc

* #1093 update units_attach.i

* #1093 update checkpoint_sequence_stl.hh

* #1093 update checkpoint_stack.hh

* #1093 update swig_extend_str.i

* #1093 update swig_int_templates.hh

* #1093 update checkpoint_stack.hh and swig_int_typemap.i

* #1093 fix c_str issue without adding memory leaks

* #1093 fix c_str issue without adding memory leaks

* #1093 remove dangling pointers in injector sim object (without causing memory leaks)

* #1093 remove dangling pointers in injector sim object (without causing memory leaks)

* #1093 remove dangling pointers in Event Manaager sim object (without causing memory leaks)

* #1093 fix MonteCarlo_c_intf dangling pointers

Co-authored-by: Fennell, Scott P 263712616 <scott.p.fennell@nasa.gov>

closes #1093
2021-03-12 13:23:35 -06:00
Fennell, Scott P 263712616
be407eaf13 Update version numbers to pre-release for 19.3.0 2021-01-11 13:59:31 -06:00
Fennell, Scott P 263712616
e0be091c7e Trick Release 19.2.2 2021-01-11 13:57:14 -06:00