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

merge two multiprocessing loops into one #192

Merged
merged 12 commits into from
Nov 15, 2024
Merged

merge two multiprocessing loops into one #192

merged 12 commits into from
Nov 15, 2024

Conversation

moustakas
Copy link
Member

@moustakas moustakas commented Nov 15, 2024

This PR includes a long-overdue structural change which merges the two multiprocessing pools--one for I/O and the second one for fitting---into a single pool.

In addition to being more efficient (and cleaner, code-wise), it sets the stage for easily switching between Python's multiprocessing, which is disfavored at NERSC and MPI's MPIPoolExecutor, which is favored.

It also means that the fitting doesn't have to wait for the I/O to finish, which was getting unruly with healpixels containing many thousands of spectra. Plus the Galactic dust calculations were (finally!) vectorized, again for efficiency.

Finally, I restored the stackfit option of fitting stacked, single-camera spectra, which had been broken for some time.

@moustakas moustakas merged commit 61ff7e2 into main Nov 15, 2024
12 checks passed
@moustakas moustakas deleted the io-update branch November 15, 2024 15:16
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

Successfully merging this pull request may close these issues.

1 participant