I have been building on the example for B-mode Images Using A Phased Array. However, when using the C++ code (either CPU or CUDA) in MATLAB I get inconsistent results with the OMP results. Unfortunately, I don’t get either code to misbehave and even after hours in the forum I’m struggling to make any headway – but at least I learned a lot!!
Running the C++ code directly from MATLAB:
for angle_index = 1:number_scan_lines
transducer.steering_angle = steering_angles(angle_index);
sensor_data = kspaceFirstOrder3DG(kgrid, medium, transducer, transducer, input_args{:});
scan_lines(angle_index, :) = transducer.scan_line(sensor_data);
end
Running the OMP code:
for angle_index = 1:number_scan_lines
transducer.steering_angle = steering_angles(angle_index);
filename=sprintf('input_orig_%d.h5',angle_index);
kspaceFirstOrder3D(kgrid, medium, transducer, transducer, input_args{:},'SaveToDisk',filename);
end
Run on cluster: kspaceFirstOrder-OMP -i input_orig_##.h5 -o output_orig_##.h5
for angle_index = 1:number_scan_lines
filename = sprintf('output_orig_%d.h5',angle_index);
sensor_data = h5read(filename,'/p');
sensor_data = transducer.combine_sensor_data(sensor_data);
scan_lines(angle_index, :) = transducer.scan_line(sensor_data);
end