#include <utility>
#include "BCP_string.hpp"
#include "BCP_vector.hpp"
#include "BCP_message_tag.hpp"
#include "BCP_parameters.hpp"
#include "BCP_enum_tm.hpp"
#include "BCP_enum_process_t.hpp"
Go to the source code of this file.
Macros | |
#define | BCP__DUMP_PROCINFO 0 |
#define BCP__DUMP_PROCINFO 0 |
Definition at line 15 of file BCP_tm_functions.hpp.
void BCP_tm_parse_command_line | ( | BCP_tm_prob & | p, |
const int | argnum, | ||
const char *const * | arglist | ||
) |
Definition at line 13 of file BCP_tm_commandline.cpp.
bool BCP_tm_do_one_phase | ( | BCP_tm_prob & | p | ) |
Definition at line 306 of file BCP_tm_main.cpp.
BCP_problem_core* BCP_tm_create_core | ( | BCP_tm_prob & | p | ) |
Definition at line 347 of file BCP_tm_main.cpp.
BCP_tm_node* BCP_tm_create_root | ( | BCP_tm_prob & | p | ) |
Definition at line 418 of file BCP_tm_main.cpp.
void BCP_tm_tasks_before_new_phase | ( | BCP_tm_prob & | p | ) |
Definition at line 501 of file BCP_tm_main.cpp.
void BCP_tm_trim_tree_wrapper | ( | BCP_tm_prob & | p, |
const bool | between_phases | ||
) |
Definition at line 18 of file BCP_tm_trimming.cpp.
void BCP_tm_remove_explored | ( | BCP_tm_prob & | p, |
BCP_tm_node * | node | ||
) |
Definition at line 180 of file BCP_tm_trimming.cpp.
bool BCP_tm_is_data_balanced | ( | BCP_tm_prob & | p | ) |
This function is invoked from exactly one place, the beginning of BCP_tm_unpack_node_description().
So any time when data is received we call this function to decide if data balancing is needed or not. There may be another call from BCP_tm_do_one_phase() to keep the TM busy if it's idle.
Definition at line 98 of file BCP_tm_nodes_to_storage.cpp.
bool BCP_tm_balance_data | ( | BCP_tm_prob & | p | ) |
This function is invoked after data from an LP is unpacked (and only if p.need_a_TS
is true).
And maybe from BCP_tm_do_one_phase() to keep the TM busy if it's idle. It returns true/false depending on whether further balancing is needed.
First we try to get hold of a TS. This might come from an existing TS or we might try to convert an LP into a TS. If neither succeeds we leave the flag on and return. The flag will ensure that no LP will be allowed to dive until the flag is cleared. Therefore the LP that has sent the data that triggered the call to to this function through the call to BCP_tm_unpack_node_description() will be free when the next LP sends some data. So at that time we will be able to balance. (NOTE: if the TM is idle, we might invoke this routine to do some useful work.)
If we managed to get hold of a TS then we do the balancing
Definition at line 138 of file BCP_tm_nodes_to_storage.cpp.
void BCP_tm_idle_processes | ( | BCP_tm_prob & | p | ) |
Definition at line 19 of file BCP_tm_msgproc.cpp.
void BCP_tm_stop_processes | ( | BCP_tm_prob & | p | ) |
Definition at line 27 of file BCP_tm_msgproc.cpp.
void BCP_tm_start_processes | ( | BCP_tm_prob & | p | ) |
Definition at line 35 of file BCP_tm_msgproc.cpp.
bool BCP_tm_test_machine | ( | BCP_tm_prob & | p | ) |
Definition at line 521 of file BCP_tm_msgproc.cpp.
void BCP_tm_modify_pool_counters | ( | BCP_tm_prob & | p, |
BCP_tm_node * | node | ||
) |
Definition at line 569 of file BCP_tm_msgproc.cpp.
void BCP_tm_remove_lp | ( | BCP_tm_prob & | p, |
const int | index | ||
) |
Definition at line 602 of file BCP_tm_msgproc.cpp.
void BCP_tm_remove_cg | ( | BCP_tm_prob & | p, |
const int | index | ||
) |
Definition at line 655 of file BCP_tm_msgproc.cpp.
void BCP_tm_remove_vg | ( | BCP_tm_prob & | p, |
const int | index | ||
) |
Definition at line 662 of file BCP_tm_msgproc.cpp.
void BCP_tm_notify_about_new_phase | ( | BCP_tm_prob & | p | ) |
Definition at line 110 of file BCP_tm_msgproc.cpp.
void BCP_tm_notify_process_type | ( | BCP_tm_prob & | p, |
BCP_process_t | ptype, | ||
int | num, | ||
const int * | pids | ||
) |
Definition at line 163 of file BCP_tm_msgproc.cpp.
void BCP_tm_notify_processes | ( | BCP_tm_prob & | p | ) |
Definition at line 210 of file BCP_tm_msgproc.cpp.
void BCP_tm_unpack_priced_root | ( | BCP_tm_prob & | p, |
BCP_buffer & | buf | ||
) |
Definition at line 672 of file BCP_tm_msgproc.cpp.
void BCP_tm_free_procs_of_node | ( | BCP_tm_prob & | p, |
BCP_tm_node * | node | ||
) |
Definition at line 690 of file BCP_tm_msgproc.cpp.
void BCP_tm_send_node | ( | BCP_tm_prob & | p, |
const BCP_tm_node * | node, | ||
const BCP_message_tag | msgtag | ||
) |
void BCP_print_memusage | ( | BCP_tm_prob & | p | ) |
Definition at line 94 of file BCP_tm_msg_node_rec.cpp.
BCP_vec<int>* BCP_tm_unpack_noncore_vars | ( | USER_packing & | user, |
BCP_buffer & | buf, | ||
BCP_var_set_change & | var_ch, | ||
BCP_vec< BCP_var * > & | varlist | ||
) |
BCP_vec<int>* BCP_tm_unpack_noncore_cuts | ( | USER_packing & | user, |
BCP_buffer & | buf, | ||
BCP_cut_set_change & | cut_ch, | ||
BCP_vec< BCP_cut * > & | cutlist | ||
) |
void BCP_tm_unpack_node_with_branching_info | ( | BCP_tm_prob & | p, |
BCP_buffer & | buf | ||
) |
Definition at line 707 of file BCP_tm_msg_node_rec.cpp.
BCP_tm_node* BCP_tm_unpack_node_no_branching_info | ( | BCP_tm_prob & | p, |
BCP_buffer & | buf | ||
) |
Definition at line 721 of file BCP_tm_msg_node_rec.cpp.
BCP_vec< std::pair<int, int> >::iterator BCP_tm_identify_process | ( | BCP_vec< std::pair< int, int > > & | proclist, |
int | proc | ||
) |
Definition at line 16 of file BCP_tm_functions.cpp.
bool BCP_tm_assign_processes | ( | BCP_tm_prob & | p, |
BCP_tm_node * | node | ||
) |
Definition at line 31 of file BCP_tm_functions.cpp.
BCP_node_start_result BCP_tm_start_new_nodes | ( | BCP_tm_prob & | p | ) |
Definition at line 267 of file BCP_tm_functions.cpp.
void BCP_tm_list_candidates | ( | BCP_tm_prob & | p | ) |
Definition at line 289 of file BCP_tm_functions.cpp.
void BCP_check_parameters | ( | BCP_tm_prob & | p | ) |
Definition at line 305 of file BCP_tm_functions.cpp.
void BCP_sanity_checks | ( | BCP_tm_prob & | p | ) |
Definition at line 377 of file BCP_tm_functions.cpp.
void BCP_tm_save_root_cuts | ( | BCP_tm_prob * | tm | ) |
Definition at line 37 of file BCP_tm_statistics.cpp.
void BCP_tm_wrapup | ( | BCP_tm_prob * | tm, |
BCP_lp_prob * | lp, | ||
BCP_cg_prob * | cg, | ||
BCP_vg_prob * | vg, | ||
bool | final_stat | ||
) |
Definition at line 71 of file BCP_tm_statistics.cpp.