Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 16 Jan 2019 21:57:19 +0000 (22:57 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 16 Jan 2019 21:57:19 +0000 (22:57 +0100)
.gitignore
CMakeLists.txt
src/include/xbt/parmap.hpp
src/kernel/context/Context.cpp
src/xbt/mmalloc/mm_module.c

index 4d81e78..24ce588 100644 (file)
@@ -47,6 +47,7 @@ _*.c
 include/simgrid/config.h
 include/smpi/smpif.h
 src/internal_config.h
+src/simgrid/version.h
 testprog
 ### Cmake files
 CPackConfig.cmake
@@ -959,3 +960,6 @@ include/smpi/mpi.mod
 src/smpi/mpif.f90
 src/smpi/mpif.f90.generated
 a.out
+simgrid.config
+simgrid.creator
+simgrid.includes
index 76764ec..053c42f 100644 (file)
@@ -521,6 +521,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid/config.h)
 file(REMOVE ${CMAKE_BINARY_DIR}/src/internal_config.h.generated)
 file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated)
+file(REMOVE ${CMAKE_BINARY_DIR}/src/simgrid/version.h.generated)
 
 # We need two versions of the SMPI scripts because they contain the path to the library
 # so, it depends of whether SimGrid is installed, or run from the sources (during the build)
index fc8f6da..4e073a1 100644 (file)
@@ -162,7 +162,7 @@ template <typename T> Parmap<T>::Parmap(unsigned num_workers, e_xbt_parmap_mode_
   /* Initialize the thread pool data structure */
   this->status      = PARMAP_WORK;
   this->work_round  = 0;
-  this->workers.reserve(num_workers);
+  this->workers.resize(num_workers);
   this->num_workers = num_workers;
   this->synchro     = new_synchro(mode);
 
@@ -205,7 +205,6 @@ template <typename T> Parmap<T>::~Parmap()
   for (unsigned i = 1; i < num_workers; i++)
     workers[i]->join();
 
-  workers.clear();
   delete synchro;
 }
 
index cdce4e0..7e3ce08 100644 (file)
@@ -21,7 +21,6 @@ smx_context_t SIMIX_context_new(
   void_pfn_smxprocess_t cleanup_func,
   smx_actor_t simix_process)
 {
-  xbt_assert(simix_global, "simix is not initialized, please call MSG_init first");
   return simix_global->context_factory->create_context(
     std::move(code), cleanup_func, simix_process);
 }
index 1782059..98a7041 100644 (file)
@@ -324,12 +324,6 @@ void *mmalloc_preinit(void)
     unsigned long mask = ~((unsigned long)xbt_pagesize - 1);
     void *addr = (void*)(((unsigned long)sbrk(0) + HEAP_OFFSET) & mask);
     __mmalloc_default_mdp = xbt_mheap_new_options(-1, addr, XBT_MHEAP_OPTION_MEMSET);
-    /* Fixme? only the default mdp in protected against forks */
-    // This is mandated to protect the mmalloced areas through forks. Think of tesh.
-    // Nah, removing the mutex isn't a good idea either for tesh
-    int res = pthread_atfork(mmalloc_fork_prepare, mmalloc_fork_parent, mmalloc_fork_child);
-    if (res != 0)
-      THROWF(system_error, 0, "pthread_atfork() failed: return value %d", res);
   }
   xbt_assert(__mmalloc_default_mdp != NULL);