Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use less memory #68

Open
sbailey opened this issue May 9, 2017 · 0 comments
Open

Use less memory #68

sbailey opened this issue May 9, 2017 · 0 comments

Comments

@sbailey
Copy link
Contributor

sbailey commented May 9, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant