Commit f811b86e authored by Augustin Degomme's avatar Augustin Degomme

Merge branch 'master' into 'master'

Master

See merge request !23
parents 5172762d 04574c72
Pipeline #192456 passed with stages
in 24 minutes and 34 seconds
......@@ -39,6 +39,8 @@
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)
......@@ -241,6 +243,14 @@
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)
......
......@@ -505,17 +505,9 @@ template <class CnstList> void System::lmm_solve(CnstList& cnst_list)
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)
......@@ -525,7 +517,8 @@ template <class CnstList> void System::lmm_solve(CnstList& cnst_list)
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_;
......@@ -689,7 +682,6 @@ template <class CnstList> void System::lmm_solve(CnstList& cnst_list)
check_concurrency();
delete[] cnst_light_tab;
}
/** @brief Attribute the value bound to var->bound.
......
......@@ -531,6 +531,13 @@ public:
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) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment