idaholab / raven

RAVEN is a flexible and multi-purpose probabilistic risk analysis, validation and uncertainty quantification, parameter optimization, model reduction and data knowledge-discovering framework.
https://raven.inl.gov/
Apache License 2.0
217 stars 133 forks source link

[TASK] Support for "prepend" clarg input in RAVEN-runs-RAVEN #2348

Closed caleb-sitton-inl closed 1 month ago

caleb-sitton-inl commented 1 month ago

Issue Description

Is your feature request related to a problem? Please describe. The RAVEN user manual implies that the <Models>.<Code>.<clargs> node can be used to specify information to the code interface. In the RAVENInterface, however, these clargs are not supported. A consequence of this is that the RAVEN inner script cannot be run with any python command other than python.

The use case that requires this modification is that of checking code coverage in HERON. To check coverage, all calls within RAVEN to scripts in HERON (for example the HERON DispatchManager) must be tracked by coverage.py. This requires that all command line calls must use the correct coverage command. This includes the call to run RAVEN on the inner script in a RAVEN-runs-RAVEN setup. As stated previously, the only python command with which this run can currently be executed is python.

Describe the solution you'd like The <clargs> input in the <Models>.<Code> block is currently passed uncorrupted all the way through RAVEN until it is given as an argument to the RAVEN.generateCommand() method in the RAVENInterface.py file. This argument should be checked for a clarg of type prepend, which, if it exists, should be prepended to the command for running the inner RAVEN xml in place of the default python command.

Describe alternatives you've considered The %RAVENEXECUTABLE% variable, when put in the <Models>.<Code>.<executable> block, represents the RAVEN executable used to run the RAVEN outer xml. Thus, it runs the inner RAVEN script with the same executable as the outer RAVEN script. Unfortunately, this does not translate easily (if at all) to running the inner RAVEN with the same python command as the outer.


For Change Control Board: Issue Review

This review should occur before any development is performed as a response to this issue.


For Change Control Board: Issue Closure

This review should occur when the issue is imminently going to be closed.