-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'exe_tests' of https://github.com/j-bryan/raven into exe…
…_tests
- Loading branch information
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<Simulation verbosity="debug"> | ||
<TestInfo> | ||
<name>framework/CodeInterfaceTests/RAVEN.Basic</name> | ||
<author>dgarrett622</author> | ||
<created>2022-04-20</created> | ||
<classesTested>Models.Code.RAVEN</classesTested> | ||
<description> | ||
Basic test of the raven-runs-raven interface for running in Python workflows (same as integrated | ||
RAVEN runs RAVEN basic test). Outer raven runs a grid sampling by changing the upper and lower | ||
bounds of the sampledVars distribution on the inner raven. Inner raven runs 100 MC samples, | ||
does basic stats, and returns the mean, sigma to the outer raven. | ||
</description> | ||
<analytic> | ||
Each sample in this test converges towards the analytic solutions discussed in the "changing lower, upper bounds" section of | ||
the "attenuate" analytic model documentation. | ||
</analytic> | ||
</TestInfo> | ||
|
||
<RunInfo> | ||
<WorkingDir>Basic</WorkingDir> | ||
<Sequence>sample,print</Sequence> | ||
</RunInfo> | ||
|
||
<Steps> | ||
<MultiRun name="sample"> | ||
<Input class="Files" type="raven">inner_input</Input> | ||
<Model class="Models" type="Code">raven</Model> | ||
<Sampler class="Samplers" type="Grid">grid</Sampler> | ||
<Output class="DataObjects" type="PointSet">outer_samples</Output> | ||
</MultiRun> | ||
<IOStep name="print"> | ||
<Input class="DataObjects" type="PointSet">outer_samples</Input> | ||
<Output class="OutStreams" type="Print">outer_out</Output> | ||
</IOStep> | ||
</Steps> | ||
|
||
<Files> | ||
<Input name="inner_input" type="raven">../../../CodeInterfaceTests/RAVEN/Basic/inner_sample.xml</Input> | ||
</Files> | ||
|
||
<Models> | ||
<Code name="raven" subType="RAVEN"> | ||
<executable>raven_framework</executable> | ||
<outputExportOutStreams>inner_out</outputExportOutStreams> | ||
<alias variable="innerLowerBound" type="input">Distributions|Uniform@name:dist|lowerBound</alias> | ||
<alias variable="innerUpperBound" type="input"> | ||
Distributions|Uniform@name:dist|upperBound, | ||
Samplers|Grid|constant@name:testSecondAlias | ||
</alias> | ||
<clargs type="prepend" arg="python"/> | ||
<clargs type="postpend" arg="inner_sample.xml"/> | ||
</Code> | ||
</Models> | ||
|
||
<Distributions> | ||
<Uniform name="dist_lower"> | ||
<lowerBound>0</lowerBound> | ||
<upperBound>0.49999</upperBound> | ||
</Uniform> | ||
<Uniform name="dist_upper"> | ||
<lowerBound>0.50001</lowerBound> | ||
<upperBound>1</upperBound> | ||
</Uniform> | ||
</Distributions> | ||
|
||
<Samplers> | ||
<Grid name="grid"> | ||
<variable name="innerLowerBound"> | ||
<distribution>dist_lower</distribution> | ||
<grid type='CDF' construction='equal' steps='2'>0 1</grid> | ||
</variable> | ||
<variable name="innerUpperBound"> | ||
<distribution>dist_upper</distribution> | ||
<grid type='CDF' construction='equal' steps='2'>0 1</grid> | ||
</variable> | ||
</Grid> | ||
</Samplers> | ||
|
||
<OutStreams> | ||
<Print name="outer_out"> | ||
<type>csv</type> | ||
<source>outer_samples</source> | ||
</Print> | ||
</OutStreams> | ||
|
||
<DataObjects> | ||
<PointSet name="outer_samples"> | ||
<Input>innerLowerBound,innerUpperBound</Input> | ||
<Output>mean_y1,mean_y2,mean_ans,mean_testSecondAlias</Output> | ||
</PointSet> | ||
</DataObjects> | ||
|
||
</Simulation> |