Use less memory
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
When simulating a full 5000 DESI fibers at an input resolution of 0.2 Angstroms, we can only fit one simulator per edison node due to memory usage. PR #67 identified that it is allocating >40 GB of memory even when the per-camera resolution convolved outputs are turned off. This issue documents some ideas for saving memory, which would allow us to run multiple simulators per node and thus is effectively ideas for increasing the speed of processing at scale.
Changes to specsim itself
Use float32 instead of float64 in the Simulator.simulated table. Could be done for all columns except wavelength (consistency of delta-wavelength from bin-to-bin gets problematic at single precision).
Split the num_source_electrons_{camera} etc. columns into separate Tables that only track the wavelengths that are actually covered by each camera. Currently ~2/3 of the entries for these columns are zeros.
Optionally drop some of the columns.
Make num_dark_electrons_{camera} and read_noise_electrons_{camera} 1D instead of 2D. They currently have separate but identical entries for each fiber.
Usage of specsim
Simulate only 500 fibers at a time, building up the subset of the necessary information for 5000 fibers as separate arrays external to specsim.
Simulate each camera with independent Simulator objects to avoid the many zeros from wavelengths outside the range for each camera in the Simulator.simulated table.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Simulator.simulated table and its per-camera columns described in the issue, then measure memory for 5000 DESI fibers at 0.2 Angstrom resolution with convolved outputs disabled. Compare the proposed storage changes and batching approaches; done means materially lower memory use while preserving the needed simulation outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100