36#include "../base/base_uses.f90"
42 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'tmc_cancelation'
58 CHARACTER(LEN=*),
PARAMETER :: routinen =
'add_to_canceling_list'
61 LOGICAL :: need_to_cancel
63 cpassert(
ASSOCIATED(elem))
64 cpassert(
ASSOCIATED(tmc_env))
65 cpassert(
ASSOCIATED(tmc_env%m_env))
66 cpassert(
ASSOCIATED(tmc_env%params))
69 CALL timeset(routinen, handle)
71 IF (tmc_env%params%SPECULATIVE_CANCELING)
THEN
72 need_to_cancel = .false.
74 SELECT CASE (elem%stat)
77 need_to_cancel = .true.
78 tmc_env%m_env%count_cancel_ener = tmc_env%m_env%count_cancel_ener + 1
84 need_to_cancel = .true.
85 tmc_env%m_env%count_cancel_NMC = tmc_env%m_env%count_cancel_NMC + 1
92 cpwarn(
"try to add deleted element cancelation list ")
93 WRITE (*, *)
"WARNING: try to cancel subtree, element ", elem%sub_tree_nr, elem%nr,
", with status ", elem%stat
95 CALL cp_abort(__location__, &
96 "try to add element with unknown status to cancelation list (stat=" &
100 IF (tmc_env%params%DRAW_TREE)
THEN
105 IF (need_to_cancel)
THEN
110 CALL timestop(handle)
124 cancel_elem_loop:
DO WHILE (
ASSOCIATED(cancel_list))
125 tmp_element => cancel_list%next
126 DEALLOCATE (cancel_list)
127 cancel_list => tmp_element
128 END DO cancel_elem_loop
various routines to log and control the output. The idea is that decisions about where to log should ...
An array-based list which grows on demand. When the internal array is full, a new array of twice the ...
to decrease the used memory size, just actual needed tree elements should be stored in memory,...
subroutine, public add_to_canceling_list(elem, tmc_env)
add a certain element to the cancelation list
subroutine, public free_cancelation_list(cancel_list)
for correct finalizing deallocate the cancelation list
module for printing tree structures in GraphViz dot files for visualizing the trees
subroutine, public create_dot_color(tree_element, tmc_params)
interfaces the change of color for subtree elements on the basis of the element status
module handles definition of the tree nodes for the global and
integer, parameter, public status_deleted
integer, parameter, public status_accepted
integer, parameter, public status_calculate_energy
integer, parameter, public status_calculate_md
subroutine, public add_to_list(elem, list, temp_ind, nr)
add a certain element to the specified element list at the beginning
integer, parameter, public status_canceled_ener
integer, parameter, public status_calculated
integer, parameter, public status_cancel_ener
integer, parameter, public status_cancel_nmc
integer, parameter, public status_canceled_nmc
integer, parameter, public status_calc_approx_ener
integer, parameter, public status_rejected
integer, parameter, public status_calculate_nmc_steps
integer, parameter, public status_accepted_result
integer, parameter, public status_deleted_result
integer, parameter, public status_created
integer, parameter, public status_rejected_result
module handles definition of the tree nodes for the global and