error.F90 Source File


Files dependent on this one

sourcefile~~error.f90~~AfferentGraph sourcefile~error.f90 error.F90 sourcefile~allocate.f90 allocate.F90 sourcefile~allocate.f90->sourcefile~error.f90 sourcefile~core.f90 core.F90 sourcefile~core.f90->sourcefile~error.f90 sourcefile~core.f90->sourcefile~allocate.f90 sourcefile~deallocate.f90 deallocate.F90 sourcefile~core.f90->sourcefile~deallocate.f90 sourcefile~string_utils.f90 string_utils.F90 sourcefile~core.f90->sourcefile~string_utils.f90 sourcefile~unique.f90 unique.F90 sourcefile~core.f90->sourcefile~unique.f90 sourcefile~vtk.f90 vtk.F90 sourcefile~core.f90->sourcefile~vtk.f90 sourcefile~types.f90 types.F90 sourcefile~core.f90->sourcefile~types.f90 sourcefile~deallocate.f90->sourcefile~error.f90 sourcefile~adjacency_element.f90 adjacency_element.F90 sourcefile~adjacency_element.f90->sourcefile~core.f90 sourcefile~element.f90 element.F90 sourcefile~adjacency_element.f90->sourcefile~element.f90 sourcefile~adjacency_node.f90 adjacency_node.F90 sourcefile~adjacency_node.f90->sourcefile~core.f90 sourcefile~array.f90 array.F90 sourcefile~array.f90->sourcefile~allocate.f90 sourcefile~array.f90->sourcefile~deallocate.f90 sourcefile~boundary_interface.f90 boundary_interface.F90 sourcefile~boundary_interface.f90->sourcefile~core.f90 sourcefile~domain.f90 domain.F90 sourcefile~boundary_interface.f90->sourcefile~domain.f90 sourcefile~input.f90 input.F90 sourcefile~boundary_interface.f90->sourcefile~input.f90 sourcefile~matrix.f90 matrix.F90 sourcefile~boundary_interface.f90->sourcefile~matrix.f90 sourcefile~boundary_manager.f90 boundary_manager.F90 sourcefile~boundary_manager.f90->sourcefile~core.f90 sourcefile~boundary_manager.f90->sourcefile~boundary_interface.f90 sourcefile~boundary_manager.f90->sourcefile~domain.f90 sourcefile~boundary_manager.f90->sourcefile~input.f90 sourcefile~boundary_manager.f90->sourcefile~matrix.f90 sourcefile~density_interface.f90 density_interface.F90 sourcefile~density_interface.f90->sourcefile~core.f90 sourcefile~density_interface.f90->sourcefile~input.f90 sourcefile~domain_manager.f90 domain_manager.F90 sourcefile~domain_manager.f90->sourcefile~core.f90 sourcefile~domain_manager.f90->sourcefile~element.f90 sourcefile~element_factory.f90 element_factory.F90 sourcefile~domain_manager.f90->sourcefile~element_factory.f90 sourcefile~multicoloring.f90 multicoloring.F90 sourcefile~domain_manager.f90->sourcefile~multicoloring.f90 sourcefile~reordering.f90 reordering.F90 sourcefile~domain_manager.f90->sourcefile~reordering.f90 sourcefile~side.f90 side.F90 sourcefile~domain_manager.f90->sourcefile~side.f90 sourcefile~side_factory.f90 side_factory.F90 sourcefile~domain_manager.f90->sourcefile~side_factory.f90 sourcefile~adjacency.f90 adjacency.F90 sourcefile~domain_manager.f90->sourcefile~adjacency.f90 sourcefile~domain_manager.f90->sourcefile~input.f90 sourcefile~element.f90->sourcefile~core.f90 sourcefile~element.f90->sourcefile~input.f90 sourcefile~element_factory.f90->sourcefile~core.f90 sourcefile~element_factory.f90->sourcefile~element.f90 sourcefile~element_factory.f90->sourcefile~input.f90 sourcefile~ftdss.f90 ftdss.F90 sourcefile~ftdss.f90->sourcefile~core.f90 sourcefile~input_interface.f90 input_interface.F90 sourcefile~ftdss.f90->sourcefile~input_interface.f90 sourcefile~thermal_interface.f90 thermal_interface.F90 sourcefile~ftdss.f90->sourcefile~thermal_interface.f90 sourcefile~boundary.f90 boundary.F90 sourcefile~ftdss.f90->sourcefile~boundary.f90 sourcefile~control.f90 control.F90 sourcefile~ftdss.f90->sourcefile~control.f90 sourcefile~ftdss.f90->sourcefile~domain.f90 sourcefile~initial.f90 initial.F90 sourcefile~ftdss.f90->sourcefile~initial.f90 sourcefile~output.f90 output.F90 sourcefile~ftdss.f90->sourcefile~output.f90 sourcefile~properties.f90 properties.F90 sourcefile~ftdss.f90->sourcefile~properties.f90 sourcefile~hcf.f90 HCF.F90 sourcefile~hcf.f90->sourcefile~allocate.f90 sourcefile~heat_capacity_interface.f90 heat_capacity_interface.F90 sourcefile~heat_capacity_interface.f90->sourcefile~core.f90 sourcefile~heat_capacity_interface.f90->sourcefile~density_interface.f90 sourcefile~heat_capacity_interface.f90->sourcefile~input_interface.f90 sourcefile~initial_interface.f90 initial_interface.F90 sourcefile~initial_interface.f90->sourcefile~core.f90 sourcefile~initial_interface.f90->sourcefile~boundary.f90 sourcefile~initial_interface.f90->sourcefile~domain.f90 sourcefile~initial_interface.f90->sourcefile~input.f90 sourcefile~initial_manager.f90 initial_manager.F90 sourcefile~initial_manager.f90->sourcefile~core.f90 sourcefile~initial_manager.f90->sourcefile~initial_interface.f90 sourcefile~initial_manager.f90->sourcefile~domain.f90 sourcefile~initial_manager.f90->sourcefile~input.f90 sourcefile~input_interface.f90->sourcefile~core.f90 sourcefile~project_settings.f90 project_settings.F90 sourcefile~input_interface.f90->sourcefile~project_settings.f90 sourcefile~matrix_coo.f90 matrix_coo.F90 sourcefile~matrix_coo.f90->sourcefile~core.f90 sourcefile~matrix_coo.f90->sourcefile~domain.f90 sourcefile~matrix_base.f90 matrix_base.F90 sourcefile~matrix_coo.f90->sourcefile~matrix_base.f90 sourcefile~matrix_crs.f90 matrix_crs.F90 sourcefile~matrix_crs.f90->sourcefile~core.f90 sourcefile~matrix_crs.f90->sourcefile~matrix_coo.f90 sourcefile~matrix_crs.f90->sourcefile~domain.f90 sourcefile~matrix_crs.f90->sourcefile~matrix_base.f90 sourcefile~matrix_dense.f90 matrix_dense.F90 sourcefile~matrix_dense.f90->sourcefile~core.f90 sourcefile~matrix_dense.f90->sourcefile~domain.f90 sourcefile~matrix_dense.f90->sourcefile~matrix_base.f90 sourcefile~multicoloring.f90->sourcefile~core.f90 sourcefile~multicoloring.f90->sourcefile~adjacency_element.f90 sourcefile~output_interface.f90 output_interface.F90 sourcefile~output_interface.f90->sourcefile~core.f90 sourcefile~output_interface.f90->sourcefile~project_settings.f90 sourcefile~output_interface.f90->sourcefile~control.f90 sourcefile~output_interface.f90->sourcefile~domain.f90 sourcefile~output_interface.f90->sourcefile~input.f90 sourcefile~output_interface.f90->sourcefile~matrix.f90 sourcefile~output_interface.f90->sourcefile~properties.f90 sourcefile~project_settings.f90->sourcefile~core.f90 sourcefile~properties_manager.f90 properties_manager.F90 sourcefile~properties_manager.f90->sourcefile~core.f90 sourcefile~calculate.f90 calculate.F90 sourcefile~properties_manager.f90->sourcefile~calculate.f90 sourcefile~properties_manager.f90->sourcefile~input.f90 sourcefile~materials_manager.f90 materials_manager.F90 sourcefile~properties_manager.f90->sourcefile~materials_manager.f90 sourcefile~reordering.f90->sourcefile~core.f90 sourcefile~reordering.f90->sourcefile~adjacency_node.f90 sourcefile~reordering.f90->sourcefile~element.f90 sourcefile~side.f90->sourcefile~core.f90 sourcefile~side.f90->sourcefile~input.f90 sourcefile~side_factory.f90->sourcefile~core.f90 sourcefile~side_factory.f90->sourcefile~side.f90 sourcefile~side_factory.f90->sourcefile~input.f90 sourcefile~specific_heat_interface.f90 specific_heat_interface.F90 sourcefile~specific_heat_interface.f90->sourcefile~core.f90 sourcefile~specific_heat_interface.f90->sourcefile~input.f90 sourcefile~string_utils.f90->sourcefile~allocate.f90 sourcefile~thermal_conductivity_interface.f90 thermal_conductivity_interface.F90 sourcefile~thermal_conductivity_interface.f90->sourcefile~core.f90 sourcefile~thermal_conductivity_interface.f90->sourcefile~input.f90 sourcefile~thermal_interface.f90->sourcefile~core.f90 sourcefile~thermal_interface.f90->sourcefile~boundary.f90 sourcefile~thermal_interface.f90->sourcefile~control.f90 sourcefile~thermal_interface.f90->sourcefile~domain.f90 sourcefile~thermal_interface.f90->sourcefile~input.f90 sourcefile~thermal_interface.f90->sourcefile~matrix.f90 sourcefile~thermal_interface.f90->sourcefile~properties.f90 sourcefile~solver.f90 solver.F90 sourcefile~thermal_interface.f90->sourcefile~solver.f90 sourcefile~time.f90 time.F90 sourcefile~time.f90->sourcefile~core.f90 sourcefile~time.f90->sourcefile~input.f90 sourcefile~unique.f90->sourcefile~allocate.f90 sourcefile~variable.f90 variable.F90 sourcefile~variable.f90->sourcefile~allocate.f90 sourcefile~vtk.f90->sourcefile~allocate.f90 sourcefile~vtk.f90->sourcefile~deallocate.f90 sourcefile~vtk.f90->sourcefile~array.f90 sourcefile~vtk.f90->sourcefile~unique.f90 sourcefile~adjacency.f90->sourcefile~adjacency_element.f90 sourcefile~adjacency.f90->sourcefile~adjacency_node.f90 sourcefile~boundary.f90->sourcefile~boundary_interface.f90 sourcefile~boundary.f90->sourcefile~boundary_manager.f90 sourcefile~boundary_adiabatic.f90 boundary_adiabatic.F90 sourcefile~boundary_adiabatic.f90->sourcefile~boundary_interface.f90 sourcefile~boundary_base.f90 boundary_base.F90 sourcefile~boundary_base.f90->sourcefile~boundary_interface.f90 sourcefile~boundary_dirichlet.f90 boundary_dirichlet.F90 sourcefile~boundary_dirichlet.f90->sourcefile~boundary_interface.f90 sourcefile~calculate.f90->sourcefile~density_interface.f90 sourcefile~calculate.f90->sourcefile~heat_capacity_interface.f90 sourcefile~calculate.f90->sourcefile~specific_heat_interface.f90 sourcefile~calculate.f90->sourcefile~thermal_conductivity_interface.f90 sourcefile~gcc_interface.f90 gcc_interface.F90 sourcefile~calculate.f90->sourcefile~gcc_interface.f90 sourcefile~control.f90->sourcefile~time.f90 sourcefile~density_3phase.f90 density_3phase.F90 sourcefile~density_3phase.f90->sourcefile~density_interface.f90 sourcefile~density_base.f90 density_base.F90 sourcefile~density_base.f90->sourcefile~density_interface.f90 sourcefile~domain.f90->sourcefile~domain_manager.f90 sourcefile~domain.f90->sourcefile~element.f90 sourcefile~domain.f90->sourcefile~element_factory.f90 sourcefile~domain.f90->sourcefile~multicoloring.f90 sourcefile~domain.f90->sourcefile~reordering.f90 sourcefile~domain.f90->sourcefile~side.f90 sourcefile~domain.f90->sourcefile~side_factory.f90 sourcefile~domain.f90->sourcefile~adjacency.f90 sourcefile~dsatur.f90 dsatur.F90 sourcefile~dsatur.f90->sourcefile~multicoloring.f90 sourcefile~element_square_first.f90 element_square_first.F90 sourcefile~element_square_first.f90->sourcefile~element.f90 sourcefile~element_square_second.f90 element_square_second.F90 sourcefile~element_square_second.f90->sourcefile~element.f90 sourcefile~element_triangle_first.f90 element_triangle_first.F90 sourcefile~element_triangle_first.f90->sourcefile~element.f90 sourcefile~element_triangle_second.f90 element_triangle_second.F90 sourcefile~element_triangle_second.f90->sourcefile~element.f90 sourcefile~hcf_bc.f90 HCF_BC.F90 sourcefile~hcf_bc.f90->sourcefile~hcf.f90 sourcefile~hcf_durner.f90 HCF_Durner.F90 sourcefile~hcf_durner.f90->sourcefile~hcf.f90 sourcefile~hcf_dvgch.f90 HCF_DVGCH.F90 sourcefile~hcf_dvgch.f90->sourcefile~hcf.f90 sourcefile~hcf_impedance.f90 HCF_Impedance.F90 sourcefile~hcf_impedance.f90->sourcefile~hcf.f90 sourcefile~hcf_ko.f90 HCF_KO.F90 sourcefile~hcf_ko.f90->sourcefile~hcf.f90 sourcefile~hcf_mvg.f90 HCF_MVG.F90 sourcefile~hcf_mvg.f90->sourcefile~hcf.f90 sourcefile~hcf_vg.f90 HCF_VG.F90 sourcefile~hcf_vg.f90->sourcefile~hcf.f90 sourcefile~hcf_viscosity.f90 HCF_Viscosity.F90 sourcefile~hcf_viscosity.f90->sourcefile~hcf.f90 sourcefile~heat_capacity_3phase.f90 heat_capacity_3phase.F90 sourcefile~heat_capacity_3phase.f90->sourcefile~heat_capacity_interface.f90 sourcefile~heat_capacity_3phase_apparent.f90 heat_capacity_3phase_apparent.F90 sourcefile~heat_capacity_3phase_apparent.f90->sourcefile~heat_capacity_interface.f90 sourcefile~heat_capacity_base.f90 heat_capacity_base.F90 sourcefile~heat_capacity_base.f90->sourcefile~heat_capacity_interface.f90 sourcefile~initial.f90->sourcefile~initial_interface.f90 sourcefile~initial.f90->sourcefile~initial_manager.f90 sourcefile~initial_laplace.f90 initial_laplace.F90 sourcefile~initial_laplace.f90->sourcefile~initial_interface.f90 sourcefile~initial_uniform.f90 initial_uniform.F90 sourcefile~initial_uniform.f90->sourcefile~initial_interface.f90 sourcefile~input.f90->sourcefile~input_interface.f90 sourcefile~input_basic.f90 input_basic.F90 sourcefile~input_basic.f90->sourcefile~input_interface.f90 sourcefile~input_conditions.f90 input_conditions.F90 sourcefile~input_conditions.f90->sourcefile~input_interface.f90 sourcefile~input_geometry.f90 input_geometry.F90 sourcefile~input_geometry.f90->sourcefile~input_interface.f90 sourcefile~input_output.f90 input_output.F90 sourcefile~input_output.f90->sourcefile~input_interface.f90 sourcefile~lfo.f90 lfo.F90 sourcefile~lfo.f90->sourcefile~multicoloring.f90 sourcefile~matrix.f90->sourcefile~matrix_coo.f90 sourcefile~matrix.f90->sourcefile~matrix_crs.f90 sourcefile~matrix.f90->sourcefile~matrix_dense.f90 sourcefile~matrix.f90->sourcefile~matrix_base.f90 sourcefile~methods.f90 methods.F90 sourcefile~methods.f90->sourcefile~reordering.f90 sourcefile~output.f90->sourcefile~output_interface.f90 sourcefile~output_base.f90 output_base.F90 sourcefile~output_base.f90->sourcefile~output_interface.f90 sourcefile~output_observation.f90 output_observation.F90 sourcefile~output_observation.f90->sourcefile~output_interface.f90 sourcefile~output_overall_base.f90 output_overall_base.F90 sourcefile~output_overall_base.f90->sourcefile~output_interface.f90 sourcefile~output_overall_vtk.f90 output_overall_vtk.F90 sourcefile~output_overall_vtk.f90->sourcefile~output_interface.f90 sourcefile~output_overall_vtu.f90 output_overall_vtu.F90 sourcefile~output_overall_vtu.f90->sourcefile~output_interface.f90 sourcefile~output_system_logger.f90 output_system_logger.F90 sourcefile~output_system_logger.f90->sourcefile~output_interface.f90 sourcefile~properties.f90->sourcefile~properties_manager.f90 sourcefile~properties.f90->sourcefile~materials_manager.f90 sourcefile~side_first.f90 side_first.F90 sourcefile~side_first.f90->sourcefile~side.f90 sourcefile~side_second.f90 side_second.F90 sourcefile~side_second.f90->sourcefile~side.f90 sourcefile~specific_heat_3phase.f90 specific_heat_3phase.F90 sourcefile~specific_heat_3phase.f90->sourcefile~specific_heat_interface.f90 sourcefile~specific_heat_base.f90 specific_heat_base.F90 sourcefile~specific_heat_base.f90->sourcefile~specific_heat_interface.f90 sourcefile~thermal.f90 thermal.F90 sourcefile~thermal.f90->sourcefile~thermal_interface.f90 sourcefile~thermal_3phase.f90 thermal_3phase.F90 sourcefile~thermal_3phase.f90->sourcefile~thermal_interface.f90 sourcefile~thermal_conductivity_3phase.f90 thermal_conductivity_3phase.F90 sourcefile~thermal_conductivity_3phase.f90->sourcefile~thermal_conductivity_interface.f90 sourcefile~thermal_conductivity_base.f90 thermal_conductivity_base.F90 sourcefile~thermal_conductivity_base.f90->sourcefile~thermal_conductivity_interface.f90 sourcefile~to_original.f90 to_original.F90 sourcefile~to_original.f90->sourcefile~reordering.f90 sourcefile~to_reordered.f90 to_reordered.F90 sourcefile~to_reordered.f90->sourcefile~reordering.f90 sourcefile~types.f90->sourcefile~array.f90 sourcefile~types.f90->sourcefile~variable.f90 sourcefile~welch_powell.f90 welch_powell.F90 sourcefile~welch_powell.f90->sourcefile~multicoloring.f90 sourcefile~gcc_interface.f90->sourcefile~input.f90 sourcefile~materials_manager.f90->sourcefile~calculate.f90 sourcefile~materials_manager.f90->sourcefile~input.f90 sourcefile~matrix_base.f90->sourcefile~domain.f90 sourcefile~solver_factory.f90 solver_factory.F90 sourcefile~solver_factory.f90->sourcefile~input.f90 sourcefile~solver_factory.f90->sourcefile~matrix.f90 sourcefile~gcc_base.f90 gcc_base.F90 sourcefile~gcc_base.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_non_segregation_m.f90 gcc_non_segregation_m.F90 sourcefile~gcc_non_segregation_m.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_non_segregation_pa.f90 gcc_non_segregation_pa.F90 sourcefile~gcc_non_segregation_pa.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_segregation_m.f90 gcc_segregation_m.F90 sourcefile~gcc_segregation_m.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_segregation_pa.f90 gcc_segregation_pa.F90 sourcefile~gcc_segregation_pa.f90->sourcefile~gcc_interface.f90 sourcefile~solver.f90->sourcefile~solver_factory.f90

Source Code

module core_error
    use, intrinsic :: iso_fortran_env, only: int32, real32, real64, real128
    use :: stdlib_logger
    implicit none
    private

    public :: error_message

contains

    subroutine error_message(err_number, myrank, opt, c_opt)
        implicit none
        integer(int32), intent(in) :: err_number
        integer(int32), optional, intent(in) :: myrank
        real(real64), optional, intent(in) :: opt
        character(*), optional, intent(in) :: c_opt

        character(256) :: msg
        integer(int32) :: ierr
        character(8) :: fmt = '(a,i3,a)'

        if (err_number == 901) then
            write (msg, '(a)') "Don't exist Input folder."
        else if (err_number == 902) then
            if (present(c_opt)) then
                write (msg, '(3a)') "Don't exist file '", trim(adjustl(c_opt)), "'."
            else
                write (msg, '(a)') "Don't exist file."
            end if
        else if (err_number == 903) then
            if (present(c_opt)) then
                write (msg, '(3a)') "Can't open file '", trim(adjustl(c_opt)), "'."
            else
                write (msg, '(a)') "Can't open file."
            end if
        else if (err_number == 904) then
            if (present(c_opt)) then
                write (msg, '(3a)') "Selected variable '", trim(adjustl(c_opt)), "' is not found in JSON file."
            else
                write (msg, '(a)') "Selected variable is not found in JSON file."
            end if
        else if (err_number == 905) then
            if (present(c_opt)) then
                write (msg, '(3a)') "Selected variable '", trim(adjustl(c_opt)), "' is invalid."
            else
                write (msg, '(a)') "Selected variable is invalid."
            end if
        else if (err_number == 906) then
            if (present(c_opt)) then
                write (msg, '(3a)') "Selected file '", trim(adjustl(c_opt)), "' is invalid"
            else
                write (msg, '(a)') "Selected file is invalid"
            end if
        else if (err_number == 911) then
            msg = "The number of elements must be positive."
        else if (err_number == 912) then
            msg = "The number of nodal must be positive."
        else if (err_number == 913) then
            msg = "The number of shape must be positive."
        else if (err_number == 914) then
            msg = "The number of dimention must be positive."
        else if (err_number == 915) then
            msg = "Dirichlet boundary conditions for water transport must be positive."
        else if (err_number == 916) then
            msg = "Dirichlet boundary conditions for heat transport must be positive."
        else if (err_number == 917) then
            msg = "The value of porosity must be positive."
        else if (err_number == 918) then
            msg = "The value of density must be positive."
        else if (err_number == 919) then
            msg = "The value of hydrulic conductivity must be positive."
        else if (err_number == 920) then
            msg = "The value of thermal conductivity must be positive."
        else if (err_number == 921) then
            msg = "The value of specific heat must be positive."
        else if (err_number == 922) then
            msg = "The value of latent heat must be positive."
        else if (err_number == 923) then
            msg = "The number of concering time information must be positive."
        else if (err_number == 924) then
            msg = "The initial and coolant temperature are same."
        else if (err_number == 928) then
            msg = "Two or more points are the same."
        else if (err_number == 929) then
            msg = "The number of array elements must be positive."
        else if (err_number == 930) then
            msg = "The number of matrix elements must be positive."

            ! reordering error message
        else if (err_number == 931) then
            if (present(c_opt)) then
                write (msg, fmt) "#", err_number, ": Could not find a starting node in "//trim(adjustl(c_opt))//"."
            else
                write (msg, fmt) "#", err_number, ": Could not find a starting node."
            end if
        else if (err_number == 932) then
            if (present(c_opt)) then
                write (msg, fmt) "#", err_number, ": Permutation is not ready in"//trim(adjustl(c_opt))//". Call reordering first."
            else
                write (msg, fmt) "#", err_number, ": Permutation is not ready. Call reordering first."
            end if

            ! solver error message
        else if (err_number == 933) then
            msg = "Solver type is not selected."
        else if (err_number == 934) then
            msg = "Freezing calculation is not selected."
        else if (err_number == 941) then
            msg = "The solution to the simultaneous linear equations could not be found."
        else if (err_number == 942) then
            msg = "LU decomposition could not be successed."
        else if (err_number == 943) then
            msg = "The inverse matrix could not be found."
        else if (err_number == 944) then
            msg = "The target result is too high."
        else if (err_number == 945) then
            msg = "The target result is too low."
        else if (err_number == 946) then
            msg = "The solution has been diverged."
        else if (err_number == 951) then
            write (msg, fmt) "#", err_number, ": Array is already allocated."
        else if (err_number == 952) then
            write (msg, fmt) "#", err_number, ": Invalid array length."
        else if (err_number == 953) then
            write (msg, fmt) "#", err_number, ": Requested index range is too large."
        else if (err_number == 954) then
            write (msg, fmt) "#", err_number, ": Invalid range - first index is greater than last."
        else if (err_number == 955) then
            write (msg, fmt) "#", err_number, ": Memory allocation failed."
        else if (err_number == 956) then
            write (msg, fmt) "#", err_number, ": Cannot specify both length and bounds."
        else if (err_number == 957) then
            write (msg, fmt) "#", err_number, ": Either length or bounds must be specified."
        else if (err_number == 958) then
            write (msg, fmt) "#", err_number, ": bounds array must have exactly 2 elements."
        else if (err_number == 961) then
            write (msg, '(a)') "Pointer has already allocated."
        else if (err_number == 971) then
            write (msg, fmt) "#", err_number, ": Memory deallocation failed."
        else
            msg = "Unknown error"
        end if

#ifdef _MPI
        if (myrank == 0) then
            call MPI_Finalize(ierr)
#endif

            call global_logger%log_error(message=msg)
            stop

#ifdef _MPI
        end if
#endif
    end subroutine error_message

end module core_error