From: Martin Quinson Date: Wed, 16 Jan 2019 21:57:19 +0000 (+0100) Subject: Merge branch 'master' of framagit.org:simgrid/simgrid X-Git-Tag: v3_22~545 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7ddbdc25753a729517ed23899c83eb808acdd50f?hp=323d027b0adb6ee03434a4246a5bf803e58a73ba Merge branch 'master' of framagit.org:simgrid/simgrid --- diff --git a/.gitignore b/.gitignore index 4d81e78443..24ce588454 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 76764ec8ce..053c42fc59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/include/xbt/parmap.hpp b/src/include/xbt/parmap.hpp index fc8f6da80b..4e073a14a7 100644 --- a/src/include/xbt/parmap.hpp +++ b/src/include/xbt/parmap.hpp @@ -162,7 +162,7 @@ template Parmap::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 Parmap::~Parmap() for (unsigned i = 1; i < num_workers; i++) workers[i]->join(); - workers.clear(); delete synchro; } diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index cdce4e0546..7e3ce08813 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -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); } diff --git a/src/xbt/mmalloc/mm_module.c b/src/xbt/mmalloc/mm_module.c index 1782059e4a..98a704111e 100644 --- a/src/xbt/mmalloc/mm_module.c +++ b/src/xbt/mmalloc/mm_module.c @@ -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);