Closed BradGreig closed 3 years ago
Merging #224 (164d8f6) into master (0bdd060) will not change coverage. The diff coverage is
n/a
.:exclamation: Current head 164d8f6 differs from pull request most recent head 1c77d0d. Consider uploading reports for the commit 1c77d0d to get more accurate results
@@ Coverage Diff @@
## master #224 +/- ##
=======================================
Coverage 84.81% 84.81%
=======================================
Files 12 12
Lines 2444 2444
=======================================
Hits 2073 2073
Misses 371 371
Impacted Files | Coverage Δ | |
---|---|---|
src/py21cmfast/inputs.py | 90.60% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 45973ad...1c77d0d. Read the comment docs.
I'd approve if it was ready for it :-)
Yeah, I'll only move it to a full PR once #220 gets pulled into master and I merge all that in.
Hey @steven-murray, I added the test data and fixed up the original linting issue, however, it is still failing the linting. I tried re-running the linting tests, which gave the existing error. The previous error was a timing out issue. Might have been an issue on their server end or something...
This PR aims to minimise memory usage. It takes in the flag that has been introduced in #220 (
MINIMIZE_MEMORY
).It improves memory usage in two places, only one of which uses this new flag. The first is in generating the ICs, where instead of creating 6 new boxes for the components of the 2LPT, I instead temporarily store the i=j components in the hires_vi_2LPT boxes which have been allocated (but not populated) at this point (they get filled after) and only need a single box for the current i>j component. This results in 5 less boxes (of size DIM). As this minimises memory without additional CPU/IO this change is to always be implemented.
The one usage of
MINIMIZE_MEMORY
so far is inSpinTemperatureBox.c
. It is only used whenUSE_MASS_DEPENDENT_ZETA=True
andUSE_INTERPOLATION_TABLES=True
. It results in only allocating one box for the current smoothed density at the expense ofglobal_params.NUM_FILTER_STEPS_FOR_Ts
additional FFT's per redshift (but havingglobal_params.NUM_FILTER_STEPS_FOR_Ts - 1
less boxes in memory). This doesn't seem to add too much in terms of overall computations, especially ifUSE_FFTW_WISDOM=True
.Closes #63