@@ -286,16 +286,16 @@ def load_photon(self):
286286 self .integral = np .stack (integral , axis = - 1 )
287287 return
288288
289- def compute_photon (theoryid , fiatlux ):
289+ def compute_photon_to_disk (theoryid , fiatlux , maxcores ):
290290 """Function to compute the photon PDF set."""
291291 luxset = fiatlux ['luxset' ].load ()
292292 force_compute = fiatlux .get ('compute_in_setupfit' , False )
293293 replicas = list (range (1 , luxset .n_members ))
294294
295295 # Return None and avoid pickling issues with the phoyon class.
296296 def wrapper_fn (replica , theoryid , fiatlux , force_compute ):
297- Photon (theoryid , fiatlux , replicas = [replica ], save_to_disk = True , force_computation = force_compute )
297+ Photon (theoryid , fiatlux , replicas = [replica ], save_to_disk = force_compute , force_computation = force_compute )
298298 return None
299299
300- log .info (f"Starting computation of the photon using { effective_n_jobs ( - 1 ) } effective cores..." )
301- _ = Parallel (n_jobs = - 1 )(delayed (wrapper_fn )(replica = replica , theoryid = theoryid , fiatlux = fiatlux , force_compute = force_compute ) for replica in replicas )
300+ log .info (f"Starting computation of the photon using { maxcores } effective cores..." )
301+ _ = Parallel (n_jobs = maxcores )(delayed (wrapper_fn )(replica = replica , theoryid = theoryid , fiatlux = fiatlux , force_compute = force_compute ) for replica in replicas )
0 commit comments