+ if (load_to_send >= opt::min_transfer_amount) {
+ nb.set_to_send(0.0);
+ real_load -= load_to_send;
+ } else {
+ load_to_send = 0.0;
+ }
+ }
+ while (load_to_send > 0.0) {
+ double amount;
+ if (opt::max_transfer_amount)
+ amount = std::min(load_to_send, opt::max_transfer_amount);
+ else
+ amount = load_to_send;
+ comm.data_send(nb.get_data_mbox(), new message(message::LOAD, amount));
+ load_to_send -= amount;