Skip to content

Commit

Permalink
Updating jump and ramp fitting multiprocessing from forkserver to spawn.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmacdonald-stsci committed Mar 7, 2025
1 parent 9889a66 commit 394cb33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/stcal/jump/jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def twopoint_diff_multi(jump_data, twopt_params, data, gdq, readnoise_2d, n_slic
slices, yinc = slice_data(twopt_params, data, gdq, readnoise_2d, n_slices)

log.info("Creating %d processes for jump detection ", n_slices)
ctx = multiprocessing.get_context("forkserver")
ctx = multiprocessing.get_context("spawn")
pool = ctx.Pool(processes=n_slices)
######### JUST FOR DEBUGGING #########################
# pool = ctx.Pool(processes=1)
Expand Down
2 changes: 1 addition & 1 deletion src/stcal/ramp_fitting/ols_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def ols_ramp_fit_multiprocessing(
ramp_data, buffsize, save_opt, readnoise_2d, gain_2d, weighting, number_slices
)

ctx = multiprocessing.get_context("forkserver")
ctx = multiprocessing.get_context("spawn")
pool = ctx.Pool(processes=number_slices)
pool_results = pool.starmap(ols_ramp_fit_single, slices)
pool.close()
Expand Down

0 comments on commit 394cb33

Please sign in to comment.