Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Also run the energy tests with ptask_L07 model.
[simgrid.git] / src / surf / host_ptask_L07.cpp
1 /* Copyright (c) 2007-2010, 2013-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include <cstdlib>
8
9 #include <algorithm>
10
11 #include "host_ptask_L07.hpp"
12
13 #include "cpu_interface.hpp"
14 #include "surf_routing.hpp"
15 #include "xbt/lib.h"
16 #include "src/surf/platform.hpp"
17
18 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host);
19 XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg);
20
21 /**************************************/
22 /*** Resource Creation & Destruction **/
23 /**************************************/
24
25 static void ptask_netlink_parse_init(sg_platf_link_cbarg_t link)
26 {
27   netlink_parse_init(link);
28   current_property_set = NULL;
29 }
30
31 void surf_host_model_init_ptask_L07(void)
32 {
33   XBT_CINFO(xbt_cfg,"Switching to the L07 model to handle parallel tasks.");
34   xbt_assert(!surf_cpu_model_pm, "CPU model type already defined");
35   xbt_assert(!surf_network_model, "network model type already defined");
36
37   // Define the callbacks to parse the XML
38   simgrid::surf::on_link.connect(ptask_netlink_parse_init);
39   simgrid::surf::on_postparse.connect([](){
40       surf_host_model->addTraces();
41   });
42
43   surf_host_model = new simgrid::surf::HostL07Model();
44   xbt_dynar_push(all_existing_models, &surf_host_model);
45 }
46
47
48 namespace simgrid {
49 namespace surf {
50
51 HostL07Model::HostL07Model() : HostModel() {
52   p_maxminSystem = lmm_system_new(1);
53   surf_network_model = new NetworkL07Model(this,p_maxminSystem);
54   surf_cpu_model_pm = new CpuL07Model(this,p_maxminSystem);
55
56   routing_model_create(surf_network_model->createLink("__loopback__",
57                                                           498000000, NULL,
58                                                           0.000015, NULL,
59                                                           1/*ON*/, NULL,
60                                                           SURF_LINK_FATPIPE, NULL));
61 }
62
63 HostL07Model::~HostL07Model() {
64   delete surf_cpu_model_pm;
65   delete surf_network_model;
66 }
67
68 CpuL07Model::CpuL07Model(HostL07Model *hmodel,lmm_system_t sys)
69         : CpuModel()
70         , p_hostModel(hmodel)
71         {
72           p_maxminSystem = sys;
73         }
74 CpuL07Model::~CpuL07Model() {
75         surf_cpu_model_pm = NULL;
76         p_maxminSystem = NULL; // Avoid multi-free
77 }
78 NetworkL07Model::NetworkL07Model(HostL07Model *hmodel, lmm_system_t sys)
79         : NetworkModel()
80         , p_hostModel(hmodel)
81         {
82           p_maxminSystem = sys;
83         }
84 NetworkL07Model::~NetworkL07Model()
85 {
86         surf_network_model = NULL;
87         p_maxminSystem = NULL; // Avoid multi-free
88 }
89
90
91 double HostL07Model::shareResources(double /*now*/)
92 {
93   L07Action *action;
94
95   ActionList *running_actions = getRunningActionSet();
96   double min = this->shareResourcesMaxMin(running_actions,
97                                               p_maxminSystem,
98                                               bottleneck_solve);
99
100   for(ActionList::iterator it(running_actions->begin()), itend(running_actions->end())
101          ; it != itend ; ++it) {
102         action = static_cast<L07Action*>(&*it);
103     if (action->m_latency > 0) {
104       if (min < 0) {
105         min = action->m_latency;
106         XBT_DEBUG("Updating min (value) with %p (start %f): %f", action,
107                action->getStartTime(), min);
108       } else if (action->m_latency < min) {
109         min = action->m_latency;
110         XBT_DEBUG("Updating min (latency) with %p (start %f): %f", action,
111                action->getStartTime(), min);
112       }
113     }
114   }
115
116   XBT_DEBUG("min value : %f", min);
117
118   return min;
119 }
120
121 void HostL07Model::updateActionsState(double /*now*/, double delta) {
122
123   L07Action *action;
124   ActionList *actionSet = getRunningActionSet();
125
126   for(ActionList::iterator it = actionSet->begin(), itNext = it
127          ; it != actionSet->end()
128          ; it =  itNext) {
129         ++itNext;
130     action = static_cast<L07Action*>(&*it);
131     if (action->m_latency > 0) {
132       if (action->m_latency > delta) {
133         double_update(&(action->m_latency), delta, sg_surf_precision);
134       } else {
135         action->m_latency = 0.0;
136       }
137       if ((action->m_latency == 0.0) && (action->isSuspended() == 0)) {
138         action->updateBound();
139         lmm_update_variable_weight(p_maxminSystem, action->getVariable(), 1.0);
140       }
141     }
142     XBT_DEBUG("Action (%p) : remains (%g) updated by %g.",
143            action, action->getRemains(), lmm_variable_getvalue(action->getVariable()) * delta);
144     action->updateRemains(lmm_variable_getvalue(action->getVariable()) * delta);
145
146     if (action->getMaxDuration() != NO_MAX_DURATION)
147       action->updateMaxDuration(delta);
148
149     XBT_DEBUG("Action (%p) : remains (%g).", action, action->getRemains());
150
151     /* In the next if cascade, the action can be finished either because:
152      *  - The amount of remaining work reached 0
153      *  - The max duration was reached
154      * If it's not done, it may have failed.
155      */
156
157     if ((action->getRemains() <= 0) &&
158         (lmm_get_variable_weight(action->getVariable()) > 0)) {
159       action->finish();
160       action->setState(SURF_ACTION_DONE);
161     } else if ((action->getMaxDuration() != NO_MAX_DURATION) &&
162                (action->getMaxDuration() <= 0)) {
163       action->finish();
164       action->setState(SURF_ACTION_DONE);
165     } else {
166       /* Need to check that none of the model has failed */
167       lmm_constraint_t cnst = NULL;
168       int i = 0;
169
170       while ((cnst = lmm_get_cnst_from_var(p_maxminSystem, action->getVariable(), i++))) {
171         void *constraint_id = lmm_constraint_id(cnst);
172
173         if (static_cast<Host*>(constraint_id)->isOff()) {
174           XBT_DEBUG("Action (%p) Failed!!", action);
175           action->finish();
176           action->setState(SURF_ACTION_FAILED);
177           break;
178         }
179       }
180     }
181   }
182   return;
183 }
184
185 Action *HostL07Model::executeParallelTask(int host_nb, sg_host_t *host_list,
186                   double *flops_amount, double *bytes_amount,
187                   double rate) {
188         return new L07Action(this, host_nb, host_list, flops_amount, bytes_amount, rate);
189 }
190
191
192 L07Action::L07Action(Model *model, int host_nb,
193                 sg_host_t*host_list,
194                 double *flops_amount,
195                 double *bytes_amount,
196                 double rate)
197         : CpuAction(model, 1, 0)
198 {
199   unsigned int cpt;
200   int nb_link = 0;
201   int nb_used_host = 0; /* Only the hosts with something to compute (>0 flops) are counted) */
202   double latency = 0.0;
203
204   xbt_dict_t ptask_parallel_task_link_set = xbt_dict_new_homogeneous(NULL);
205
206   this->p_netcardList->reserve(host_nb);
207   for (int i = 0; i<host_nb; i++)
208           this->p_netcardList->push_back(host_list[i]->pimpl_netcard);
209
210   /* Compute the number of affected resources... */
211   for (int i = 0; i < host_nb; i++) {
212     for (int j = 0; j < host_nb; j++) {
213       xbt_dynar_t route=NULL;
214
215       if (bytes_amount[i * host_nb + j] > 0) {
216         double lat=0.0;
217         unsigned int cpt;
218         void *_link;
219         LinkL07 *link;
220
221         routing_platf->getRouteAndLatency((*this->p_netcardList)[i], (*this->p_netcardList)[j],
222                                                   &route, &lat);
223         latency = MAX(latency, lat);
224
225         xbt_dynar_foreach(route, cpt, _link) {
226            link = static_cast<LinkL07*>(_link);
227            xbt_dict_set(ptask_parallel_task_link_set, link->getName(), link, NULL);
228         }
229       }
230     }
231   }
232
233   nb_link = xbt_dict_length(ptask_parallel_task_link_set);
234   xbt_dict_free(&ptask_parallel_task_link_set);
235
236   for (int i = 0; i < host_nb; i++)
237     if (flops_amount[i] > 0)
238       nb_used_host++;
239
240   XBT_DEBUG("Creating a parallel task (%p) with %d cpus and %d links.",
241          this, host_nb, nb_link);
242   this->p_computationAmount = flops_amount;
243   this->p_communicationAmount = bytes_amount;
244   this->m_latency = latency;
245   this->m_rate = rate;
246
247   this->p_variable = lmm_variable_new(model->getMaxminSystem(), this, 1.0,
248                                         (rate > 0 ? rate : -1.0),
249                                                                                 host_nb + nb_link);
250
251   if (this->m_latency > 0)
252     lmm_update_variable_weight(model->getMaxminSystem(), this->getVariable(), 0.0);
253
254   for (int i = 0; i < host_nb; i++)
255     lmm_expand(model->getMaxminSystem(),
256                host_list[i]->pimpl_cpu->getConstraint(),
257                this->getVariable(), flops_amount[i]);
258
259   for (int i = 0; i < host_nb; i++) {
260     for (int j = 0; j < host_nb; j++) {
261       void *_link;
262
263       xbt_dynar_t route=NULL;
264       if (bytes_amount[i * host_nb + j] == 0.0)
265         continue;
266
267       routing_platf->getRouteAndLatency((*this->p_netcardList)[i], (*this->p_netcardList)[j],
268                                             &route, NULL);
269
270       xbt_dynar_foreach(route, cpt, _link) {
271         LinkL07 *link = static_cast<LinkL07*>(_link);
272         lmm_expand_add(model->getMaxminSystem(), link->getConstraint(),
273                        this->getVariable(),
274                        bytes_amount[i * host_nb + j]);
275       }
276     }
277   }
278
279   if (nb_link + nb_used_host == 0) {
280     this->setCost(1.0);
281     this->setRemains(0.0);
282   }
283 }
284
285 Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst,
286                                        double size, double rate)
287 {
288   sg_host_t*host_list = xbt_new0(sg_host_t, 2);
289   double *flops_amount = xbt_new0(double, 2);
290   double *bytes_amount = xbt_new0(double, 4);
291   Action *res = NULL;
292
293   host_list[0] = sg_host_by_name(src->getName());
294   host_list[1] = sg_host_by_name(dst->getName());
295   bytes_amount[1] = size;
296
297   res = p_hostModel->executeParallelTask(2, host_list,
298                                     flops_amount,
299                                     bytes_amount, rate);
300
301   return res;
302 }
303
304 Cpu *CpuL07Model::createCpu(simgrid::s4u::Host *host,  xbt_dynar_t powerPeakList,
305                           int pstate, double power_scale,
306                           tmgr_trace_t power_trace, int core,
307                           int initiallyOn,
308                           tmgr_trace_t state_trace)
309 {
310   CpuL07 *cpu = new CpuL07(this, host, powerPeakList, pstate, power_scale, power_trace,
311                          core, initiallyOn, state_trace);
312   return cpu;
313 }
314
315 Link* NetworkL07Model::createLink(const char *name,
316                                  double bw_initial,
317                                  tmgr_trace_t bw_trace,
318                                  double lat_initial,
319                                  tmgr_trace_t lat_trace,
320                                  int initiallyOn,
321                                  tmgr_trace_t state_trace,
322                                  e_surf_link_sharing_policy_t policy,
323                                  xbt_dict_t properties)
324 {
325   xbt_assert(!Link::byName(name),
326                  "Link '%s' declared several times in the platform file.", name);
327
328   Link* link = new LinkL07(this, name, properties,
329                              bw_initial, bw_trace,
330                                          lat_initial, lat_trace,
331                                          initiallyOn, state_trace,
332                                          policy);
333   Link::onCreation(link);
334   return link;
335 }
336
337 void HostL07Model::addTraces()
338 {
339   xbt_dict_cursor_t cursor = NULL;
340   char *trace_name, *elm;
341
342   if (!trace_connect_list_host_avail)
343     return;
344
345   /* Connect traces relative to cpu */
346   xbt_dict_foreach(trace_connect_list_host_avail, cursor, trace_name, elm) {
347     tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name);
348     CpuL07 *host = static_cast<CpuL07*>(sg_host_by_name(elm)->pimpl_cpu);
349
350     xbt_assert(host, "Host %s undefined", elm);
351     xbt_assert(trace, "Trace %s undefined", trace_name);
352
353     host->p_stateEvent = tmgr_history_add_trace(history, trace, 0.0, 0, host);
354   }
355
356   xbt_dict_foreach(trace_connect_list_power, cursor, trace_name, elm) {
357     tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name);
358     CpuL07 *host = static_cast<CpuL07*>(sg_host_by_name(elm)->pimpl_cpu);
359
360     xbt_assert(host, "Host %s undefined", elm);
361     xbt_assert(trace, "Trace %s undefined", trace_name);
362
363     host->p_speedEvent = tmgr_history_add_trace(history, trace, 0.0, 0, host);
364   }
365
366   /* Connect traces relative to network */
367   xbt_dict_foreach(trace_connect_list_link_avail, cursor, trace_name, elm) {
368     tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name);
369     LinkL07 *link = static_cast<LinkL07*>(Link::byName(elm));
370
371     xbt_assert(link, "Link %s undefined", elm);
372     xbt_assert(trace, "Trace %s undefined", trace_name);
373
374     link->p_stateEvent = tmgr_history_add_trace(history, trace, 0.0, 0, link);
375   }
376
377   xbt_dict_foreach(trace_connect_list_bandwidth, cursor, trace_name, elm) {
378     tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name);
379     LinkL07 *link = static_cast<LinkL07*>(Link::byName(elm));
380
381     xbt_assert(link, "Link %s undefined", elm);
382     xbt_assert(trace, "Trace %s undefined", trace_name);
383
384     link->p_bwEvent = tmgr_history_add_trace(history, trace, 0.0, 0, link);
385   }
386
387   xbt_dict_foreach(trace_connect_list_latency, cursor, trace_name, elm) {
388     tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name);
389     LinkL07 *link = static_cast<LinkL07*>(Link::byName(elm));
390
391     xbt_assert(link, "Link %s undefined", elm);
392     xbt_assert(trace, "Trace %s undefined", trace_name);
393
394     link->p_latEvent = tmgr_history_add_trace(history, trace, 0.0, 0, link);
395   }
396 }
397
398 /************
399  * Resource *
400  ************/
401
402 CpuL07::CpuL07(CpuL07Model *model, simgrid::s4u::Host *host,
403                      xbt_dynar_t speedPeakList, int pstate,
404                                  double speedScale, tmgr_trace_t speedTrace,
405                          int core, int initiallyOn, tmgr_trace_t state_trace)
406  : Cpu(model, host, speedPeakList, pstate,
407            core, xbt_dynar_get_as(speedPeakList,pstate,double), speedScale, initiallyOn)
408 {
409   p_constraint = lmm_constraint_new(model->getMaxminSystem(), this, xbt_dynar_get_as(speedPeakList,pstate,double) * speedScale);
410
411   if (speedTrace)
412     p_speedEvent = tmgr_history_add_trace(history, speedTrace, 0.0, 0, this);
413   else
414     p_speedEvent = NULL;
415
416   if (state_trace)
417         p_stateEvent = tmgr_history_add_trace(history, state_trace, 0.0, 0, this);
418 }
419
420 CpuL07::~CpuL07()
421 {
422 }
423
424 LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props,
425                          double bw_initial,
426                          tmgr_trace_t bw_trace,
427                          double lat_initial,
428                          tmgr_trace_t lat_trace,
429                          int initiallyOn,
430                          tmgr_trace_t state_trace,
431                          e_surf_link_sharing_policy_t policy)
432  : Link(model, name, props, lmm_constraint_new(model->getMaxminSystem(), this, bw_initial), history, state_trace)
433 {
434   m_bwCurrent = bw_initial;
435   if (bw_trace)
436     p_bwEvent = tmgr_history_add_trace(history, bw_trace, 0.0, 0, this);
437
438   if (initiallyOn)
439     turnOn();
440   else
441     turnOff();
442   m_latCurrent = lat_initial;
443
444   if (lat_trace)
445         p_latEvent = tmgr_history_add_trace(history, lat_trace, 0.0, 0, this);
446
447   if (policy == SURF_LINK_FATPIPE)
448         lmm_constraint_shared(getConstraint());
449 }
450
451 Action *CpuL07::execute(double size)
452 {
453   sg_host_t*host_list = xbt_new0(sg_host_t, 1);
454   double *flops_amount = xbt_new0(double, 1);
455   double *bytes_amount = xbt_new0(double, 1);
456
457   host_list[0] = getHost();
458   flops_amount[0] = size;
459
460   return static_cast<CpuL07Model*>(getModel())
461     ->p_hostModel
462     ->executeParallelTask( 1, host_list, flops_amount, bytes_amount, -1);
463 }
464
465 Action *CpuL07::sleep(double duration)
466 {
467   L07Action *action = NULL;
468
469   XBT_IN("(%s,%g)", getName(), duration);
470
471   action = static_cast<L07Action*>(execute(1.0));
472   action->m_maxDuration = duration;
473   action->m_suspended = 2;
474   lmm_update_variable_weight(getModel()->getMaxminSystem(), action->getVariable(), 0.0);
475
476   XBT_OUT();
477   return action;
478 }
479
480 bool CpuL07::isUsed(){
481   return lmm_constraint_used(getModel()->getMaxminSystem(), getConstraint());
482 }
483
484 /** @brief take into account changes of speed (either load or max) */
485 void CpuL07::onSpeedChange() {
486         lmm_variable_t var = NULL;
487         lmm_element_t elem = NULL;
488
489     lmm_update_constraint_bound(getModel()->getMaxminSystem(), getConstraint(), m_speedPeak * m_speedScale);
490     while ((var = lmm_get_var_from_cnst
491             (getModel()->getMaxminSystem(), getConstraint(), &elem))) {
492       Action *action = static_cast<Action*>(lmm_variable_id(var));
493
494       lmm_update_variable_bound(getModel()->getMaxminSystem(),
495                                 action->getVariable(),
496                                 m_speedScale * m_speedPeak);
497     }
498
499         Cpu::onSpeedChange();
500 }
501
502
503 bool LinkL07::isUsed(){
504   return lmm_constraint_used(getModel()->getMaxminSystem(), getConstraint());
505 }
506
507 void CpuL07::updateState(tmgr_trace_event_t event_type, double value, double /*date*/){
508   XBT_DEBUG("Updating cpu %s (%p) with value %g", getName(), this, value);
509   if (event_type == p_speedEvent) {
510         m_speedScale = value;
511         onSpeedChange();
512     if (tmgr_trace_event_free(event_type))
513       p_speedEvent = NULL;
514   } else if (event_type == p_stateEvent) {
515     if (value > 0)
516       turnOn();
517     else
518       turnOff();
519     if (tmgr_trace_event_free(event_type))
520       p_stateEvent = NULL;
521   } else {
522     XBT_CRITICAL("Unknown event ! \n");
523     xbt_abort();
524   }
525   return;
526 }
527
528 void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double date) {
529   XBT_DEBUG("Updating link %s (%p) with value=%f for date=%g", getName(), this, value, date);
530   if (event_type == p_bwEvent) {
531     updateBandwidth(value, date);
532     if (tmgr_trace_event_free(event_type))
533       p_bwEvent = NULL;
534   } else if (event_type == p_latEvent) {
535     updateLatency(value, date);
536     if (tmgr_trace_event_free(event_type))
537       p_latEvent = NULL;
538   } else if (event_type == p_stateEvent) {
539     if (value > 0)
540       turnOn();
541     else
542       turnOff();
543     if (tmgr_trace_event_free(event_type))
544       p_stateEvent = NULL;
545   } else {
546     XBT_CRITICAL("Unknown event ! \n");
547     xbt_abort();
548   }
549   return;
550 }
551
552 double LinkL07::getBandwidth()
553 {
554   return m_bwCurrent;
555 }
556
557 void LinkL07::updateBandwidth(double value, double date)
558 {
559   m_bwCurrent = value;
560   lmm_update_constraint_bound(getModel()->getMaxminSystem(), getConstraint(), m_bwCurrent);
561 }
562
563 void LinkL07::updateLatency(double value, double date)
564 {
565   lmm_variable_t var = NULL;
566   L07Action *action;
567   lmm_element_t elem = NULL;
568
569   m_latCurrent = value;
570   while ((var = lmm_get_var_from_cnst(getModel()->getMaxminSystem(), getConstraint(), &elem))) {
571     action = static_cast<L07Action*>(lmm_variable_id(var));
572     action->updateBound();
573   }
574 }
575
576 /**********
577  * Action *
578  **********/
579
580 L07Action::~L07Action(){
581   free(p_communicationAmount);
582   free(p_computationAmount);
583 }
584
585 void L07Action::updateBound()
586 {
587   double lat_current = 0.0;
588   double lat_bound = -1.0;
589   int i, j;
590
591   int hostNb = p_netcardList->size();
592
593   for (i = 0; i < hostNb; i++) {
594     for (j = 0; j < hostNb; j++) {
595       xbt_dynar_t route=NULL;
596
597       if (p_communicationAmount[i * hostNb + j] > 0) {
598         double lat = 0.0;
599         routing_platf->getRouteAndLatency((*p_netcardList)[i], (*p_netcardList)[j],
600                                                           &route, &lat);
601
602         lat_current = MAX(lat_current, lat * p_communicationAmount[i * hostNb + j]);
603       }
604     }
605   }
606   lat_bound = sg_tcp_gamma / (2.0 * lat_current);
607   XBT_DEBUG("action (%p) : lat_bound = %g", this, lat_bound);
608   if ((m_latency == 0.0) && (m_suspended == 0)) {
609     if (m_rate < 0)
610       lmm_update_variable_bound(getModel()->getMaxminSystem(), getVariable(), lat_bound);
611     else
612       lmm_update_variable_bound(getModel()->getMaxminSystem(), getVariable(),
613         std::min(m_rate, lat_bound));
614   }
615 }
616
617 int L07Action::unref()
618 {
619   m_refcount--;
620   if (!m_refcount) {
621     if (action_hook.is_linked())
622           p_stateSet->erase(p_stateSet->iterator_to(*this));
623     if (getVariable())
624       lmm_variable_free(getModel()->getMaxminSystem(), getVariable());
625     delete this;
626     return 1;
627   }
628   return 0;
629 }
630
631 void L07Action::suspend()
632 {
633   XBT_IN("(%p))", this);
634   if (m_suspended != 2) {
635     m_suspended = 1;
636     lmm_update_variable_weight(getModel()->getMaxminSystem(), getVariable(), 0.0);
637   }
638   XBT_OUT();
639 }
640
641 void L07Action::resume()
642 {
643   XBT_IN("(%p)", this);
644   if (m_suspended != 2) {
645     lmm_update_variable_weight(getModel()->getMaxminSystem(), getVariable(), 1.0);
646     m_suspended = 0;
647   }
648   XBT_OUT();
649 }
650
651 void L07Action::setMaxDuration(double duration)
652 {                               /* FIXME: should inherit */
653   XBT_IN("(%p,%g)", this, duration);
654   m_maxDuration = duration;
655   XBT_OUT();
656 }
657
658 void L07Action::setPriority(double priority)
659 {                               /* FIXME: should inherit */
660   XBT_IN("(%p,%g)", this, priority);
661   m_priority = priority;
662   XBT_OUT();
663 }
664
665 double L07Action::getRemains()
666 {
667   XBT_IN("(%p)", this);
668   XBT_OUT();
669   return m_remains;
670 }
671
672 }
673 }