semi_stoch_procs Module



Contents


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: GLOBAL_RUN = -45

Functions

public function is_core_state(ilut, nI, run_) result(t_core)

Check whether an ilut belongs to the core space @param[in] ilut ilut we want to check @param[in] nI determinant corresponding to this ilut. Redundant, but is passed for performance reasons (decoding is expensive and we likely already know nI at this point) @return t_core true if and only if ilut is in the core space

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:NIfTot)
integer, intent(in) :: nI(:)
integer, intent(in), optional :: run_

Return Value logical

public function core_space_pos(ilut, nI, run_) result(pos)

Check where an ilut is in the core space @param[in] ilut ilut we want to check @param[in] nI determinant corresponding to this ilut. Redundant, but is passed for performance reasons (decoding is expensive and we likely already know nI at this point) @return pos position of ilut in the core space, 0 if ilut is not in the core space

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:NIfTot)
integer, intent(in) :: nI(:)
integer, intent(in), optional :: run_

Return Value integer

public function check_determ_flag(ilut, run_) result(core_state)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:NIfTot)
integer, intent(in), optional :: run_

Return Value logical

public pure function core_space_weight(sign_curr, run) result(sign_curr_real)

Weight function for picking the most populated states. Trivial in single run mode, but multiple options exist in mneci

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: sign_curr(lenof_sign)
integer, intent(in) :: run

Return Value real(kind=dp)


Subroutines

public subroutine determ_projection()

Arguments

None

public subroutine determ_projection_kp_hamil(partial_vecs, full_vecs, rep)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout), allocatable :: partial_vecs(:,:)
real(kind=dp), intent(inout), allocatable :: full_vecs(:,:)
type(core_space_t), intent(inout) :: rep

public subroutine determ_projection_no_death()

Arguments

None

public subroutine determ_proj_approx()

Arguments

None

public subroutine average_determ_vector()

Arguments

None

public subroutine print_determ_vec_av(run)

Arguments

Type IntentOptional Attributes Name
integer, intent(in), optional :: run

public subroutine print_determ_vec(run)

Arguments

Type IntentOptional Attributes Name
integer, intent(in), optional :: run

public subroutine recalc_core_hamil_diag(old_Hii, new_Hii)

Arguments

Type IntentOptional Attributes Name
real(kind=dp) :: old_Hii
real(kind=dp) :: new_Hii

public subroutine generate_core_connections(rep)

Arguments

Type IntentOptional Attributes Name
type(core_space_t), intent(inout) :: rep

public subroutine store_whole_core_space(rep)

Arguments

Type IntentOptional Attributes Name
type(core_space_t), intent(inout) :: rep

public subroutine remove_high_energy_orbs(ilut_list, num_states, target_num_states, tParallel)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(inout) :: ilut_list(0:NIfTot,1:num_states)
integer, intent(inout) :: num_states
integer, intent(in) :: target_num_states
logical, intent(in) :: tParallel

public subroutine sort_states_by_energy(ilut_list, num_states, tSortDoubles)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(inout) :: ilut_list(0:NIfTot,1:num_states)
integer, intent(in) :: num_states
logical, intent(in) :: tSortDoubles

public subroutine sort_space_by_proc(ilut_list, ilut_list_size, num_states_procs)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(inout) :: ilut_list(0:,:)
integer, intent(in) :: ilut_list_size
integer(kind=MPIArg), intent(out) :: num_states_procs(0:nProcessors-1)

public subroutine fill_in_diag_helements()

Arguments

None

public subroutine write_core_space(rep)

Arguments

Type IntentOptional Attributes Name
type(core_space_t), intent(in) :: rep

public subroutine add_core_states_currentdets(run)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: run

public subroutine add_core_states_currentdet_hash(run)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: run

public subroutine proc_most_populated_states(n_keep, run, largest_walkers, opt_source, opt_source_size, norm)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_keep
integer, intent(in) :: run
integer(kind=n_int), intent(out) :: largest_walkers(0:NIfTot,n_keep)
integer(kind=n_int), intent(in), optional :: opt_source(0:,1:)
integer(kind=int64), intent(in), optional :: opt_source_size
real(kind=dp), intent(out), optional :: norm

public subroutine global_most_populated_states(n_keep, run, largest_walkers, norm, rank_of_largest, hdiag_largest)

@brief Return the most populated states over all processors.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_keep
integer, intent(in) :: run
integer(kind=n_int), intent(out) :: largest_walkers(0:NIfTot,n_keep)
real(kind=dp), intent(out), optional :: norm
integer, intent(out), optional :: rank_of_largest(n_keep)
real(kind=dp), intent(inout), optional :: hdiag_largest(n_keep)

public subroutine return_proc_share(n_keep, min_vals, max_vals, lengths, list, n_dets_this_proc)

Specialized routine that returns the number of determinants that are going into the core-space on this processor. Once the leading determinants have been obtained on each processor, this function requires the minimal and maximal populations among these for all processors (requires previous MPI_Gather), then the procedure to determine the core-space size on this processor is as follows: 1) Get the minimum of the maximal populations, then count the number of determinants above this population. This count is then broadcasted to the other procs, and the total number of determinants above the smallest maximum is determined. If it is smaller than the core-space size, these determinants are put into the core-space, else we repeat with the second smallest of the maximal populations, and so on. 2) Get the maximum of the minimal populations, then count the number of determinants below this population. This count is then broadcasted to the other procs, and the total number of determinants below the largest minimum is determined. If the number of determinants that are remaining (i.e. larger than the largest minimum and smaller than the smallest maximum) is sufficient to fill up the core-space (in particular, the smallest maximum has to be bigger than the largest minimum), the small determinants are discarded. Else, we repeat this with the second largest minimum, and so on. 3) From the remaining determinants, each processor contributes a share that equals to the ratio of the remaining determinants on this proc to the total remaining determinants @param[in] n_keep core-space size @param[in] min_vals minimal population of the canditates per processor @param[in] max_vals maximal population of the canditates per processor @param[in] lengths number of candidates per processor @param[in] list candidates on this processor @param[out] n_dets_this_proc number of core-space determinants on this processor

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_keep
real(kind=dp), intent(inout) :: min_vals(0:nProcessors-1)
real(kind=dp), intent(inout) :: max_vals(0:nProcessors-1)
integer, intent(in) :: lengths(0:nProcessors-1)
real(kind=dp), intent(in) :: list(:)
integer, intent(out) :: n_dets_this_proc

public subroutine return_largest_indices(n_keep, list_size, list, largest_indices)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_keep
integer, intent(in) :: list_size
real(kind=dp), intent(in) :: list(list_size)
integer, intent(out) :: largest_indices(n_keep)

public subroutine start_walkers_from_core_ground(tPrintInfo, run)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: tPrintInfo
integer, intent(in) :: run

public subroutine start_walkers_from_core_ground_nonhermit(tPrintInfo, run)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: tPrintInfo
integer, intent(in) :: run

public subroutine diagonalize_core(e_value, e_vector, rep)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(out) :: e_value
real(kind=dp), intent(out), allocatable :: e_vector(:)
type(core_space_t), intent(in) :: rep

public subroutine create_sparse_ham_from_core(rep)

Arguments

Type IntentOptional Attributes Name
type(core_space_t), intent(in) :: rep

public subroutine diagonalize_core_non_hermitian(e_values, e_vectors, rep)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(out), allocatable :: e_values(:)
real(kind=dp), allocatable :: e_vectors(:,:)
type(core_space_t), intent(in) :: rep

public subroutine print_basis(rep)

Arguments

Type IntentOptional Attributes Name
type(core_space_t), intent(in) :: rep

public subroutine print_hamiltonian(rep)

Arguments

Type IntentOptional Attributes Name
type(core_space_t), intent(in) :: rep

public subroutine calc_determin_hamil_full(hamil, rep)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(out), allocatable :: hamil(:,:)
type(core_space_t) :: rep

public subroutine copy_core_dets_to_spawnedparts(rep)

Arguments

Type IntentOptional Attributes Name
type(core_space_t), intent(in) :: rep

public subroutine return_mp1_amp_and_mp2_energy(nI, ilut, ex, tParity, amp, energy_contrib)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nI(nel)
integer(kind=n_int), intent(in) :: ilut(0:NIfTot)
integer, intent(in) :: ex(2,maxExcit)
logical, intent(in) :: tParity
real(kind=dp), intent(out) :: amp
real(kind=dp), intent(out) :: energy_contrib

public subroutine reinit_current_trial_amps()

Arguments

None

public subroutine end_semistoch()

Arguments

None