X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1f3b2d6bb4a31767e013b4d6739602fe1db89bf3..9d5492041a839402b7c142c08ebdc8df6e9d5c24:/doc/FAQ.doc diff --git a/doc/FAQ.doc b/doc/FAQ.doc index 852ad8843d..42e6649d16 100644 --- a/doc/FAQ.doc +++ b/doc/FAQ.doc @@ -1,4 +1,4 @@ -/*! \page faq Frequently Asked Questions +/*! \page FAQ Frequently Asked Questions \htmlinclude .FAQ.doc.toc @@ -36,10 +36,10 @@ on their own. The difference between both is that MSG is somehow easier to use, but GRAS is not limited to the simulator. Once you're done writing your GRAS code, -you can run your code both in the simulator or on a real platform. For this, -there is two implementations of the GRAS interface, one for simulation, one -for real execution. So, you just have to relink your code to chose one of -both world. +you can run your code both in the simulator and on a real platform. For this, +there are two implementations of the GRAS interface, one for simulation, and one +for real execution. So, you just have to relink your code to choose one of +both worlds. \subsection faq_visualization Visualizing and analyzing the results @@ -56,17 +56,19 @@ We also have a more graphical output. Have a look at section \ref options_tracin \subsection faq_C Argh! Do I really have to code in C? -Up until now, there is no binding for other languages. If you use C++, +Currently bindings on top of MSG are supported for Java, Ruby and Lua. You can find a few +documentation about them on the doc page. Note that bindings are released separately from the main dist +and so have their own version numbers. + +Moreover If you use C++, you should be able to use the SimGrid library as a standard C library and everything should work fine (simply link against this library; recompiling SimGrid with a C++ compiler won't work and it wouldn't help if you could). -In fact, we are currently working on Java bindings of MSG to allow -all the undergrad students of the world to use this tool. This is a -little more tricky than I would have expected, but the work is moving -fast forward [2006/05/13]. More languages are evaluated, but for now, -we do not feel a real demand for any other language. Please speak up! +For now, +we do not feel a real demand for any other language. But if you think there is one, + please speak up! \section faq_howto Feature related questions @@ -129,11 +131,11 @@ As we already told, we prefer keeping the API as simple as possible. This kind of feature is rather easy to implement by users and the semantic you associate really depends on people. Having a *generic* task duplication mechanism is not that trivial (in -particular because of the data field). That is why I would recommand +particular because of the data field). That is why I would recommend that you write it by yourself even if I can give you advice on how to do it. -You have the following functions to get informations about a task: +You have the following functions to get information about a task: MSG_task_get_name(), MSG_task_get_compute_duration(), MSG_task_get_remaining_computation(), MSG_task_get_data_size(), and MSG_task_get_data(). @@ -155,7 +157,7 @@ we have introduced the following functions: - MSG_comm_destroy() We refer you to the description of these functions for more details on their usage as well -as to the exemple section on \ref MSG_ex_asynchronous_communications. +as to the example section on \ref MSG_ex_asynchronous_communications. \subsubsection faq_MIA_thread_synchronization I need to synchronize my MSG processes @@ -183,10 +185,10 @@ even take the currently running tasks into account. In some SURF models, communications have an influence on computational power. Should it be taken into account too? -First of all, it's near to impossible to predict the load beforehands in the +First of all, it's near to impossible to predict the load beforehand in the simulator since it depends on too much parameters (background load variation, bandwidth sharing algorithmic complexity) some of them even being -not known beforehands (other task starting at the same time). So, getting +not known beforehand (other task starting at the same time). So, getting this information is really hard (just like in real life). It's not just that we want MSG to be as painful as real life. But as it is in some way realistic, we face some of the same problems as we would face in real life. @@ -317,7 +319,7 @@ Here are a few tricks you can apply if you want to increase the amount of processes in your simulations. - A few thousands of simulated processes (soft tricks)\n - SimGrid can use either pthreads library or the UNIX98 contextes. On + SimGrid can use either pthreads library or the UNIX98 contexts. On most systems, the number of pthreads is limited and then your simulation may be limited for a stupid reason. This is especially true with the current linux pthreads, and I cannot get more than @@ -325,21 +327,21 @@ of processes in your simulations. contexts allow me to raise the limit to 25,000 simulated processes on my laptop.\n\n The --with-context option of the ./configure - script allows you to choose between UNIX98 contextes + script allows you to choose between UNIX98 contexts (--with-context=ucontext) and the pthread version (--with-context=pthread). The default value is ucontext when the script detect a working UNIX98 context implementation. On Windows boxes, the provided value is discarded and an adapted version is picked up.\n\n - We experienced some issues with contextes on some rare systems + We experienced some issues with contexts on some rare systems (solaris 8 and lower or old alpha linuxes comes to mind). The main - problem is that the configure script detect the contextes as being + problem is that the configure script detect the contexts as being functional when it's not true. If you happen to use such a system, switch manually to the pthread version, and provide us with a good patch for the configure script so that it is done automatically ;) - Hundred thousands of simulated processes (hard-core tricks)\n - As explained above, SimGrid can use UNIX98 contextes to represent + As explained above, SimGrid can use UNIX98 contexts to represent and handle the simulated processes. Thanks to this, the main limitation to the number of simulated processes becomes the available memory.\n\n @@ -347,7 +349,7 @@ of processes in your simulations. between 25,000 processes on my laptop (1Gb memory, 1.5Gb swap).\n - First of all, make sure your code runs for a few hundreds processes before trying to push the limit. Make sure it's - valgrind-clean, ie that valgrind does not report neither memory + valgrind-clean, i.e. that valgrind does not report neither memory error nor memory leaks. Indeed, numerous simulated processes result in *fat* simulation hindering debugging. - It was really boring to write 25,000 entries in the deployment @@ -358,9 +360,9 @@ of processes in your simulations. - The deployment file became quite big, so I had to do what is in the FAQ entry \ref faq_flexml_limit - Each UNIX98 context has its own stack entry. As debugging this is - quite hairly, the default value is a bit overestimated so that - user don't get into trouble about this. You want to tune this - size to increse the number of processes. This is the + quite hairy, the default value is a bit overestimated so that + user doesn't get into trouble about this. You want to tune this + size to increase the number of processes. This is the STACK_SIZE define in src/xbt/xbt_context_sysv.c, which is 128kb by default. Reduce this as much as you can, but be warned that if this value @@ -414,7 +416,7 @@ completion) to be saved somewhere. So if a host (and the task executing on it) fails (cf. #MSG_HOST_FAILURE), then the task can be restarted from the last checkpoint.\n -Actually, such a thing does not exists in SimGrid either, but it's just +Actually, such a thing does not exist in SimGrid either, but it's just because we don't think it is fundamental and it may be done in the user code at relatively low cost. You could for example use a watcher that periodically get the remaining amount of things to do (using @@ -425,7 +427,7 @@ subtasks. \subsubsection faq_platform_example Where can I find SimGrid platform files? -There is several little examples in the archive, in the examples/msg +There are several little examples in the archive, in the examples/msg directory. From time to time, we are asked for other files, but we don't have much at hand right now. @@ -461,35 +463,25 @@ released a very comparable tool, and called it GridG. \subsubsection faq_SURF_multicore Modeling multi-core resources -There is currently no native support for multi-core or SMP machines in -SimGrid. We are currently working on it, but coming up with the right -model is very hard: Cores share caches and bus to access memory and -thus interfere with each others. Memory contention is a crucial -component of multi-core modeling. - -In the meanwhile, some user-level tricks can reveal sufficient for -you. For example, you may model each core by a CPU and add some very -high speed links between them. This complicates a bit the user code -since you have to remember that when you assign something to a (real) -host, it can be any of the (fake) hosts representing the cores of a -given machine. For that, you can use the prop tag of the XML files as -follows. Your code should then look at the ‘machine’ property -associated with each workstation, and run parallel tasks over all -cores of the machine. - +Since version 3.6 of simgrid we can specify the core number of a resource. +To use this feature use tag 'host' with 'core' attribute. \verbatim - - - - - - - - - - + + + + + + + \endverbatim +The specified computing power will be available to up to 6 sequential +tasks without sharing. If more tasks are placed on this host, the +resource will be shared accordingly. For example, if you schedule 12 +tasks on the host, each will get half of the computing power. Please +note that although sound, this model were never scientifically +assessed. Please keep this fact in mind when using it. + \subsubsection faq_SURF_dynamic Modeling dynamic resource availability A nice feature of SimGrid is that it enables you to seamlessly have @@ -518,7 +510,7 @@ PERIODICITY 1.0 \endverbatim At time 0, our host will deliver 100 flop/s. At time 11.0, it will -deliver only 50 flop/s until time 20.0 where it will will start +deliver only 50 flop/s until time 20.0 where it will start delivering 90 flop/s. Last at time 21.0 (20.0 plus the periodicity 1.0), we'll be back to the beginning and it will deliver 100 flop/s. @@ -554,13 +546,13 @@ following platform file: \verbatim - + - + - + \endverbatim @@ -570,7 +562,7 @@ links 1 and 2). It simply means that the routing on the graph is not trivial, and that data do not following the shortest path in number of hops on this graph. Another way to say it is that there is no implicit in these routing descriptions. The system will only use the routes you -declare (such as <route src="A" dst="C"><link:ctn +declare (such as <route src="A" dst="C"><link_ctn id="3"/></route>), without trying to build new routes by aggregating the provided ones. @@ -579,8 +571,8 @@ symmetric. For example, add the following to the previous file: \verbatim - - + + \endverbatim @@ -615,8 +607,8 @@ well-formed SimGrid platform XML file might result in the following - start "link" with ... - end "link" - start "route" with ... - - start "link:ctn" with ... - - end "link:ctn" + - start "link_ctn" with ... + - end "link_ctn" - end "route" - end "platform_description" @@ -978,9 +970,7 @@ informative bug repports: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html (it is not SimGrid specific at all, but it's full of good advices). -\author Arnaud Legrand (arnaud.legrand::imag.fr) -\author Martin Quinson (martin.quinson::loria.fr) - +\author Da SimGrid team */