Skip to content

Commit

Permalink
Merge branch 'exe_tests' of https://github.com/j-bryan/raven into exe…
Browse files Browse the repository at this point in the history
…_tests
  • Loading branch information
j-bryan committed Mar 20, 2024
2 parents fc4cb25 + 30730f7 commit 1a34487
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions tests/framework/unit_tests/CustomDrivers/basic_pip.xml
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>

0 comments on commit 1a34487

Please sign in to comment.