X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f43c766932553c0f32c9e681ea5b7032003c29a7..9e68ca10e951fb61e944c99c7774b1e415ae9f6d:/doc/doxygen/FAQ.doc diff --git a/doc/doxygen/FAQ.doc b/doc/doxygen/FAQ.doc index c2b2d899e7..4c2e737250 100644 --- a/doc/doxygen/FAQ.doc +++ b/doc/doxygen/FAQ.doc @@ -1,5 +1,6 @@ /*! \page FAQ Frequently Asked Questions +@tableofcontents \section faq_simgrid I'm new to SimGrid. I have some questions. Where should I start? @@ -462,10 +463,68 @@ note that although sound, this model were never scientifically assessed. Please keep this fact in mind when using it. - +\subsubsection faq_platform_random Using random variable for the resource power or availability + +The best way to model the resouce power using a random variable is to +use an availability trace that is directed by a probability +distribution. This can be done using the function +tmgr_trace_generator_value() below. The date and value generators is +created with one of tmgr_event_generator_new_uniform(), +tmgr_event_generator_new_exponential() or +tmgr_event_generator_new_weibull() (if you need other generators, +adding them to src/surf/trace_mgr.c should be quite trivial and your +patch will be welcomed). Once your trace is created, you have to +connect it to the resource with the function +sg_platf_new_trace_connect(). + +That the process is very similar if you want to model the +resource availability with a random variable (deciding whether it's +on/off instead of deciding its speed) using the function +tmgr_trace_generator_state() or tmgr_trace_generator_avail_unavail() +instead of tmgr_trace_generator_value(). + +Unfortunately, all this is currently lacking a proper documentation, +and there is even no proper example of use. You'll thus have to check +the header file include/simgrid/platf.h and experiment a bit by +yourself. The following code should be a good starting point, and +contributing a little clean example would be a good way to help the +SimGrid project. + +@code +tmgr_trace_generator_value("mytrace",tmgr_event_generator_new_exponential(.5) + tmgr_event_generator_new_uniform(100000,9999999)); + +sg_platf_trace_connect_cbarg_t myconnect = SG_PLATF_TRACE_CONNECT_INITIALIZER; +myconnect.kind = SURF_TRACE_CONNECT_KIND_BANDWIDTH; +myconnect.trace = "mytrace"; +myconnect.element = "mylink"; + +sg_platf_trace_connect(myconnect); +@endcode \section faq_troubleshooting Troubleshooting +\subsection faq_trouble_changelog The feature X stopped to work after my last update + +I guess that you want to read the ChangeLog file, that always contains +all the information that could be important to the users during the +upgrade. Actually, you may want to read it (alongside with the NEWS +file that highlights the most important changes) even before you +upgrade your copy of SimGrid, too. + +Backward compatibility is very important to us, as we want to provide +a scientific tool allowing to evaluate the code you write in several +years, too. That being said, we sometimes change the interface to make +them more usable to the users. When we do so, we always keep the old +interface as DEPRECATED. If you still want to use them, you want to +define the SIMGRID_DEPRECATED preprocessor symbol before loading the +SimGrid files: + +@verbatim +#define SIMGRID_DEPRECATED +#include +@endverbatim + \subsection faq_trouble_lib_compil SimGrid compilation and installation problems \subsubsection faq_trouble_lib_config cmake fails!