mpi_fragment_work_smod Submodule


Uses

  • module~~mpi_fragment_work_smod~~UsesGraph module~mpi_fragment_work_smod mpi_fragment_work_smod module~mqc_error mqc_error module~mpi_fragment_work_smod->module~mqc_error module~mqc_group_batching mqc_group_batching module~mpi_fragment_work_smod->module~mqc_group_batching module~mqc_group_shard_io mqc_group_shard_io module~mpi_fragment_work_smod->module~mqc_group_shard_io module~mqc_mbe_fragment_distribution_scheme mqc_mbe_fragment_distribution_scheme module~mpi_fragment_work_smod->module~mqc_mbe_fragment_distribution_scheme module~mqc_work_queue mqc_work_queue module~mpi_fragment_work_smod->module~mqc_work_queue module~mqc_mpi_tags mqc_mpi_tags module~mqc_group_batching->module~mqc_mpi_tags module~mqc_result_types mqc_result_types module~mqc_group_batching->module~mqc_result_types pic_io pic_io module~mqc_group_batching->pic_io pic_logger pic_logger module~mqc_group_batching->pic_logger pic_mpi_lib pic_mpi_lib module~mqc_group_batching->pic_mpi_lib pic_timer pic_timer module~mqc_group_batching->pic_timer pic_types pic_types 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_mbe_fragment_distribution_scheme->module~mqc_work_queue module~mqc_calc_types mqc_calc_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_calc_types module~mqc_calculation_defaults mqc_calculation_defaults 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_json_output_types mqc_json_output_types 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_method_config mqc_method_config 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_physical_fragment mqc_physical_fragment module~mqc_mbe_fragment_distribution_scheme->module~mqc_physical_fragment module~mqc_program_limits mqc_program_limits 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 omp_lib omp_lib module~mqc_mbe_fragment_distribution_scheme->omp_lib pic_blas_interfaces pic_blas_interfaces module~mqc_mbe_fragment_distribution_scheme->pic_blas_interfaces module~mqc_mbe_fragment_distribution_scheme->pic_io module~mqc_mbe_fragment_distribution_scheme->pic_logger 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_work_queue->pic_types module~mqc_calc_types->pic_types module~mqc_calculation_defaults->pic_types module~mqc_config_adapter->module~mqc_error module~mqc_config_adapter->module~mqc_method_config module~mqc_config_adapter->module~mqc_physical_fragment module~mqc_config_adapter->pic_logger 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_json_output_types->pic_types module~mqc_thermochemistry mqc_thermochemistry module~mqc_json_output_types->module~mqc_thermochemistry 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->pic_io module~mqc_mbe->pic_logger 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->module~mqc_thermochemistry module~mqc_vibrational_analysis mqc_vibrational_analysis module~mqc_mbe->module~mqc_vibrational_analysis module~mqc_mbe_io->module~mqc_physical_fragment module~mqc_mbe_io->pic_io module~mqc_mbe_io->pic_logger 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->module~mqc_error 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_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->module~mqc_error module~mqc_result_types->pic_mpi_lib module~mqc_result_types->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_error 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_geometry module~mqc_elements->pic_types pic_ascii pic_ascii module~mqc_elements->pic_ascii module~mqc_frag_utils->module~mqc_physical_fragment module~mqc_frag_utils->pic_io module~mqc_frag_utils->pic_logger 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->module~mqc_error module~mqc_gmbe_utils->module~mqc_physical_fragment module~mqc_gmbe_utils->module~mqc_result_types module~mqc_gmbe_utils->pic_io module~mqc_gmbe_utils->pic_logger module~mqc_gmbe_utils->pic_types 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->module~mqc_error 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_logger module~mqc_method_xtb->pic_timer module~mqc_method_xtb->pic_types module~mqc_method_xtb->mctc_env 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_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->pic_types module~mqc_vibrational_analysis->module~mqc_elements module~mqc_vibrational_analysis->module~mqc_physical_constants module~mqc_vibrational_analysis->module~mqc_thermochemistry module~mqc_vibrational_analysis->pic_lapack_interfaces module~mqc_xyz_reader->module~mqc_error module~mqc_xyz_reader->pic_types module~mqc_xyz_reader->module~mqc_geometry module~mqc_combinatorics->pic_types module~mqc_fragment_lookup->module~mqc_error module~mqc_fragment_lookup->pic_types pic_hash_32bit pic_hash_32bit module~mqc_fragment_lookup->pic_hash_32bit pic_sorting pic_sorting module~mqc_fragment_lookup->pic_sorting

Subroutines

subroutine build_fragment_payload(fragment_idx, polymers, fragment_type, fragment_size, fragment_indices)

Build fragment payload arrays for a given fragment index. Caller owns the returned fragment_indices and must deallocate it.

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: fragment_idx
integer, intent(in) :: polymers(:,:)
integer(kind=int32), intent(out) :: fragment_type
integer(kind=int32), intent(out) :: fragment_size
integer, intent(out), allocatable :: fragment_indices(:)

subroutine build_fragment_payload_from_row(polymer_row, fragment_type, fragment_size, fragment_indices)

Build fragment payload arrays for a given polymer row. Caller owns the returned fragment_indices and must deallocate it.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: polymer_row(:)
integer(kind=int32), intent(out) :: fragment_type
integer(kind=int32), intent(out) :: fragment_size
integer, intent(out), allocatable :: fragment_indices(:)

subroutine get_group_leader_rank(ctx, node_rank, group_leader_rank, group_id)

Resolve group leader rank and group id for the given node leader rank.

Arguments

Type IntentOptional Attributes Name
class(many_body_expansion_t), intent(in) :: ctx
integer, intent(in) :: node_rank
integer, intent(out) :: group_leader_rank
integer, intent(out) :: group_id

subroutine global_coordinator_impl(ctx, json_data)

Internal implementation of global_coordinator with typed context

Arguments

Type IntentOptional Attributes Name
type(mbe_context_t), intent(in) :: ctx
type(json_output_data_t), intent(out), optional :: json_data

JSON output data

Group-global coordinator for distributing a fragment shard to node coordinators.

Arguments

Type IntentOptional Attributes Name
class(many_body_expansion_t), intent(in) :: ctx

subroutine handle_group_node_requests(ctx, fragment_queue, group_fragment_ids, group_polymers, finished_nodes)

Handle a single pending node coordinator request for a group shard, if any.

Arguments

Type IntentOptional Attributes Name
class(many_body_expansion_t), intent(in) :: ctx
type(queue_t), intent(inout) :: fragment_queue
integer(kind=int64), intent(in) :: group_fragment_ids(:)
integer, intent(in) :: group_polymers(:,:)
integer, intent(inout) :: finished_nodes

subroutine handle_local_worker_requests(ctx, fragment_queue, worker_fragment_map, local_finished_workers)

Handle a single pending local worker request, if any.

Arguments

Type IntentOptional Attributes Name
type(mbe_context_t), intent(in) :: ctx
type(queue_t), intent(inout) :: fragment_queue
integer(kind=int64), intent(inout) :: worker_fragment_map(:)
integer, intent(inout) :: local_finished_workers

subroutine handle_local_worker_requests_group(ctx, fragment_queue, group_fragment_ids, group_polymers, worker_fragment_map, local_finished_workers)

Handle a single pending local worker request for a group shard, if any.

Arguments

Type IntentOptional Attributes Name
class(many_body_expansion_t), intent(in) :: ctx
type(queue_t), intent(inout) :: fragment_queue
integer(kind=int64), intent(in) :: group_fragment_ids(:)
integer, intent(in) :: group_polymers(:,:)
integer(kind=int64), intent(inout) :: worker_fragment_map(:)
integer, intent(inout) :: local_finished_workers

subroutine handle_local_worker_results(ctx, worker_fragment_map, results, results_received, coord_timer)

Drain results from local workers and update tracking state.

Arguments

Type IntentOptional Attributes Name
type(mbe_context_t), intent(in) :: ctx
integer(kind=int64), intent(inout) :: worker_fragment_map(:)
type(calculation_result_t), intent(inout) :: results(:)
integer(kind=int64), intent(inout) :: results_received
type(timer_type), intent(in) :: coord_timer

subroutine handle_node_requests(ctx, fragment_queue, finished_nodes)

Handle a single pending node coordinator request, if any.

Arguments

Type IntentOptional Attributes Name
type(mbe_context_t), intent(in) :: ctx
type(queue_t), intent(inout) :: fragment_queue
integer, intent(inout) :: finished_nodes

subroutine handle_node_results(ctx, results, results_received, coord_timer)

Drain results from remote node coordinators and update tracking state.

Arguments

Type IntentOptional Attributes Name
type(mbe_context_t), intent(in) :: ctx
type(calculation_result_t), intent(inout) :: results(:)
integer(kind=int64), intent(inout) :: results_received
type(timer_type), intent(in) :: coord_timer

subroutine node_coordinator_impl(ctx)

Internal implementation of node_coordinator with typed context

Arguments

Type IntentOptional Attributes Name
class(many_body_expansion_t), intent(in) :: ctx

subroutine node_worker_impl(ctx)

Internal implementation of node_worker with typed context

Arguments

Type IntentOptional Attributes Name
class(many_body_expansion_t), intent(in) :: ctx

subroutine send_fragment_payload(comm, tag, fragment_idx, polymers, dest_rank)

Send fragment payload over the specified communicator/tag. Uses int64 for fragment_idx to handle large fragment indices.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
integer, intent(in) :: tag
integer(kind=int64), intent(in) :: fragment_idx
integer, intent(in) :: polymers(:,:)
integer, intent(in) :: dest_rank

subroutine send_fragment_payload_from_row(comm, tag, fragment_idx, polymer_row, dest_rank)

Send fragment payload over the specified communicator/tag using a polymer row.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
integer, intent(in) :: tag
integer(kind=int64), intent(in) :: fragment_idx
integer, intent(in) :: polymer_row(:)
integer, intent(in) :: dest_rank

subroutine send_fragment_to_node(world_comm, fragment_idx, polymers, dest_rank)

Send fragment data to remote node coordinator Uses int64 for fragment_idx to handle large fragment indices that overflow int32.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: world_comm
integer(kind=int64), intent(in) :: fragment_idx
integer, intent(in) :: polymers(:,:)
integer, intent(in) :: dest_rank

subroutine send_fragment_to_worker(node_comm, fragment_idx, polymers, dest_rank)

Send fragment data to local worker Uses int64 for fragment_idx to handle large fragment indices that overflow int32.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: node_comm
integer(kind=int64), intent(in) :: fragment_idx
integer, intent(in) :: polymers(:,:)
integer, intent(in) :: dest_rank

Module Subroutines

module subroutine do_fragment_work(fragment_idx, result, method_config, phys_frag, calc_type, world_comm)

Process a single fragment for quantum chemistry calculation

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: fragment_idx

Fragment index for identification

type(calculation_result_t), intent(out) :: result

Computation results

type(method_config_t), intent(in) :: method_config

Method configuration

type(physical_fragment_t), intent(in), optional :: phys_frag

Fragment geometry

integer(kind=int32), intent(in) :: calc_type

Calculation type

type(comm_t), intent(in), optional :: world_comm

MPI communicator for abort

module subroutine global_coordinator(ctx, json_data)

Global coordinator for distributing fragments to node coordinators will act as a node coordinator for a single node calculation Uses int64 for total_fragments to handle large fragment counts that overflow int32. Bond connectivity is accessed via ctx%sys_geom%bonds

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: ctx
type(json_output_data_t), intent(out), optional :: json_data

JSON output data

module subroutine node_coordinator(ctx)

Node coordinator for distributing fragments to local workers Handles work requests and result collection from local workers

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: ctx

module subroutine node_worker(ctx)

Node worker for processing fragments assigned by node coordinator Bond connectivity is accessed via ctx%sys_geom%bonds

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: ctx