distributed_unfragmented_hessian Module Subroutine

module subroutine distributed_unfragmented_hessian(world_comm, sys_geom, config, json_data)

Uses

  • proc~~distributed_unfragmented_hessian~~UsesGraph proc~distributed_unfragmented_hessian distributed_unfragmented_hessian module~mqc_json_output_types mqc_json_output_types proc~distributed_unfragmented_hessian->module~mqc_json_output_types module~mqc_thermochemistry mqc_thermochemistry module~mqc_json_output_types->module~mqc_thermochemistry pic_types pic_types module~mqc_json_output_types->pic_types module~mqc_thermochemistry->pic_types module~mqc_elements mqc_elements module~mqc_thermochemistry->module~mqc_elements module~mqc_physical_constants mqc_physical_constants module~mqc_thermochemistry->module~mqc_physical_constants pic_io pic_io module~mqc_thermochemistry->pic_io pic_lapack_interfaces pic_lapack_interfaces module~mqc_thermochemistry->pic_lapack_interfaces pic_logger pic_logger module~mqc_thermochemistry->pic_logger module~mqc_elements->pic_types pic_ascii pic_ascii module~mqc_elements->pic_ascii module~mqc_physical_constants->pic_types

Compute Hessian for unfragmented system using MPI distribution

Uses a dynamic work queue approach: workers request displacement indices from rank 0, compute gradients, and send results back. This provides better load balancing than static work distribution.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: world_comm
type(system_geometry_t), intent(in) :: sys_geom
type(driver_config_t), intent(in) :: config

Driver configuration

type(json_output_data_t), intent(out), optional :: json_data

JSON output data


Calls

proc~~distributed_unfragmented_hessian~~CallsGraph proc~distributed_unfragmented_hessian distributed_unfragmented_hessian barrier barrier proc~distributed_unfragmented_hessian->barrier interface~hessian_coordinator hessian_coordinator proc~distributed_unfragmented_hessian->interface~hessian_coordinator interface~hessian_worker hessian_worker proc~distributed_unfragmented_hessian->interface~hessian_worker proc~hessian_coordinator hessian_coordinator interface~hessian_coordinator->proc~hessian_coordinator proc~hessian_worker hessian_worker interface~hessian_worker->proc~hessian_worker calc_gradient calc_gradient proc~hessian_coordinator->calc_gradient cart_disp cart_disp proc~hessian_coordinator->cart_disp configuration configuration proc~hessian_coordinator->configuration error error proc~hessian_coordinator->error fc_mdyne fc_mdyne proc~hessian_coordinator->fc_mdyne force_constants force_constants proc~hessian_coordinator->force_constants get_elapsed_time get_elapsed_time proc~hessian_coordinator->get_elapsed_time info info proc~hessian_coordinator->info iprobe iprobe proc~hessian_coordinator->iprobe ir_intensities ir_intensities proc~hessian_coordinator->ir_intensities irecv irecv proc~hessian_coordinator->irecv isend isend proc~hessian_coordinator->isend proc~compute_thermochemistry compute_thermochemistry proc~hessian_coordinator->proc~compute_thermochemistry proc~compute_vibrational_analysis compute_vibrational_analysis proc~hessian_coordinator->proc~compute_vibrational_analysis proc~compute_vibrational_frequencies compute_vibrational_frequencies proc~hessian_coordinator->proc~compute_vibrational_frequencies proc~create_method create_method proc~hessian_coordinator->proc~create_method proc~energy_total energy_t%energy_total proc~hessian_coordinator->proc~energy_total proc~finite_diff_dipole_derivatives finite_diff_dipole_derivatives proc~hessian_coordinator->proc~finite_diff_dipole_derivatives proc~finite_diff_hessian_from_gradients finite_diff_hessian_from_gradients proc~hessian_coordinator->proc~finite_diff_hessian_from_gradients proc~fragment_compute_nelec physical_fragment_t%fragment_compute_nelec proc~hessian_coordinator->proc~fragment_compute_nelec proc~populate_unfragmented_json_data populate_unfragmented_json_data proc~hessian_coordinator->proc~populate_unfragmented_json_data proc~populate_vibrational_json_data populate_vibrational_json_data proc~hessian_coordinator->proc~populate_vibrational_json_data proc~print_vibrational_analysis print_vibrational_analysis proc~hessian_coordinator->proc~print_vibrational_analysis proc~result_destroy calculation_result_t%result_destroy proc~hessian_coordinator->proc~result_destroy recv recv proc~hessian_coordinator->recv reduced_masses reduced_masses proc~hessian_coordinator->reduced_masses start start proc~hessian_coordinator->start to_char to_char proc~hessian_coordinator->to_char vib_freqs vib_freqs proc~hessian_coordinator->vib_freqs abort_comm abort_comm proc~hessian_worker->abort_comm proc~hessian_worker->calc_gradient proc~hessian_worker->error proc~hessian_worker->irecv proc~hessian_worker->isend proc~copy_and_displace_geometry copy_and_displace_geometry proc~hessian_worker->proc~copy_and_displace_geometry proc~hessian_worker->proc~create_method proc~error_get_message error_t%error_get_message proc~hessian_worker->proc~error_get_message proc~hessian_worker->proc~fragment_compute_nelec proc~hessian_worker->proc~result_destroy send send proc~hessian_worker->send proc~hessian_worker->to_char 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_vibrational_analysis->proc~compute_vibrational_frequencies 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->error pic_syev pic_syev 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 warning warning proc~compute_vibrational_frequencies->warning proc~factory_create method_factory_t%factory_create proc~create_method->proc~factory_create proc~mp2_total mp2_energy_t%mp2_total proc~energy_total->proc~mp2_total proc~populate_unfragmented_json_data->proc~energy_total proc~populate_vibrational_json_data->proc~energy_total 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 proc~print_vibrational_analysis->warning proc~result_reset calculation_result_t%result_reset proc~result_destroy->proc~result_reset 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->pic_syev proc~compute_moments_of_inertia->warning proc~compute_moments_of_inertia->proc~element_mass proc~compute_reduced_masses->proc~element_mass proc~compute_zpe->to_char proc~compute_zpe->warning proc~configure_dft configure_dft proc~factory_create->proc~configure_dft proc~configure_hf configure_hf proc~factory_create->proc~configure_hf proc~configure_mcscf configure_mcscf proc~factory_create->proc~configure_mcscf proc~configure_xtb configure_xtb proc~factory_create->proc~configure_xtb proc~mass_weight_hessian->proc~element_mass proc~print_thermochemistry->info pic_gesvd pic_gesvd proc~project_translation_rotation->pic_gesvd proc~project_translation_rotation->proc~element_mass 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

Called by

proc~~distributed_unfragmented_hessian~~CalledByGraph proc~distributed_unfragmented_hessian distributed_unfragmented_hessian interface~distributed_unfragmented_hessian distributed_unfragmented_hessian interface~distributed_unfragmented_hessian->proc~distributed_unfragmented_hessian proc~run_unfragmented_calculation run_unfragmented_calculation proc~run_unfragmented_calculation->interface~distributed_unfragmented_hessian proc~run_calculation run_calculation proc~run_calculation->proc~run_unfragmented_calculation proc~compute_energy_and_forces compute_energy_and_forces proc~compute_energy_and_forces->proc~run_calculation proc~run_multi_molecule_calculations run_multi_molecule_calculations proc~run_multi_molecule_calculations->proc~run_calculation program~main main program~main->proc~run_calculation program~main->proc~run_multi_molecule_calculations

Variables

Type Visibility Attributes Name Initial
integer, private :: my_rank
integer, private :: n_ranks

Source Code

   module subroutine distributed_unfragmented_hessian(world_comm, sys_geom, config, json_data)
      !! Compute Hessian for unfragmented system using MPI distribution
      !!
      !! Uses a dynamic work queue approach: workers request displacement indices
      !! from rank 0, compute gradients, and send results back. This provides
      !! better load balancing than static work distribution.
      use mqc_json_output_types, only: json_output_data_t

      type(comm_t), intent(in) :: world_comm
      type(system_geometry_t), intent(in) :: sys_geom
      type(driver_config_t), intent(in) :: config  !! Driver configuration
      type(json_output_data_t), intent(out), optional :: json_data  !! JSON output data

      integer :: my_rank, n_ranks

      my_rank = world_comm%rank()
      n_ranks = world_comm%size()

      if (my_rank == 0) then
         ! Rank 0 is the coordinator
         call hessian_coordinator(world_comm, sys_geom, config, json_data)
      else
         ! Other ranks are workers
         call hessian_worker(world_comm, sys_geom, config)
      end if

      ! Synchronize all ranks before returning
      call world_comm%barrier()

   end subroutine distributed_unfragmented_hessian