gmbe_run_distributed Subroutine

private subroutine gmbe_run_distributed(this, json_data)

Uses

  • proc~~gmbe_run_distributed~~UsesGraph proc~gmbe_run_distributed gmbe_context_t%gmbe_run_distributed module~mqc_gmbe_fragment_distribution_scheme mqc_gmbe_fragment_distribution_scheme proc~gmbe_run_distributed->module~mqc_gmbe_fragment_distribution_scheme module~mqc_mbe_fragment_distribution_scheme mqc_mbe_fragment_distribution_scheme proc~gmbe_run_distributed->module~mqc_mbe_fragment_distribution_scheme omp_lib omp_lib proc~gmbe_run_distributed->omp_lib pic_io pic_io proc~gmbe_run_distributed->pic_io pic_logger pic_logger proc~gmbe_run_distributed->pic_logger module~mqc_gmbe_fragment_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme module~mqc_gmbe_fragment_distribution_scheme->pic_io module~mqc_gmbe_fragment_distribution_scheme->pic_logger module~mqc_calc_types mqc_calc_types module~mqc_gmbe_fragment_distribution_scheme->module~mqc_calc_types module~mqc_calculation_defaults mqc_calculation_defaults module~mqc_gmbe_fragment_distribution_scheme->module~mqc_calculation_defaults module~mqc_group_batching mqc_group_batching module~mqc_gmbe_fragment_distribution_scheme->module~mqc_group_batching module~mqc_group_shard_io mqc_group_shard_io module~mqc_gmbe_fragment_distribution_scheme->module~mqc_group_shard_io module~mqc_json_output_types mqc_json_output_types module~mqc_gmbe_fragment_distribution_scheme->module~mqc_json_output_types module~mqc_method_config mqc_method_config module~mqc_gmbe_fragment_distribution_scheme->module~mqc_method_config module~mqc_mpi_tags mqc_mpi_tags module~mqc_gmbe_fragment_distribution_scheme->module~mqc_mpi_tags module~mqc_physical_fragment mqc_physical_fragment module~mqc_gmbe_fragment_distribution_scheme->module~mqc_physical_fragment module~mqc_program_limits mqc_program_limits module~mqc_gmbe_fragment_distribution_scheme->module~mqc_program_limits module~mqc_result_types mqc_result_types module~mqc_gmbe_fragment_distribution_scheme->module~mqc_result_types module~mqc_thermochemistry mqc_thermochemistry module~mqc_gmbe_fragment_distribution_scheme->module~mqc_thermochemistry module~mqc_vibrational_analysis mqc_vibrational_analysis module~mqc_gmbe_fragment_distribution_scheme->module~mqc_vibrational_analysis module~mqc_work_queue mqc_work_queue module~mqc_gmbe_fragment_distribution_scheme->module~mqc_work_queue pic_mpi_lib pic_mpi_lib module~mqc_gmbe_fragment_distribution_scheme->pic_mpi_lib pic_timer pic_timer module~mqc_gmbe_fragment_distribution_scheme->pic_timer pic_types pic_types module~mqc_gmbe_fragment_distribution_scheme->pic_types module~mqc_mbe_fragment_distribution_scheme->omp_lib module~mqc_mbe_fragment_distribution_scheme->pic_io module~mqc_mbe_fragment_distribution_scheme->pic_logger module~mqc_mbe_fragment_distribution_scheme->module~mqc_calc_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_calculation_defaults module~mqc_config_adapter mqc_config_adapter module~mqc_mbe_fragment_distribution_scheme->module~mqc_config_adapter module~mqc_mbe_fragment_distribution_scheme->module~mqc_json_output_types module~mqc_mbe mqc_mbe module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe module~mqc_mbe_io mqc_mbe_io module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe_io module~mqc_method_base mqc_method_base module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_base module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_config module~mqc_method_factory mqc_method_factory module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_factory module~mqc_method_types mqc_method_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_mpi_tags module~mqc_mbe_fragment_distribution_scheme->module~mqc_physical_fragment module~mqc_mbe_fragment_distribution_scheme->module~mqc_program_limits module~mqc_resources mqc_resources module~mqc_mbe_fragment_distribution_scheme->module~mqc_resources module~mqc_mbe_fragment_distribution_scheme->module~mqc_result_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_work_queue pic_blas_interfaces pic_blas_interfaces module~mqc_mbe_fragment_distribution_scheme->pic_blas_interfaces module~mqc_mbe_fragment_distribution_scheme->pic_mpi_lib module~mqc_mbe_fragment_distribution_scheme->pic_timer module~mqc_mbe_fragment_distribution_scheme->pic_types module~mqc_calc_types->pic_types module~mqc_calculation_defaults->pic_types module~mqc_config_adapter->pic_logger module~mqc_config_adapter->module~mqc_method_config module~mqc_config_adapter->module~mqc_physical_fragment module~mqc_config_adapter->pic_types module~mqc_calculation_keywords mqc_calculation_keywords module~mqc_config_adapter->module~mqc_calculation_keywords module~mqc_config_parser mqc_config_parser module~mqc_config_adapter->module~mqc_config_parser module~mqc_elements mqc_elements module~mqc_config_adapter->module~mqc_elements module~mqc_error mqc_error module~mqc_config_adapter->module~mqc_error module~mqc_group_batching->pic_io module~mqc_group_batching->pic_logger module~mqc_group_batching->module~mqc_mpi_tags module~mqc_group_batching->module~mqc_result_types module~mqc_group_batching->pic_mpi_lib module~mqc_group_batching->pic_timer module~mqc_group_batching->pic_types module~mqc_group_shard_io->module~mqc_mpi_tags module~mqc_group_shard_io->pic_mpi_lib module~mqc_group_shard_io->pic_types module~mqc_json_output_types->module~mqc_thermochemistry module~mqc_json_output_types->pic_types module~mqc_mbe->pic_io module~mqc_mbe->pic_logger module~mqc_mbe->module~mqc_json_output_types module~mqc_mbe->module~mqc_mbe_io module~mqc_mbe->module~mqc_mpi_tags module~mqc_mbe->module~mqc_physical_fragment module~mqc_mbe->module~mqc_program_limits module~mqc_mbe->module~mqc_thermochemistry module~mqc_mbe->module~mqc_vibrational_analysis module~mqc_mbe->pic_mpi_lib module~mqc_mbe->pic_timer module~mqc_mbe->pic_types module~mqc_frag_utils mqc_frag_utils module~mqc_mbe->module~mqc_frag_utils module~mqc_gmbe_utils mqc_gmbe_utils module~mqc_mbe->module~mqc_gmbe_utils module~mqc_mbe_io->pic_io module~mqc_mbe_io->pic_logger module~mqc_mbe_io->module~mqc_physical_fragment module~mqc_mbe_io->pic_types module~mqc_mbe_io->module~mqc_elements module~mqc_method_base->module~mqc_physical_fragment module~mqc_method_base->module~mqc_result_types module~mqc_method_base->pic_types module~mqc_method_config->module~mqc_method_types module~mqc_method_config->pic_types module~mqc_method_factory->module~mqc_method_base module~mqc_method_factory->module~mqc_method_config module~mqc_method_factory->module~mqc_method_types module~mqc_method_factory->pic_types mctc_env mctc_env module~mqc_method_factory->mctc_env module~mqc_method_dft mqc_method_dft module~mqc_method_factory->module~mqc_method_dft module~mqc_method_hf mqc_method_hf module~mqc_method_factory->module~mqc_method_hf module~mqc_method_mcscf mqc_method_mcscf module~mqc_method_factory->module~mqc_method_mcscf module~mqc_method_xtb mqc_method_xtb module~mqc_method_factory->module~mqc_method_xtb module~mqc_method_types->pic_types module~mqc_mpi_tags->pic_types module~mqc_physical_fragment->pic_types module~mqc_cgto mqc_cgto module~mqc_physical_fragment->module~mqc_cgto module~mqc_physical_fragment->module~mqc_elements module~mqc_physical_fragment->module~mqc_error module~mqc_geometry mqc_geometry module~mqc_physical_fragment->module~mqc_geometry module~mqc_physical_constants mqc_physical_constants module~mqc_physical_fragment->module~mqc_physical_constants module~mqc_xyz_reader mqc_xyz_reader module~mqc_physical_fragment->module~mqc_xyz_reader module~mqc_program_limits->pic_types module~mqc_mpi_comms mqc_mpi_comms module~mqc_resources->module~mqc_mpi_comms module~mqc_result_types->pic_mpi_lib module~mqc_result_types->pic_types module~mqc_result_types->module~mqc_error module~mqc_thermochemistry->pic_io module~mqc_thermochemistry->pic_logger module~mqc_thermochemistry->pic_types module~mqc_thermochemistry->module~mqc_elements module~mqc_thermochemistry->module~mqc_physical_constants pic_lapack_interfaces pic_lapack_interfaces module~mqc_thermochemistry->pic_lapack_interfaces module~mqc_vibrational_analysis->pic_logger module~mqc_vibrational_analysis->module~mqc_thermochemistry module~mqc_vibrational_analysis->pic_types module~mqc_vibrational_analysis->module~mqc_elements module~mqc_vibrational_analysis->module~mqc_physical_constants module~mqc_vibrational_analysis->pic_lapack_interfaces module~mqc_work_queue->pic_types module~mqc_calculation_keywords->module~mqc_calculation_defaults module~mqc_calculation_keywords->pic_types module~mqc_cgto->pic_types module~mqc_config_parser->module~mqc_calc_types module~mqc_config_parser->module~mqc_calculation_defaults module~mqc_config_parser->module~mqc_method_types module~mqc_config_parser->module~mqc_physical_fragment module~mqc_config_parser->pic_types module~mqc_config_parser->module~mqc_error module~mqc_config_parser->module~mqc_geometry module~mqc_elements->pic_types pic_ascii pic_ascii module~mqc_elements->pic_ascii module~mqc_frag_utils->pic_io module~mqc_frag_utils->pic_logger module~mqc_frag_utils->module~mqc_physical_fragment module~mqc_frag_utils->pic_types module~mqc_frag_utils->module~mqc_gmbe_utils module~mqc_combinatorics mqc_combinatorics module~mqc_frag_utils->module~mqc_combinatorics module~mqc_fragment_lookup mqc_fragment_lookup module~mqc_frag_utils->module~mqc_fragment_lookup module~mqc_geometry->pic_types module~mqc_gmbe_utils->pic_io module~mqc_gmbe_utils->pic_logger module~mqc_gmbe_utils->module~mqc_physical_fragment module~mqc_gmbe_utils->module~mqc_result_types module~mqc_gmbe_utils->pic_types module~mqc_gmbe_utils->module~mqc_error module~mqc_gmbe_utils->module~mqc_combinatorics module~mqc_method_dft->module~mqc_method_base module~mqc_method_dft->module~mqc_physical_fragment module~mqc_method_dft->module~mqc_result_types module~mqc_method_dft->pic_types module~mqc_method_hf->module~mqc_method_base module~mqc_method_hf->module~mqc_physical_fragment module~mqc_method_hf->module~mqc_result_types module~mqc_method_hf->pic_types module~mqc_method_mcscf->module~mqc_method_base module~mqc_method_mcscf->module~mqc_physical_fragment module~mqc_method_mcscf->module~mqc_result_types module~mqc_method_mcscf->pic_types module~mqc_method_xtb->pic_logger module~mqc_method_xtb->module~mqc_method_base module~mqc_method_xtb->module~mqc_physical_fragment module~mqc_method_xtb->module~mqc_result_types module~mqc_method_xtb->pic_timer module~mqc_method_xtb->pic_types module~mqc_method_xtb->mctc_env module~mqc_method_xtb->module~mqc_error mctc_io mctc_io module~mqc_method_xtb->mctc_io tblite_container tblite_container module~mqc_method_xtb->tblite_container tblite_context_type tblite_context_type module~mqc_method_xtb->tblite_context_type tblite_solvation tblite_solvation module~mqc_method_xtb->tblite_solvation tblite_wavefunction tblite_wavefunction module~mqc_method_xtb->tblite_wavefunction tblite_xtb_calculator tblite_xtb_calculator module~mqc_method_xtb->tblite_xtb_calculator tblite_xtb_gfn1 tblite_xtb_gfn1 module~mqc_method_xtb->tblite_xtb_gfn1 tblite_xtb_gfn2 tblite_xtb_gfn2 module~mqc_method_xtb->tblite_xtb_gfn2 tblite_xtb_singlepoint tblite_xtb_singlepoint module~mqc_method_xtb->tblite_xtb_singlepoint module~mqc_mpi_comms->pic_mpi_lib module~mqc_physical_constants->pic_types module~mqc_xyz_reader->pic_types module~mqc_xyz_reader->module~mqc_error module~mqc_xyz_reader->module~mqc_geometry module~mqc_combinatorics->pic_types module~mqc_fragment_lookup->pic_types module~mqc_fragment_lookup->module~mqc_error pic_hash_32bit pic_hash_32bit module~mqc_fragment_lookup->pic_hash_32bit pic_sorting pic_sorting module~mqc_fragment_lookup->pic_sorting

Run distributed GMBE calculation

Type Bound

gmbe_context_t

Arguments

Type IntentOptional Attributes Name
class(gmbe_context_t), intent(inout) :: this
type(json_output_data_t), intent(out), optional :: json_data

Calls

proc~~gmbe_run_distributed~~CallsGraph proc~gmbe_run_distributed gmbe_context_t%gmbe_run_distributed error error proc~gmbe_run_distributed->error interface~node_coordinator node_coordinator proc~gmbe_run_distributed->interface~node_coordinator interface~node_worker node_worker proc~gmbe_run_distributed->interface~node_worker leader leader proc~gmbe_run_distributed->leader omp_get_max_threads omp_get_max_threads proc~gmbe_run_distributed->omp_get_max_threads omp_set_num_threads omp_set_num_threads proc~gmbe_run_distributed->omp_set_num_threads proc~gmbe_group_global_coordinator gmbe_group_global_coordinator proc~gmbe_run_distributed->proc~gmbe_group_global_coordinator proc~gmbe_pie_coordinator gmbe_pie_coordinator proc~gmbe_run_distributed->proc~gmbe_pie_coordinator proc~mbe_base_has_mpi many_body_expansion_t%mbe_base_has_mpi proc~gmbe_run_distributed->proc~mbe_base_has_mpi to_char to_char proc~gmbe_run_distributed->to_char verbose verbose proc~gmbe_run_distributed->verbose proc~node_coordinator node_coordinator interface~node_coordinator->proc~node_coordinator proc~node_worker node_worker interface~node_worker->proc~node_worker isend isend proc~gmbe_group_global_coordinator->isend proc~flush_group_results flush_group_results proc~gmbe_group_global_coordinator->proc~flush_group_results proc~handle_group_node_requests~2 handle_group_node_requests proc~gmbe_group_global_coordinator->proc~handle_group_node_requests~2 proc~handle_local_worker_requests_group~2 handle_local_worker_requests_group proc~gmbe_group_global_coordinator->proc~handle_local_worker_requests_group~2 proc~handle_local_worker_results_to_batch handle_local_worker_results_to_batch proc~gmbe_group_global_coordinator->proc~handle_local_worker_results_to_batch proc~handle_node_results_to_batch handle_node_results_to_batch proc~gmbe_group_global_coordinator->proc~handle_node_results_to_batch proc~queue_init_from_list queue_init_from_list proc~gmbe_group_global_coordinator->proc~queue_init_from_list proc~queue_is_empty queue_is_empty proc~gmbe_group_global_coordinator->proc~queue_is_empty proc~receive_group_assignment_matrix receive_group_assignment_matrix proc~gmbe_group_global_coordinator->proc~receive_group_assignment_matrix proc~gmbe_pie_coordinator->error proc~gmbe_pie_coordinator->to_char proc~gmbe_pie_coordinator->verbose abort_comm abort_comm proc~gmbe_pie_coordinator->abort_comm cart_disp cart_disp proc~gmbe_pie_coordinator->cart_disp configuration configuration proc~gmbe_pie_coordinator->configuration fc_mdyne fc_mdyne proc~gmbe_pie_coordinator->fc_mdyne force_constants force_constants proc~gmbe_pie_coordinator->force_constants frequencies frequencies proc~gmbe_pie_coordinator->frequencies get_elapsed_time get_elapsed_time proc~gmbe_pie_coordinator->get_elapsed_time info info proc~gmbe_pie_coordinator->info proc~build_fragment_from_atom_list build_fragment_from_atom_list proc~gmbe_pie_coordinator->proc~build_fragment_from_atom_list proc~compute_thermochemistry compute_thermochemistry proc~gmbe_pie_coordinator->proc~compute_thermochemistry proc~compute_vibrational_analysis compute_vibrational_analysis proc~gmbe_pie_coordinator->proc~compute_vibrational_analysis proc~energy_total energy_t%energy_total proc~gmbe_pie_coordinator->proc~energy_total proc~fragment_destroy physical_fragment_t%fragment_destroy proc~gmbe_pie_coordinator->proc~fragment_destroy proc~gmbe_pie_coordinator->proc~handle_group_node_requests~2 proc~handle_group_results handle_group_results proc~gmbe_pie_coordinator->proc~handle_group_results proc~gmbe_pie_coordinator->proc~handle_local_worker_requests_group~2 proc~handle_local_worker_results~2 handle_local_worker_results proc~gmbe_pie_coordinator->proc~handle_local_worker_results~2 proc~handle_node_results~2 handle_node_results proc~gmbe_pie_coordinator->proc~handle_node_results~2 proc~print_vibrational_analysis print_vibrational_analysis proc~gmbe_pie_coordinator->proc~print_vibrational_analysis proc~gmbe_pie_coordinator->proc~queue_init_from_list proc~gmbe_pie_coordinator->proc~queue_is_empty proc~redistribute_cap_dipole_derivatives redistribute_cap_dipole_derivatives proc~gmbe_pie_coordinator->proc~redistribute_cap_dipole_derivatives proc~redistribute_cap_gradients redistribute_cap_gradients proc~gmbe_pie_coordinator->proc~redistribute_cap_gradients proc~redistribute_cap_hessian redistribute_cap_hessian proc~gmbe_pie_coordinator->proc~redistribute_cap_hessian proc~send_group_assignment_matrix send_group_assignment_matrix proc~gmbe_pie_coordinator->proc~send_group_assignment_matrix reduced_masses reduced_masses proc~gmbe_pie_coordinator->reduced_masses start start proc~gmbe_pie_coordinator->start temp_ids temp_ids proc~gmbe_pie_coordinator->temp_ids proc~add_hydrogen_caps add_hydrogen_caps proc~build_fragment_from_atom_list->proc~add_hydrogen_caps proc~check_duplicate_atoms check_duplicate_atoms proc~build_fragment_from_atom_list->proc~check_duplicate_atoms proc~count_hydrogen_caps count_hydrogen_caps proc~build_fragment_from_atom_list->proc~count_hydrogen_caps proc~error_add_context error_t%error_add_context proc~build_fragment_from_atom_list->proc~error_add_context proc~error_has_error error_t%error_has_error proc~build_fragment_from_atom_list->proc~error_has_error proc~fragment_compute_nelec physical_fragment_t%fragment_compute_nelec proc~build_fragment_from_atom_list->proc~fragment_compute_nelec proc~compute_electronic_entropy compute_electronic_entropy proc~compute_thermochemistry->proc~compute_electronic_entropy proc~compute_moments_of_inertia compute_moments_of_inertia proc~compute_thermochemistry->proc~compute_moments_of_inertia proc~compute_partition_functions compute_partition_functions proc~compute_thermochemistry->proc~compute_partition_functions proc~compute_rotational_constants compute_rotational_constants proc~compute_thermochemistry->proc~compute_rotational_constants proc~compute_rotational_thermo compute_rotational_thermo proc~compute_thermochemistry->proc~compute_rotational_thermo proc~compute_translational_thermo compute_translational_thermo proc~compute_thermochemistry->proc~compute_translational_thermo proc~compute_vibrational_thermo compute_vibrational_thermo proc~compute_thermochemistry->proc~compute_vibrational_thermo proc~compute_zpe compute_zpe proc~compute_thermochemistry->proc~compute_zpe proc~compute_cartesian_displacements compute_cartesian_displacements proc~compute_vibrational_analysis->proc~compute_cartesian_displacements proc~compute_force_constants compute_force_constants proc~compute_vibrational_analysis->proc~compute_force_constants proc~compute_ir_intensities compute_ir_intensities proc~compute_vibrational_analysis->proc~compute_ir_intensities proc~compute_reduced_masses compute_reduced_masses proc~compute_vibrational_analysis->proc~compute_reduced_masses proc~compute_vibrational_frequencies compute_vibrational_frequencies proc~compute_vibrational_analysis->proc~compute_vibrational_frequencies proc~mp2_total mp2_energy_t%mp2_total proc~energy_total->proc~mp2_total proc~flush_group_results->isend proc~result_destroy calculation_result_t%result_destroy proc~flush_group_results->proc~result_destroy proc~result_isend result_isend proc~flush_group_results->proc~result_isend proc~basis_set_destroy molecular_basis_type%basis_set_destroy proc~fragment_destroy->proc~basis_set_destroy proc~handle_group_node_requests~2->isend iprobe iprobe proc~handle_group_node_requests~2->iprobe irecv irecv proc~handle_group_node_requests~2->irecv proc~queue_pop queue_pop proc~handle_group_node_requests~2->proc~queue_pop proc~send_pie_term_payload send_pie_term_payload proc~handle_group_node_requests~2->proc~send_pie_term_payload proc~handle_group_results->error proc~handle_group_results->to_char proc~handle_group_results->abort_comm proc~handle_group_results->get_elapsed_time proc~handle_group_results->info proc~handle_group_results->iprobe proc~handle_group_results->irecv proc~error_get_message error_t%error_get_message proc~handle_group_results->proc~error_get_message proc~result_irecv result_irecv proc~handle_group_results->proc~result_irecv recv recv proc~handle_group_results->recv proc~handle_local_worker_requests_group~2->isend proc~handle_local_worker_requests_group~2->iprobe proc~handle_local_worker_requests_group~2->irecv proc~handle_local_worker_requests_group~2->proc~queue_pop proc~handle_local_worker_requests_group~2->proc~send_pie_term_payload proc~handle_local_worker_results_to_batch->error proc~handle_local_worker_results_to_batch->to_char proc~handle_local_worker_results_to_batch->abort_comm proc~handle_local_worker_results_to_batch->proc~flush_group_results proc~handle_local_worker_results_to_batch->iprobe proc~append_result_to_batch append_result_to_batch proc~handle_local_worker_results_to_batch->proc~append_result_to_batch proc~handle_local_worker_results_to_batch->proc~error_get_message proc~handle_local_worker_results_to_batch->proc~result_destroy proc~handle_local_worker_results_to_batch->proc~result_irecv proc~handle_local_worker_results~2->error proc~handle_local_worker_results~2->to_char proc~handle_local_worker_results~2->abort_comm proc~handle_local_worker_results~2->get_elapsed_time proc~handle_local_worker_results~2->info proc~handle_local_worker_results~2->iprobe proc~handle_local_worker_results~2->proc~error_get_message proc~handle_local_worker_results~2->proc~result_irecv proc~handle_node_results_to_batch->error proc~handle_node_results_to_batch->to_char proc~handle_node_results_to_batch->abort_comm proc~handle_node_results_to_batch->proc~flush_group_results proc~handle_node_results_to_batch->iprobe proc~handle_node_results_to_batch->irecv proc~handle_node_results_to_batch->proc~append_result_to_batch proc~handle_node_results_to_batch->proc~error_get_message proc~handle_node_results_to_batch->proc~result_destroy proc~handle_node_results_to_batch->proc~result_irecv proc~handle_node_results~2->error proc~handle_node_results~2->to_char proc~handle_node_results~2->abort_comm proc~handle_node_results~2->get_elapsed_time proc~handle_node_results~2->info proc~handle_node_results~2->iprobe proc~handle_node_results~2->irecv proc~handle_node_results~2->proc~error_get_message proc~handle_node_results~2->proc~result_irecv proc~node_coordinator->error proc~node_coordinator->abort_comm comm_world comm_world proc~node_coordinator->comm_world proc~node_coordinator_impl node_coordinator_impl proc~node_coordinator->proc~node_coordinator_impl proc~node_worker->error proc~node_worker->abort_comm proc~node_worker->comm_world proc~node_worker_impl node_worker_impl proc~node_worker->proc~node_worker_impl proc~print_vibrational_analysis->info proc~print_vibrational_analysis->proc~compute_thermochemistry proc~element_number_to_symbol element_number_to_symbol proc~print_vibrational_analysis->proc~element_number_to_symbol proc~print_thermochemistry print_thermochemistry proc~print_vibrational_analysis->proc~print_thermochemistry warning warning proc~print_vibrational_analysis->warning proc~receive_group_assignment_matrix->irecv proc~receive_group_assignment_matrix->recv proc~send_group_assignment_matrix->isend proc~atomic_basis_destroy atomic_basis_type%atomic_basis_destroy proc~basis_set_destroy->proc~atomic_basis_destroy proc~check_duplicate_atoms->error proc~check_duplicate_atoms->to_char proc~check_duplicate_atoms->proc~element_number_to_symbol proc~error_set error_t%error_set proc~check_duplicate_atoms->proc~error_set proc~element_mass element_mass proc~compute_cartesian_displacements->proc~element_mass proc~compute_ir_intensities->proc~element_mass proc~compute_moments_of_inertia->to_char proc~compute_moments_of_inertia->warning pic_syev pic_syev proc~compute_moments_of_inertia->pic_syev proc~compute_moments_of_inertia->proc~element_mass proc~compute_reduced_masses->proc~element_mass proc~compute_vibrational_frequencies->error proc~compute_vibrational_frequencies->warning proc~compute_vibrational_frequencies->pic_syev proc~mass_weight_hessian mass_weight_hessian proc~compute_vibrational_frequencies->proc~mass_weight_hessian proc~project_translation_rotation project_translation_rotation proc~compute_vibrational_frequencies->proc~project_translation_rotation proc~compute_zpe->to_char proc~compute_zpe->warning proc~node_coordinator_impl->error proc~node_coordinator_impl->to_char proc~node_coordinator_impl->abort_comm proc~node_coordinator_impl->isend proc~node_coordinator_impl->iprobe proc~node_coordinator_impl->irecv proc~node_coordinator_impl->proc~error_get_message proc~node_coordinator_impl->proc~result_irecv proc~node_coordinator_impl->proc~result_isend proc~node_coordinator_impl->recv proc~get_group_leader_rank get_group_leader_rank proc~node_coordinator_impl->proc~get_group_leader_rank proc~group_global_coordinator_impl group_global_coordinator_impl proc~node_coordinator_impl->proc~group_global_coordinator_impl proc~node_worker_impl->error proc~node_worker_impl->to_char proc~node_worker_impl->abort_comm proc~node_worker_impl->isend proc~node_worker_impl->proc~build_fragment_from_atom_list proc~node_worker_impl->proc~fragment_destroy proc~node_worker_impl->irecv proc~node_worker_impl->proc~error_has_error proc~node_worker_impl->proc~result_isend proc~node_worker_impl->recv interface~do_fragment_work do_fragment_work proc~node_worker_impl->interface~do_fragment_work proc~build_fragment_from_indices build_fragment_from_indices proc~node_worker_impl->proc~build_fragment_from_indices proc~error_get_full_trace error_t%error_get_full_trace proc~node_worker_impl->proc~error_get_full_trace proc~mbe_base_has_geometry many_body_expansion_t%mbe_base_has_geometry proc~node_worker_impl->proc~mbe_base_has_geometry proc~print_thermochemistry->info proc~result_reset calculation_result_t%result_reset proc~result_destroy->proc~result_reset proc~result_irecv->irecv proc~result_irecv->recv proc~result_isend->isend send send proc~result_isend->send proc~send_pie_term_payload->isend proc~do_fragment_work do_fragment_work interface~do_fragment_work->proc~do_fragment_work proc~cgto_destroy cgto_type%cgto_destroy proc~atomic_basis_destroy->proc~cgto_destroy proc~build_fragment_from_indices->proc~add_hydrogen_caps proc~build_fragment_from_indices->proc~check_duplicate_atoms proc~build_fragment_from_indices->proc~count_hydrogen_caps proc~build_fragment_from_indices->proc~error_add_context proc~build_fragment_from_indices->proc~error_has_error proc~build_fragment_from_indices->proc~fragment_compute_nelec proc~calculate_monomer_distance calculate_monomer_distance proc~build_fragment_from_indices->proc~calculate_monomer_distance proc~error_get_full_trace->proc~error_has_error proc~group_global_coordinator_impl->error proc~group_global_coordinator_impl->abort_comm proc~group_global_coordinator_impl->isend proc~group_global_coordinator_impl->proc~flush_group_results proc~group_global_coordinator_impl->proc~handle_local_worker_results_to_batch proc~group_global_coordinator_impl->proc~handle_node_results_to_batch proc~group_global_coordinator_impl->proc~queue_init_from_list proc~group_global_coordinator_impl->proc~queue_is_empty proc~group_global_coordinator_impl->proc~receive_group_assignment_matrix proc~group_global_coordinator_impl->proc~get_group_leader_rank proc~handle_group_node_requests handle_group_node_requests proc~group_global_coordinator_impl->proc~handle_group_node_requests proc~handle_local_worker_requests_group handle_local_worker_requests_group proc~group_global_coordinator_impl->proc~handle_local_worker_requests_group proc~queue_destroy queue_destroy proc~group_global_coordinator_impl->proc~queue_destroy proc~mass_weight_hessian->proc~element_mass proc~project_translation_rotation->proc~element_mass pic_gesvd pic_gesvd proc~project_translation_rotation->pic_gesvd proc~energy_reset energy_t%energy_reset proc~result_reset->proc~energy_reset proc~error_clear error_t%error_clear proc~result_reset->proc~error_clear

Source Code

   subroutine gmbe_run_distributed(this, json_data)
      !! Run distributed GMBE calculation
      use mqc_gmbe_fragment_distribution_scheme, only: gmbe_pie_coordinator, gmbe_group_global_coordinator
      use mqc_mbe_fragment_distribution_scheme, only: node_coordinator, node_worker
      use pic_logger, only: logger => global_logger
      use pic_io, only: to_char
      use omp_lib, only: omp_set_num_threads, omp_get_max_threads

      class(gmbe_context_t), intent(inout) :: this
      type(json_output_data_t), intent(out), optional :: json_data

      if (.not. this%has_mpi()) then
         call logger%error("gmbe_run_distributed: resources not set in context")
         return
      end if

      ! Determine role based on MPI rank
      if (this%resources%mpi_comms%world_comm%leader() .and. &
          this%resources%mpi_comms%node_comm%leader()) then
         ! Global coordinator (rank 0, node leader on node 0)
         call omp_set_num_threads(omp_get_max_threads())
         call logger%verbose("Rank 0: Acting as GMBE PIE coordinator")
         call gmbe_pie_coordinator(this%resources, this%pie_atom_sets, this%pie_coefficients, &
                                   this%n_pie_terms, this%node_leader_ranks, this%num_nodes, &
                                   this%group_leader_ranks, this%group_ids, this%global_groups, &
                                   this%sys_geom, this%method_config, this%calc_type, json_data)
      else if (this%resources%mpi_comms%node_comm%leader()) then
         ! Node coordinator (node leader on other nodes)
         call logger%verbose("Rank "//to_char(this%resources%mpi_comms%world_comm%rank())// &
                             ": Acting as node coordinator")
         block
            integer :: i, group_leader_rank
            group_leader_rank = 0
            if (allocated(this%node_leader_ranks) .and. allocated(this%group_leader_ranks)) then
               do i = 1, size(this%node_leader_ranks)
                  if (this%node_leader_ranks(i) == this%resources%mpi_comms%world_comm%rank()) then
                     group_leader_rank = this%group_leader_ranks(i)
                     exit
                  end if
               end do
            end if
            if (group_leader_rank == this%resources%mpi_comms%world_comm%rank()) then
               call gmbe_group_global_coordinator(this%resources, this%node_leader_ranks, this%group_ids)
            else
               ! Note: node_coordinator works for both MBE and GMBE
               call node_coordinator(this)
            end if
         end block
      else
         ! Worker
         call omp_set_num_threads(1)
         call logger%verbose("Rank "//to_char(this%resources%mpi_comms%world_comm%rank())// &
                             ": Acting as worker")
         ! Note: node_worker works for both MBE and GMBE (fragment_type distinguishes)
         call node_worker(this)
      end if
   end subroutine gmbe_run_distributed