terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
212 stars 82 forks source link

Creating a one-block test reactor to speed up testing #1737

Closed john-science closed 1 week ago

john-science commented 1 week ago

What is the change?

In this PR I created a test reactor from an existing single test block reactor:

armi/tests/smallestTestReactor/armiRunSmallest.yaml

Using this new test reactor in dozens of tests, sped up our unit tests by 25-30%!

Why is the change being made?

I am just trying to speed up our unit tests. (Close #1736)

On my personal laptop, I saw many unit tests go from between 2 or 6 seconds down to 0.1 to 0.2 seconds.

Perhaps more importantly, we now have the tooling to use across the ecosystem.

NOTE: Not all unit tests can use such a small reactor. Be design, if you are doing something like shuffling multiple assemblies, you can not use the smaller test reactor.


Checklist

john-science commented 1 week ago

@opotowsky I reduced the scope of this PR for you.

I moved the runLog.py fix and the Python 3.7 thing to another PR, which Tony got.

Hope that helps!