chk_free Subroutine

private subroutine chk_free(string, lfree, istat)

Handles the memory errors (including soft limits) during the deallocation

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

Human-readable description string of the deallocation operation, just for output purpose.

integer(kind=ip), intent(in) :: lfree

amount of memory (in bytes) to free

integer(kind=ip), intent(in) :: istat

return flag of deallocate


Calls

proc~~chk_free~~CallsGraph proc~chk_free chk_free proc~fatal_error fatal_error proc~chk_free->proc~fatal_error proc~ommp_message ommp_message proc~fatal_error->proc~ommp_message proc~close_output close_output proc~fatal_error->proc~close_output proc~close_output->proc~ommp_message

Called by

proc~~chk_free~~CalledByGraph proc~chk_free chk_free proc~r_free1 r_free1 proc~r_free1->proc~chk_free proc~i_free2 i_free2 proc~i_free2->proc~chk_free proc~i_free1 i_free1 proc~i_free1->proc~chk_free proc~r_free2 r_free2 proc~r_free2->proc~chk_free proc~r_free3 r_free3 proc~r_free3->proc~chk_free proc~i_free3 i_free3 proc~i_free3->proc~chk_free proc~l_free1 l_free1 proc~l_free1->proc~chk_free proc~l_free2 l_free2 proc~l_free2->proc~chk_free interface~mfree mfree interface~mfree->proc~r_free1 interface~mfree->proc~i_free2 interface~mfree->proc~i_free1 interface~mfree->proc~r_free2 interface~mfree->proc~r_free3 interface~mfree->proc~i_free3 interface~mfree->proc~l_free1 interface~mfree->proc~l_free2 proc~angle_terminate angle_terminate proc~angle_terminate->interface~mfree proc~vdw_set_pair vdw_set_pair proc~vdw_set_pair->interface~mfree proc~nl_terminate nl_terminate proc~nl_terminate->interface~mfree proc~vdw_potential vdw_potential proc~vdw_potential->interface~mfree proc~assign_mpoles assign_mpoles proc~assign_mpoles->interface~mfree proc~mmpol_init_from_mmp mmpol_init_from_mmp proc~mmpol_init_from_mmp->interface~mfree proc~adj_mat_from_conn adj_mat_from_conn proc~mmpol_init_from_mmp->proc~adj_mat_from_conn proc~mmpol_prepare mmpol_prepare proc~mmpol_init_from_mmp->proc~mmpol_prepare proc~electrostatics_terminate electrostatics_terminate proc~electrostatics_terminate->interface~mfree proc~remove_null_pol remove_null_pol proc~remove_null_pol->interface~mfree proc~check_vdw_pairs check_vdw_pairs proc~check_vdw_pairs->interface~mfree proc~bond_terminate bond_terminate proc~bond_terminate->interface~mfree proc~read_atom_cards read_atom_cards proc~read_atom_cards->interface~mfree proc~assign_torsion assign_torsion proc~assign_torsion->interface~mfree proc~assign_torsion->proc~read_atom_cards proc~prepare_fmm_ext_ipd prepare_fmm_ext_ipd proc~prepare_fmm_ext_ipd->interface~mfree proc~pitors_terminate pitors_terminate proc~pitors_terminate->interface~mfree proc~assign_bond assign_bond proc~assign_bond->interface~mfree proc~assign_bond->proc~read_atom_cards proc~opb_terminate opb_terminate proc~opb_terminate->interface~mfree proc~angtor_terminate angtor_terminate proc~angtor_terminate->interface~mfree proc~guess_connectivity guess_connectivity proc~guess_connectivity->interface~mfree proc~guess_connectivity->proc~adj_mat_from_conn proc~nl_update nl_update proc~nl_update->interface~mfree proc~reverse_grp_tab reverse_grp_tab proc~nl_update->proc~reverse_grp_tab proc~link_atom_torsion_geomgrad link_atom_torsion_geomgrad proc~link_atom_torsion_geomgrad->interface~mfree proc~inversion_solver inversion_solver proc~inversion_solver->interface~mfree proc~add_link_atom add_link_atom proc~add_link_atom->interface~mfree proc~polarization polarization proc~polarization->interface~mfree proc~polarization->proc~inversion_solver proc~jacobi_diis_solver jacobi_diis_solver proc~polarization->proc~jacobi_diis_solver proc~conjugate_gradient_solver conjugate_gradient_solver proc~polarization->proc~conjugate_gradient_solver proc~mmpol_ommp_print_summary mmpol_ommp_print_summary proc~mmpol_ommp_print_summary->interface~mfree proc~sort_ivec sort_ivec proc~mmpol_ommp_print_summary->proc~sort_ivec proc~cyclic_spline cyclic_spline proc~cyclic_spline->interface~mfree proc~assign_urey assign_urey proc~assign_urey->interface~mfree proc~assign_urey->proc~read_atom_cards proc~init_eel_for_link_atom init_eel_for_link_atom proc~init_eel_for_link_atom->interface~mfree proc~init_eel_for_link_atom->proc~assign_mpoles proc~init_eel_for_link_atom->proc~remove_null_pol proc~preapare_fmm_static preapare_fmm_static proc~preapare_fmm_static->interface~mfree proc~compress_list compress_list proc~compress_list->interface~mfree proc~adj_mat_from_conn->interface~mfree proc~adj_mat_from_conn->proc~compress_list proc~sort_ivec_inplace sort_ivec_inplace proc~adj_mat_from_conn->proc~sort_ivec_inplace proc~torsion_terminate torsion_terminate proc~torsion_terminate->interface~mfree proc~fmm_make_neigh_list fmm_make_neigh_list proc~fmm_make_neigh_list->interface~mfree proc~fmm_make_neigh_list->proc~compress_list proc~assign_imptorsion assign_imptorsion proc~assign_imptorsion->interface~mfree proc~assign_imptorsion->proc~read_atom_cards proc~assign_opb assign_opb proc~assign_opb->interface~mfree proc~assign_opb->proc~read_atom_cards proc~imptorsion_terminate imptorsion_terminate proc~imptorsion_terminate->interface~mfree proc~topology_terminate topology_terminate proc~topology_terminate->interface~mfree proc~strtor_terminate strtor_terminate proc~strtor_terminate->interface~mfree proc~assign_pitors assign_pitors proc~assign_pitors->interface~mfree proc~assign_pitors->proc~read_atom_cards proc~make_screening_lists make_screening_lists proc~make_screening_lists->interface~mfree proc~make_screening_lists->proc~compress_list proc~make_screening_lists->proc~fmm_make_neigh_list proc~assign_tortors assign_tortors proc~assign_tortors->interface~mfree proc~assign_tortors->proc~read_atom_cards proc~tortor_newmap tortor_newmap proc~assign_tortors->proc~tortor_newmap proc~tortor_terminate tortor_terminate proc~tortor_terminate->interface~mfree proc~sort_ivec->interface~mfree proc~jacobi_diis_solver->interface~mfree proc~diis diis proc~jacobi_diis_solver->proc~diis proc~assign_vdw assign_vdw proc~assign_vdw->interface~mfree proc~assign_vdw->proc~vdw_set_pair proc~assign_vdw->proc~read_atom_cards proc~vdw_init vdw_init proc~assign_vdw->proc~vdw_init proc~assign_strtor assign_strtor proc~assign_strtor->interface~mfree proc~assign_strtor->proc~read_atom_cards proc~link_atom_bond_geomgrad link_atom_bond_geomgrad proc~link_atom_bond_geomgrad->interface~mfree proc~reverse_grp_tab->interface~mfree proc~reverse_grp_tab->proc~compress_list proc~strbnd_terminate strbnd_terminate proc~strbnd_terminate->interface~mfree proc~assign_angle assign_angle proc~assign_angle->interface~mfree proc~assign_angle->proc~read_atom_cards proc~link_atom_angle_geomgrad link_atom_angle_geomgrad proc~link_atom_angle_geomgrad->interface~mfree proc~qm_helper_link_atom_geomgrad qm_helper_link_atom_geomgrad proc~qm_helper_link_atom_geomgrad->interface~mfree proc~qm_helper_link_atom_geomgrad->proc~link_atom_torsion_geomgrad proc~qm_helper_link_atom_geomgrad->proc~link_atom_bond_geomgrad proc~qm_helper_link_atom_geomgrad->proc~link_atom_angle_geomgrad proc~urey_terminate urey_terminate proc~urey_terminate->interface~mfree proc~update_coordinates update_coordinates proc~update_coordinates->interface~mfree proc~fmm_coordinates_update fmm_coordinates_update proc~update_coordinates->proc~fmm_coordinates_update proc~tortor_newmap->interface~mfree proc~tortor_newmap->proc~cyclic_spline proc~diis->interface~mfree proc~qm_helper_terminate qm_helper_terminate proc~qm_helper_terminate->interface~mfree proc~qm_helper_terminate->proc~topology_terminate proc~vdw_terminate vdw_terminate proc~qm_helper_terminate->proc~vdw_terminate proc~assign_angtor assign_angtor proc~assign_angtor->interface~mfree proc~assign_angtor->proc~read_atom_cards proc~vdw_terminate->interface~mfree proc~vdw_terminate->proc~nl_terminate proc~mmpol_init_from_xyz mmpol_init_from_xyz proc~mmpol_init_from_xyz->interface~mfree proc~mmpol_init_from_xyz->proc~assign_mpoles proc~mmpol_init_from_xyz->proc~assign_torsion proc~mmpol_init_from_xyz->proc~assign_bond proc~mmpol_init_from_xyz->proc~assign_urey proc~mmpol_init_from_xyz->proc~adj_mat_from_conn proc~mmpol_init_from_xyz->proc~assign_imptorsion proc~mmpol_init_from_xyz->proc~assign_opb proc~mmpol_init_from_xyz->proc~assign_pitors proc~mmpol_init_from_xyz->proc~assign_tortors proc~mmpol_init_from_xyz->proc~assign_vdw proc~mmpol_init_from_xyz->proc~assign_strtor proc~mmpol_init_from_xyz->proc~assign_angle proc~mmpol_init_from_xyz->proc~assign_angtor proc~assign_pol assign_pol proc~mmpol_init_from_xyz->proc~assign_pol proc~assign_strbnd assign_strbnd proc~mmpol_init_from_xyz->proc~assign_strbnd proc~mmpol_init_from_xyz->proc~mmpol_prepare proc~polarization_terminate polarization_terminate proc~polarization_terminate->interface~mfree proc~assign_pol->interface~mfree proc~assign_strbnd->interface~mfree proc~assign_strbnd->proc~read_atom_cards proc~ommp_set_external_field ommp_set_external_field proc~ommp_set_external_field->interface~mfree proc~ommp_set_external_field->proc~polarization proc~prepare_polelec prepare_polelec proc~ommp_set_external_field->proc~prepare_polelec proc~conjugate_gradient_solver->interface~mfree proc~sort_ivec_inplace->interface~mfree proc~sort_ivec_inplace->proc~sort_ivec proc~ommp_terminate_qm_helper ommp_terminate_qm_helper proc~ommp_terminate_qm_helper->proc~qm_helper_terminate proc~tree_populate_farnear_lists_safe tree_populate_farnear_lists_safe proc~tree_populate_farnear_lists_safe->proc~compress_list proc~prepare_fmm_ipd prepare_fmm_ipd proc~prepare_fmm_ipd->proc~prepare_fmm_ext_ipd proc~qm_helper_init qm_helper_init proc~qm_helper_init->proc~guess_connectivity proc~ommp_torsion_geomgrad ommp_torsion_geomgrad proc~ommp_torsion_geomgrad->proc~link_atom_torsion_geomgrad proc~vdw_set_cutoff vdw_set_cutoff proc~vdw_set_cutoff->proc~nl_terminate proc~nl_init nl_init proc~vdw_set_cutoff->proc~nl_init proc~ommp_system_from_qm_helper ommp_system_from_qm_helper proc~ommp_system_from_qm_helper->proc~assign_mpoles proc~ommp_system_from_qm_helper->proc~assign_torsion proc~ommp_system_from_qm_helper->proc~assign_bond proc~ommp_system_from_qm_helper->proc~assign_urey proc~ommp_system_from_qm_helper->proc~assign_imptorsion proc~ommp_system_from_qm_helper->proc~assign_opb proc~ommp_system_from_qm_helper->proc~assign_pitors proc~ommp_system_from_qm_helper->proc~assign_tortors proc~ommp_system_from_qm_helper->proc~assign_vdw proc~ommp_system_from_qm_helper->proc~assign_strtor proc~ommp_system_from_qm_helper->proc~assign_angle proc~ommp_system_from_qm_helper->proc~assign_angtor proc~ommp_system_from_qm_helper->proc~assign_pol proc~ommp_system_from_qm_helper->proc~assign_strbnd proc~ommp_system_from_qm_helper->proc~mmpol_prepare proc~ommp_get_vdw_energy ommp_get_vdw_energy proc~ommp_get_vdw_energy->proc~vdw_potential proc~polelec_geomgrad polelec_geomgrad proc~polelec_geomgrad->proc~polarization proc~polelec_geomgrad->proc~prepare_polelec proc~ommp_get_polelec_energy ommp_get_polelec_energy proc~ommp_get_polelec_energy->proc~polarization proc~ommp_get_polelec_energy->proc~prepare_polelec proc~energy_mm_pol energy_MM_pol proc~ommp_get_polelec_energy->proc~energy_mm_pol proc~populate_level_list populate_level_list proc~populate_level_list->proc~compress_list proc~tree_populate_farnear_lists tree_populate_farnear_lists proc~tree_populate_farnear_lists->proc~compress_list proc~qm_helper_init_vdw_prm qm_helper_init_vdw_prm proc~qm_helper_init_vdw_prm->proc~assign_vdw proc~c_ommp_print_summary_to_file C_ommp_print_summary_to_file proc~c_ommp_print_summary_to_file->proc~mmpol_ommp_print_summary proc~c_ommp_terminate_qm_helper C_ommp_terminate_qm_helper proc~c_ommp_terminate_qm_helper->proc~qm_helper_terminate proc~ommp_init_xyz ommp_init_xyz proc~ommp_init_xyz->proc~mmpol_init_from_xyz proc~ommp_set_external_field_nomm ommp_set_external_field_nomm proc~ommp_set_external_field_nomm->proc~ommp_set_external_field proc~ommp_bond_geomgrad ommp_bond_geomgrad proc~ommp_bond_geomgrad->proc~link_atom_bond_geomgrad proc~elec_prop_m2d elec_prop_M2D proc~elec_prop_m2d->proc~preapare_fmm_static proc~ommp_create_link_atom ommp_create_link_atom proc~ommp_create_link_atom->proc~add_link_atom proc~ommp_create_link_atom->proc~init_eel_for_link_atom proc~ommp_create_link_atom->proc~qm_helper_init_vdw_prm proc~init_bonded_for_link_atom init_bonded_for_link_atom proc~ommp_create_link_atom->proc~init_bonded_for_link_atom proc~qm_helper_update_coord qm_helper_update_coord proc~ommp_create_link_atom->proc~qm_helper_update_coord proc~init_vdw_for_link_atom init_vdw_for_link_atom proc~ommp_create_link_atom->proc~init_vdw_for_link_atom proc~field_extd2d field_extD2D proc~field_extd2d->proc~prepare_fmm_ext_ipd proc~ommp_full_bnd_geomgrad ommp_full_bnd_geomgrad proc~ommp_full_bnd_geomgrad->proc~link_atom_torsion_geomgrad proc~ommp_full_bnd_geomgrad->proc~link_atom_bond_geomgrad proc~ommp_full_bnd_geomgrad->proc~link_atom_angle_geomgrad proc~init_bonded_for_link_atom->proc~angle_terminate proc~init_bonded_for_link_atom->proc~bond_terminate proc~init_bonded_for_link_atom->proc~assign_torsion proc~init_bonded_for_link_atom->proc~assign_bond proc~init_bonded_for_link_atom->proc~torsion_terminate proc~init_bonded_for_link_atom->proc~assign_angle proc~bonded_terminate bonded_terminate proc~init_bonded_for_link_atom->proc~bonded_terminate proc~bonded_terminate->proc~angle_terminate proc~bonded_terminate->proc~bond_terminate proc~bonded_terminate->proc~pitors_terminate proc~bonded_terminate->proc~opb_terminate proc~bonded_terminate->proc~angtor_terminate proc~bonded_terminate->proc~torsion_terminate proc~bonded_terminate->proc~imptorsion_terminate proc~bonded_terminate->proc~strtor_terminate proc~bonded_terminate->proc~tortor_terminate proc~bonded_terminate->proc~strbnd_terminate proc~bonded_terminate->proc~urey_terminate proc~ommp_init_mmp ommp_init_mmp proc~ommp_init_mmp->proc~mmpol_init_from_mmp proc~mmpol_terminate mmpol_terminate proc~mmpol_terminate->proc~electrostatics_terminate proc~mmpol_terminate->proc~topology_terminate proc~mmpol_terminate->proc~vdw_terminate proc~mmpol_terminate->proc~bonded_terminate proc~ommp_turn_pol_off ommp_turn_pol_off proc~ommp_turn_pol_off->proc~remove_null_pol proc~mmpol_prepare->proc~remove_null_pol proc~mmpol_prepare->proc~make_screening_lists proc~mmpol_prepare->proc~reverse_grp_tab proc~mmpol_prepare->proc~fmm_coordinates_update proc~add_screening_pair add_screening_pair proc~add_screening_pair->proc~check_vdw_pairs proc~nl_init->proc~nl_update proc~qm_helper_update_coord->proc~guess_connectivity proc~c_ommp_update_coordinates C_ommp_update_coordinates proc~c_ommp_update_coordinates->proc~update_coordinates proc~c_ommp_set_external_field_nomm C_ommp_set_external_field_nomm proc~c_ommp_set_external_field_nomm->proc~ommp_set_external_field proc~ommp_qm_helper_link_atom_geomgrad ommp_qm_helper_link_atom_geomgrad proc~ommp_qm_helper_link_atom_geomgrad->proc~qm_helper_link_atom_geomgrad proc~c_ommp_set_external_field C_ommp_set_external_field proc~c_ommp_set_external_field->proc~ommp_set_external_field proc~init_vdw_for_link_atom->proc~check_vdw_pairs proc~init_vdw_for_link_atom->proc~add_screening_pair proc~elec_prop_m2m elec_prop_M2M proc~elec_prop_m2m->proc~preapare_fmm_static proc~fmm_coordinates_update->proc~fmm_make_neigh_list proc~init_as_octatree init_as_octatree proc~fmm_coordinates_update->proc~init_as_octatree proc~ommp_angle_geomgrad ommp_angle_geomgrad proc~ommp_angle_geomgrad->proc~link_atom_angle_geomgrad proc~c_ommp_angle_geomgrad C_ommp_angle_geomgrad proc~c_ommp_angle_geomgrad->proc~ommp_angle_geomgrad proc~init_as_octatree->proc~populate_level_list proc~init_as_octatree->proc~tree_populate_farnear_lists proc~init_as_ribtree init_as_ribtree proc~init_as_ribtree->proc~populate_level_list proc~init_as_ribtree->proc~tree_populate_farnear_lists proc~prepare_polelec->proc~elec_prop_m2d proc~elec_prop_d2m elec_prop_D2M proc~prepare_polelec->proc~elec_prop_d2m proc~elec_prop_d2d elec_prop_D2D proc~prepare_polelec->proc~elec_prop_d2d proc~c_ommp_get_polelec_energy C_ommp_get_polelec_energy proc~c_ommp_get_polelec_energy->proc~ommp_get_polelec_energy proc~c_ommp_init_xyz C_ommp_init_xyz proc~c_ommp_init_xyz->proc~ommp_init_xyz proc~c_ommp_qm_helper_init_vdw_prm C_ommp_qm_helper_init_vdw_prm proc~c_ommp_qm_helper_init_vdw_prm->proc~qm_helper_init_vdw_prm proc~elec_prop_d2m->proc~prepare_fmm_ipd proc~c_ommp_torsion_geomgrad C_ommp_torsion_geomgrad proc~c_ommp_torsion_geomgrad->proc~ommp_torsion_geomgrad proc~c_ommp_bond_geomgrad C_ommp_bond_geomgrad proc~c_ommp_bond_geomgrad->proc~ommp_bond_geomgrad proc~c_ommp_turn_pol_off C_ommp_turn_pol_off proc~c_ommp_turn_pol_off->proc~ommp_turn_pol_off proc~vdw_init->proc~nl_init proc~ommp_update_link_atoms_position ommp_update_link_atoms_position proc~ommp_update_link_atoms_position->proc~qm_helper_update_coord proc~ommp_qm_helper_update_coord ommp_qm_helper_update_coord proc~ommp_qm_helper_update_coord->proc~qm_helper_update_coord proc~c_ommp_full_bnd_geomgrad C_ommp_full_bnd_geomgrad proc~c_ommp_full_bnd_geomgrad->proc~ommp_full_bnd_geomgrad proc~c_ommp_set_fmm_distance C_ommp_set_fmm_distance proc~c_ommp_set_fmm_distance->proc~fmm_coordinates_update proc~tmatvec_otf TMatVec_otf proc~tmatvec_otf->proc~field_extd2d proc~ommp_set_vdw_cutoff ommp_set_vdw_cutoff proc~ommp_set_vdw_cutoff->proc~vdw_set_cutoff proc~ommp_init_qm_helper ommp_init_qm_helper proc~ommp_init_qm_helper->proc~qm_helper_init proc~elec_prop_d2d->proc~prepare_fmm_ipd proc~c_ommp_system_from_qm_helper C_ommp_system_from_qm_helper proc~c_ommp_system_from_qm_helper->proc~ommp_system_from_qm_helper proc~ommp_get_full_energy ommp_get_full_energy proc~ommp_get_full_energy->proc~ommp_get_vdw_energy proc~ommp_get_full_ele_energy ommp_get_full_ele_energy proc~ommp_get_full_energy->proc~ommp_get_full_ele_energy proc~c_ommp_get_vdw_energy C_ommp_get_vdw_energy proc~c_ommp_get_vdw_energy->proc~ommp_get_vdw_energy proc~ommp_polelec_geomgrad ommp_polelec_geomgrad proc~ommp_polelec_geomgrad->proc~polelec_geomgrad proc~ommp_full_geomgrad ommp_full_geomgrad proc~ommp_full_geomgrad->proc~polelec_geomgrad proc~ommp_full_geomgrad->proc~ommp_full_bnd_geomgrad proc~fixedelec_geomgrad fixedelec_geomgrad proc~ommp_full_geomgrad->proc~fixedelec_geomgrad proc~ommp_get_full_ele_energy->proc~ommp_get_polelec_energy proc~ommp_get_fixedelec_energy ommp_get_fixedelec_energy proc~ommp_get_full_ele_energy->proc~ommp_get_fixedelec_energy proc~c_ommp_create_link_atom C_ommp_create_link_atom proc~c_ommp_create_link_atom->proc~ommp_create_link_atom proc~c_ommp_qm_helper_link_atom_geomgrad C_ommp_qm_helper_link_atom_geomgrad proc~c_ommp_qm_helper_link_atom_geomgrad->proc~ommp_qm_helper_link_atom_geomgrad proc~c_ommp_init_mmp C_ommp_init_mmp proc~c_ommp_init_mmp->proc~ommp_init_mmp proc~ommp_terminate ommp_terminate proc~ommp_terminate->proc~mmpol_terminate proc~c_ommp_set_fmm_min_cell_size C_ommp_set_fmm_min_cell_size proc~c_ommp_set_fmm_min_cell_size->proc~fmm_coordinates_update proc~prepare_fixedelec prepare_fixedelec proc~prepare_fixedelec->proc~elec_prop_m2m proc~energy_mm_mm energy_MM_MM proc~energy_mm_mm->proc~prepare_fixedelec proc~energy_mm_pol->proc~prepare_polelec proc~c_ommp_update_link_atoms_position C_ommp_update_link_atoms_position proc~c_ommp_update_link_atoms_position->proc~ommp_update_link_atoms_position proc~c_ommp_set_vdw_cutoff C_ommp_set_vdw_cutoff proc~c_ommp_set_vdw_cutoff->proc~ommp_set_vdw_cutoff proc~qm_helper_init_vdw qm_helper_init_vdw proc~qm_helper_init_vdw->proc~vdw_init proc~c_ommp_qm_helper_update_coord C_ommp_qm_helper_update_coord proc~c_ommp_qm_helper_update_coord->proc~ommp_qm_helper_update_coord proc~c_ommp_init_qm_helper C_ommp_init_qm_helper proc~c_ommp_init_qm_helper->proc~ommp_init_qm_helper proc~c_ommp_get_full_energy C_ommp_get_full_energy proc~c_ommp_get_full_energy->proc~ommp_get_full_energy proc~c_ommp_polelec_geomgrad C_ommp_polelec_geomgrad proc~c_ommp_polelec_geomgrad->proc~ommp_polelec_geomgrad proc~c_ommp_full_geomgrad C_ommp_full_geomgrad proc~c_ommp_full_geomgrad->proc~ommp_full_geomgrad proc~c_ommp_get_full_ele_energy C_ommp_get_full_ele_energy proc~c_ommp_get_full_ele_energy->proc~ommp_get_full_ele_energy proc~c_ommp_terminate C_ommp_terminate proc~c_ommp_terminate->proc~ommp_terminate proc~fixedelec_geomgrad->proc~prepare_fixedelec proc~ommp_get_fixedelec_energy->proc~energy_mm_mm proc~ommp_fixedelec_geomgrad ommp_fixedelec_geomgrad proc~ommp_fixedelec_geomgrad->proc~fixedelec_geomgrad proc~c_ommp_qm_helper_init_vdw C_ommp_qm_helper_init_vdw proc~c_ommp_qm_helper_init_vdw->proc~qm_helper_init_vdw proc~c_ommp_get_fixedelec_energy C_ommp_get_fixedelec_energy proc~c_ommp_get_fixedelec_energy->proc~ommp_get_fixedelec_energy proc~c_ommp_fixedelec_geomgrad C_ommp_fixedelec_geomgrad proc~c_ommp_fixedelec_geomgrad->proc~ommp_fixedelec_geomgrad

Contents

Source Code


Source Code

    subroutine chk_free(string, lfree, istat)
        !! Handles the memory errors (including soft limits)
        !! during the deallocation
        implicit none

        character(len=*), intent(in) :: string
        !! Human-readable description string of the deallocation
        !! operation, just for output purpose.
        integer(ip), intent(in) :: lfree
        !! amount of memory (in bytes) to free
        integer(ip), intent(in) :: istat
        !! return flag of deallocate
        
        character(len=OMMP_STR_CHAR_MAX) :: msg
        !! Message string for errors
        
        real(rp) :: lfree_gb
        !! memory allocated in gb

        lfree_gb = lfree / 1e9

        if(istat /= 0)then
            write(msg, "('Deallocation error in subroutine ', a ,'. stat= ', i5)") string, istat
            call fatal_error(msg)
        else
            usedmem = usedmem - lfree_gb
        end if

    end subroutine chk_free