Skip to content
Snippets Groups Projects
Commit f27db5cd authored by Gamelin Alexis's avatar Gamelin Alexis
Browse files

[Fix] problem with mpi case

Wrong data shared in Beam.mpi_share_distributions
Old names in CavityResonator.track corrected
parent 4da6ea49
No related branches found
No related tags found
No related merge requests found
......@@ -715,7 +715,7 @@ class Beam:
self.mpi.comm.Allgather([center, MPI.DOUBLE], [self.mpi.__getattribute__(dim + "_center"), MPI.DOUBLE])
self.mpi.__setattr__(dim + "_profile", np.empty((len(self), len(profile)), dtype=np.int64))
self.mpi.comm.Allgather([center, MPI.INT64_T], [self.mpi.__getattribute__(dim + "_profile"), MPI.INT64_T])
self.mpi.comm.Allgather([profile, MPI.INT64_T], [self.mpi.__getattribute__(dim + "_profile"), MPI.INT64_T])
self.mpi.__setattr__(dim + "_sorted_index", sorted_index)
......
......@@ -215,12 +215,12 @@ class CavityResonator():
if beam.mpi_switch:
# mpi -> get shared bunch profile for current bunch
center = beam.mpi.center_all[index]
profile = beam.mpi.profile_all[index]
center = beam.mpi.tau_center[index]
profile = beam.mpi.tau_profile[index]
bin_length = center[1]-center[0]
charge_per_mp = beam.mpi.charge_per_mp_all[index]
if index == self.bunch_index:
sorted_index = beam.mpi.sorted_index
sorted_index = beam.mpi.tau_sorted_index
else:
# no mpi -> get bunch profile for current bunch
(bins, sorted_index, profile, center) = bunch.binning()
......@@ -294,8 +294,8 @@ class CavityResonator():
if beam.mpi_switch:
# get shared bunch profile for current bunch
center = beam.mpi.center_all[j]
profile = beam.mpi.profile_all[j]
center = beam.mpi.tau_center[j]
profile = beam.mpi.tau_profile[j]
bin_length = center[1]-center[0]
charge_per_mp = beam.mpi.charge_per_mp_all[j]
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment