@@ -446,6 +446,7 @@ def _split_machine_among_cores(self):
446446 myid = self .ring_of_CPUs .myid
447447 i_start_part , i_end_part = sharing .my_part (myid )
448448 self .mypart = self .machine .one_turn_map [i_start_part :i_end_part ]
449+ self .i_start_part = i_start_part
449450 if self .ring_of_CPUs .I_am_a_worker :
450451 print (
451452 "I am id=%d/%d (worker) and my part is %d long"
@@ -555,7 +556,7 @@ def _switch_to_footprint_mode(self):
555556
556557 pp = self .pp
557558
558- print ("Proc. %d computing maps" % myid )
559+ print ("Proc. %d computing maps" % self . ring_of_CPUs . myid )
559560 # generate a bunch
560561 bunch_for_map = self .machine .generate_6D_Gaussian_bunch_matched (
561562 n_macroparticles = pp .n_macroparticles_for_footprint_map ,
@@ -572,7 +573,7 @@ def _switch_to_footprint_mode(self):
572573 slices_list_for_map = bunch_for_map .extract_slices (slicer_for_map )
573574
574575 # Track the previous part of the machine
575- for ele in self .machine .one_turn_map [:i_start_part ]:
576+ for ele in self .machine .one_turn_map [:self . i_start_part ]:
576577 for ss in slices_list_for_map :
577578 ele .track (ss )
578579
@@ -598,9 +599,9 @@ def _switch_to_footprint_mode(self):
598599 else :
599600 for ss in slices_list_for_map :
600601 ele .track (ss )
601- print ("Proc. %d done with maps" % myid )
602+ print ("Proc. %d done with maps" % self . ring_of_CPUs . myid )
602603
603- with open ("measured_optics_%d.pkl" % myid , "wb" ) as fid :
604+ with open ("measured_optics_%d.pkl" % self . ring_of_CPUs . myid , "wb" ) as fid :
604605 pickle .dump (
605606 {
606607 "ele_type" : list_ele_type ,
0 commit comments