File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -156,12 +156,23 @@ def build_data(self):
156156 "It seems that you are reconstructing near-field data with FFT-shifted diffraction data. "
157157 "Is this intended? If not, set `data_options.fft_shift=False`."
158158 )
159+
160+ save_on_device = self .data_options .save_data_on_device
161+ if self .n_ranks > 1 :
162+ if save_on_device :
163+ logging .warning (
164+ "Data must be saved on CPU in multi-processing mode "
165+ "but `data_options.save_data_on_device` is set to `True`. "
166+ "The current setting will be ignored."
167+ )
168+ save_on_device = False
169+
159170 self .dataset = PtychographyDataset (
160171 self .data_options .data ,
161172 wavelength_m = self .data_options .wavelength_m ,
162173 free_space_propagation_distance_m = self .data_options .free_space_propagation_distance_m ,
163174 fft_shift = self .data_options .fft_shift ,
164- save_data_on_device = self . data_options . save_data_on_device ,
175+ save_data_on_device = save_on_device ,
165176 valid_pixel_mask = self .data_options .valid_pixel_mask
166177 )
167178
You can’t perform that action at this time.
0 commit comments