In PhBaseWorkChain, the create_merged_output method currently calculates the total number of q-points (num_qpoints_found) by summing the results from all iterations:
num_qpoints_found = sum(
len(output['number_of_irr_representations_for_each_q']) for output in output_dict.values()
)
But actually, ph.x accumulates results into aiida.out during each iteration. Consequently, The PhCalculation parser also accumulates results into output_parameters. The output of the final iteration already contains the q-points computed in previous iterations.
Summing the lengths of the lists from all values in output_dict results in duplication and an incorrect total count of q-points. Then one get this kind of report:
2025-11-16 15:46:42 [84516 | REPORT]: [183079|PhBaseWorkChain|run_process]: launching PhCalculation<183082> iteration #1
2025-11-17 19:15:53 [84668 | REPORT]: [183079|PhBaseWorkChain|inspect_process]: PhCalculation<183082> failed and error was not handled, restarting once more
2025-11-17 19:15:53 [84669 | REPORT]: [183079|PhBaseWorkChain|run_process]: launching PhCalculation<183410> iteration #2
2025-11-19 18:32:32 [84730 | REPORT]: [183079|PhBaseWorkChain|create_merged_output]: Only 9 of 6 q-points were parsed.
2025-11-19 18:32:32 [84731 | REPORT]: [183079|PhBaseWorkChain|on_terminated]: remote folders will not be cleaned
In
PhBaseWorkChain, thecreate_merged_outputmethod currently calculates the total number of q-points (num_qpoints_found) by summing the results from all iterations:But actually,
ph.xaccumulates results intoaiida.outduring each iteration. Consequently, The PhCalculation parser also accumulates results intooutput_parameters. The output of the final iteration already contains the q-points computed in previous iterations.Summing the lengths of the lists from all values in output_dict results in duplication and an incorrect total count of q-points. Then one get this kind of report: