From: Frederic Suter Date: Fri, 13 May 2016 19:33:50 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_14~1237 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/137633767718749e92cb7fce2fe2454097c447eb?hp=c27f4c0634959e9fb4d3b19717ed062563cbe1d5 Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/doc/doxygen/platform.doc b/doc/doxygen/platform.doc index e29169cf72..4d4ce77d7e 100644 --- a/doc/doxygen/platform.doc +++ b/doc/doxygen/platform.doc @@ -1648,7 +1648,7 @@ Here is an example of trace when no file name is provided: | trace | yes | String | Identifier of the referenced trace (specified of the trace's \c id attribute) | | element | yes | String | The identifier of the referenced entity as given by its \c id attribute | -\section pf_hints Hints and tips, or how to write a platform efficiently +\section pf_hints Hints, tips and frequently requested features Now you should know at least the syntax and be able to create a platform by your own. However, after having ourselves wrote some platforms, there @@ -1804,19 +1804,22 @@ characteristics (lookup : time to resolve a route): \li Cluster: Cluster routing, specific to cluster tag, should not be used. -\subsection pf_switch How to describe a switch given that is no switch tag? +\subsection pf_switch I want to describe a switch but there is no switch tag! -Actually we did not include switch tag, ok. But when you're trying to -simulate a switch, the only major impact it has when you're using -fluid model (and SimGrid uses fluid model unless you activate -ns-3 or constant network mode) is the impact of the upper limit of -the switch motherboard speed that will eventually be reached if you're -using intensively your switch. So, the switch impact is similar to a -link one. That's why we are used to describe a switch using a link tag -(as a link is not an edge by a hyperedge, you can connect more than 2 -other links to it). +Actually we did not include switch tag. But when you're trying to +simulate a switch, assuming +fluid bandwidth models are used (which SimGrid uses by default unless +ns-3 or constant network models are activated), the limiting factor is +switch backplane bandwidth. So, essentially, at least from +the simulation perspective, a switch is similar to a +link: some device that is traversed by flows and with some latency and +so,e maximum bandwidth. Thus, you can simply simulate a switch as a +link. Many links +can be connected to this "switch", which is then included in routes just +as a normal link. -\subsection pf_multicabinets How to model multi-cabinets clusters? + +\subsection pf_multicabinets I want to describe multi-cabinets clusters! You have several possibilities, as usual when modeling things. If your cabinets are homogeneous and the intercabinet network negligible for @@ -1836,7 +1839,7 @@ the <cluster> internals is certainly to create one separate <cluster> per cabinet and interconnect them together. This is what we did in the G5K example platform for the Graphen cluster. -\subsection pf_platform_multipath How to express multipath routing in platform files? +\subsection pf_platform_multipath I want to express multipath routing in platform files! It is unfortunately impossible to express the fact that there is more than one routing path between two given hosts. Let's consider the diff --git a/src/simix/smx_process.cpp b/src/simix/smx_process.cpp index 7b93e9ccef..87d4355103 100644 --- a/src/simix/smx_process.cpp +++ b/src/simix/smx_process.cpp @@ -516,7 +516,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) { } else if (raw != nullptr) { SIMIX_synchro_stop_waiting(process, &process->simcall); - SIMIX_synchro_destroy(process->waiting_synchro); + delete process->waiting_synchro; } else if (io != nullptr) { SIMIX_io_destroy(process->waiting_synchro); diff --git a/src/simix/smx_synchro.cpp b/src/simix/smx_synchro.cpp index cb9212aab6..f5c9244aab 100644 --- a/src/simix/smx_synchro.cpp +++ b/src/simix/smx_synchro.cpp @@ -64,14 +64,6 @@ void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall) XBT_OUT(); } -void SIMIX_synchro_destroy(smx_synchro_t synchro) -{ - XBT_DEBUG("Destroying synchro %p", synchro); - simgrid::simix::Raw *raw = static_cast(synchro); - - delete raw; -} - void SIMIX_synchro_finish(smx_synchro_t synchro) { XBT_IN("(%p)",synchro); @@ -95,7 +87,7 @@ void SIMIX_synchro_finish(smx_synchro_t synchro) SIMIX_synchro_stop_waiting(simcall->issuer, simcall); simcall->issuer->waiting_synchro = NULL; - SIMIX_synchro_destroy(synchro); + delete synchro; SIMIX_simcall_answer(simcall); XBT_OUT(); } @@ -199,7 +191,7 @@ void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer) if (xbt_swag_size(mutex->sleeping) > 0) { /*process to wake up */ smx_process_t p = (smx_process_t) xbt_swag_extract(mutex->sleeping); - SIMIX_synchro_destroy(p->waiting_synchro); + delete p->waiting_synchro; p->waiting_synchro = NULL; mutex->owner = p; SIMIX_simcall_answer(&p->simcall); @@ -318,7 +310,7 @@ void SIMIX_cond_signal(smx_cond_t cond) if ((proc = (smx_process_t) xbt_swag_extract(cond->sleeping))) { /* Destroy waiter's synchronization */ - SIMIX_synchro_destroy(proc->waiting_synchro); + delete proc->waiting_synchro; proc->waiting_synchro = NULL; /* Now transform the cond wait simcall into a mutex lock one */ @@ -418,7 +410,7 @@ void SIMIX_sem_release(smx_sem_t sem) XBT_DEBUG("Sem release semaphore %p", sem); if ((proc = (smx_process_t) xbt_swag_extract(sem->sleeping))) { - SIMIX_synchro_destroy(proc->waiting_synchro); + delete proc->waiting_synchro; proc->waiting_synchro = NULL; SIMIX_simcall_answer(&proc->simcall); } else if (sem->value < SMX_SEM_NOLIMIT) {