parameter(MPI_SUBVERSION=1)
parameter(MPI_LOCK_EXCLUSIVE=1)
parameter(MPI_LOCK_SHARED=2)
+
+
integer MPI_MODE_NOSTORE, MPI_MODE_NOPUT, MPI_MODE_NOPRECEDE
integer MPI_MODE_NOSUCCEED, MPI_MODE_NOCHECK
parameter(MPI_MODE_NOSTORE=1)
integer MPI_MODE_RDONLY, MPI_MODE_RDWR, MPI_MODE_WRONLY
integer MPI_MODE_CREATE, MPI_MODE_EXCL, MPI_MODE_DELETE_ON_CLOSE
integer MPI_MODE_UNIQUE_OPEN, MPI_MODE_APPEND, MPI_MODE_SEQUENTIAL
+ integer MPI_FILE_NULL
+ integer MPI_DISPLACEMENT_CURRENT, MPI_SEEK_SET, MPI_SEEK_CUR
+ integer MPI_MAX_DATAREP_STRING
+ parameter(MPI_FILE_NULL=0)
+ parameter(MPI_DISPLACEMENT_CURRENT=-54278278)
+ parameter(MPI_SEEK_SET=600)
+ parameter(MPI_SEEK_CUR=602)
+ parameter(MPI_MAX_DATAREP_STRING=128)
parameter( MPI_MODE_RDONLY=2)
parameter( MPI_MODE_RDWR=8)
double min_bound = -1;
XBT_DEBUG("Active constraints : %zu", cnst_list.size());
- /* Init: Only modified code portions: reset the value of active variables */
- for (Constraint const& cnst : cnst_list) {
- for (Element const& elem : cnst.enabled_element_set_) {
- xbt_assert(elem.variable->sharing_penalty_ > 0.0);
- elem.variable->value_ = 0.0;
- }
- }
-
- ConstraintLight* cnst_light_tab = new ConstraintLight[cnst_list.size()]();
+ cnst_light_vec.reserve(cnst_list.size());
+ ConstraintLight* cnst_light_tab = cnst_light_vec.data();
int cnst_light_num = 0;
- dyn_light_t saturated_constraints;
for (Constraint& cnst : cnst_list) {
/* INIT: Collect constraints that actually need to be saturated (i.e remaining and usage are strictly positive)
continue;
cnst.usage_ = 0;
for (Element& elem : cnst.enabled_element_set_) {
- xbt_assert(elem.variable->sharing_penalty_ > 0);
+ xbt_assert(elem.variable->sharing_penalty_ > 0.0);
+ elem.variable->value_ = 0.0;
if (elem.consumption_weight > 0) {
if (cnst.sharing_policy_ != s4u::Link::SharingPolicy::FATPIPE)
cnst.usage_ += elem.consumption_weight / elem.variable->sharing_penalty_;
check_concurrency();
- delete[] cnst_light_tab;
}
/** @brief Attribute the value bound to var->bound.
resource::Action::ModifiedSet* modified_set_ = nullptr;
private:
+
+ typedef std::vector<int> dyn_light_t;
+
+ //Data used in lmm::solve
+ std::vector<ConstraintLight> cnst_light_vec;
+ dyn_light_t saturated_constraints;
+
bool selective_update_active; /* flag to update partially the system only selecting changed portions */
unsigned visited_counter_ = 1; /* used by System::update_modified_set() and System::remove_all_modified_set() to
* cleverly (un-)flag the constraints (more details in these functions) */