Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Optimization, if no parallel execution is selected use the serial execution.
authorcristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 1 Feb 2011 15:00:26 +0000 (15:00 +0000)
committercristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 1 Feb 2011 15:00:26 +0000 (15:00 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9555 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/simix/smx_context_raw.c

index 5282293..9b2ac2b 100644 (file)
@@ -305,18 +305,18 @@ void SIMIX_ctx_raw_factory_init(smx_context_factory_t *factory)
   (*factory)->stop = smx_ctx_raw_stop;
   (*factory)->suspend = smx_ctx_raw_suspend;
   (*factory)->name = "smx_raw_context_factory";
-  (*factory)->runall = smx_ctx_raw_runall;
 
   if (SIMIX_context_is_parallel()) {
 #ifdef CONTEXT_THREADS  /* To use parallel ucontexts a thread pool is needed */
     parmap = xbt_parmap_new(2);
     (*factory)->self = smx_ctx_raw_self_parallel;
     (*factory)->get_thread_id = smx_ctx_raw_get_thread_id;
+    (*factory)->runall = smx_ctx_raw_runall;
 #else
     THROW0(arg_error, 0, "No thread support for parallel context execution");
 #endif
   } else {
-    (*factory)->runall = smx_ctx_raw_runall;
+    (*factory)->runall = smx_ctx_raw_runall_serial;
   }
 
   raw_factory = *factory;