Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Jun 2017 09:25:15 +0000 (11:25 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Jun 2017 09:25:15 +0000 (11:25 +0200)
16 files changed:
CMakeLists.txt
ChangeLog
NEWS
doc/doxygen/inside_release.doc
examples/msg/actions-storage/actions-storage.c
examples/msg/cloud-simple/cloud-simple.c
examples/msg/process-suspend/process-suspend.c
src/smpi/smpi_global.cpp
src/smpi/smpi_pmpi.cpp
src/smpi/smpi_request.cpp
src/surf/lagrange.cpp
src/surf/plugins/host_energy.cpp
src/xbt/automaton/automaton.c
src/xbt/automaton/automatonparse_promela.c
src/xbt/cunit.cpp
src/xbt/dict.cpp

index 6d180da..fe0378c 100644 (file)
@@ -105,9 +105,9 @@ endif()
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
 
 set(SIMGRID_VERSION_MAJOR "3")
-set(SIMGRID_VERSION_MINOR "16")
+set(SIMGRID_VERSION_MINOR "17")
 set(SIMGRID_VERSION_PATCH "0")
-set(SIMGRID_VERSION_EXTRA "") # -DEVEL") # Extra words to add to version string (e.g. -rc1)
+set(SIMGRID_VERSION_EXTRA "-DEVEL") # Extra words to add to version string (e.g. -rc1)
 
 set(SIMGRID_VERSION_DATE  "2017") # Year for copyright information
 
index 9a23f91..a7ca01b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
-SimGrid (3.16) UNRELEASED
+SimGrid (3.17) UNRELEASED (release target: September 22 2017)
+
+SimGrid (3.16) Released June 22. 2017.
 
  The Blooming Spring Release: developments are budding.
 
@@ -74,7 +76,7 @@ SimGrid (3.16) UNRELEASED
 
  -- Thu Jun 22 22:48:12 CEST 2017   -- Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
-SimGrid (3.15) stable; urgency=low
+SimGrid (3.15) Released March 22. 2017
 
  The Spring Release: continuous integration servers become green
  We fixed even the transient bugs on all target architectures:
@@ -163,9 +165,7 @@ SimGrid (3.15) stable; urgency=low
  - A <cluster> can now be created with different speed values to represent pstates.
    see examples/platforms/energy_cluster.xml for an example.
 
- -- Wed Mar 22 17:50:21 CET 2017 -- Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
-
-SimGrid (3.14.159) stable; urgency=low
+SimGrid (3.14.159) Released December 28. 2016
 
  The previous release was only a crude approximation of a Pi release;
  this one should be a bit better.
@@ -175,9 +175,7 @@ SimGrid (3.14.159) stable; urgency=low
  - Improve the documentation, in particular of the routing module.
  - Integrate some patches flying around in Debian.
 
- -- Wed Dec 28 17:14:49 CET 2016 Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
-
-SimGrid (3.14) stable; urgency=low
+SimGrid (3.14) Released December 24. 2016
 
  Documentation
  * The whole documentation was reworked and reorganized. There is
@@ -275,8 +273,6 @@ SimGrid (3.14) stable; urgency=low
  * Memory usage should be decreased for simulations with a large number 
    of processes. This also helps for SMPI.
 
- -- Sat Dec 24 22:34:26 CET 2016 Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
-
 SimGrid (3.13) stable; urgency=low
 
  The Half Release, a.k.a. the Zealous Easter Trim.
diff --git a/NEWS b/NEWS
index 65c89c3..3125d9b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+                    _               _____  _ _____
+__   _____ _ __ ___(_) ___  _ __   |___ / / |___  |
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \ | |  / /
+ \ V /  __/ |  \__ \ | (_) | | | |  ___) || | / /
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)_|/_/
+               (unreleased yet)
+
                     _               _____  _  __
 __   _____ _ __ ___(_) ___  _ __   |___ / / |/ /_
 \ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \ | | '_ \
index 3d7f0b4..57075d1 100644 (file)
@@ -20,7 +20,7 @@ Please apply the following checklist before releasing.
 - ChangeLog file
   - All changes are documented
   - The release date is indicated below the changes
-  - The release is marked as stable above the changes
+  - The release is marked as stable above the changes (remove the UNRELEASED marker)
   - The release dub name matches the one given in NEWS file
 - NEWS
   - The most notable changes of the version are documented
@@ -82,6 +82,7 @@ the settings icon of the release you want to change.
 - Push the archive files (tar.gz and jar) on gforge
 - Post a news on gforge (before updating the website)
 - Update the link scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/latest
+  (and create the directory of the next version)
 - Rebuild and resynchronize the website so that the file gets visible
   from our download page.\n
   - Edit org/org-templates/level-0.org to change the release version, the tgz link and the jar link.
index 815b7ce..0411b63 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -64,12 +64,11 @@ static void action_open(const char *const *action) {
 static void action_read(const char *const *action) {
   const char *file_name = action[2];
   const char *size_str = action[3];
-  msg_file_t file = NULL;
   sg_size_t size = parse_size(size_str);
 
   double clock = MSG_get_clock();
 
-  file = get_file_descriptor(file_name);
+  msg_file_t file = get_file_descriptor(file_name);
 
   ACT_DEBUG("Entering Read: %s (size: %llu)", NAME, size);
   MSG_file_read(file, size);
index 74d1314..6f9d25d 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -85,10 +84,9 @@ static int communication_rx_fun(int argc, char *argv[])
 static void launch_communication_worker(msg_host_t tx_host, msg_host_t rx_host)
 {
   char *mbox = bprintf("MBOX:%s-%s", MSG_host_get_name(tx_host), MSG_host_get_name(rx_host));
-  char **argv = NULL;
-
   const char *pr_name_tx =  "comm_tx";
-  argv = xbt_new(char *, 3);
+
+  char** argv = xbt_new(char*, 3);
   argv[0] = xbt_strdup(pr_name_tx);
   argv[1] = xbt_strdup(mbox);
   argv[2] = NULL;
index e385517..19184ef 100644 (file)
@@ -35,10 +35,8 @@ static int lazy_guy(int argc, char *argv[])
 /* The Dream master: */
 static int dream_master(int argc, char *argv[])
 {
-  msg_process_t lazy = NULL;
-
   XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy process */
-  lazy = MSG_process_create("Lazy", lazy_guy, NULL, MSG_host_self());
+  msg_process_t lazy = MSG_process_create("Lazy", lazy_guy, NULL, MSG_host_self());
   XBT_INFO("Let's wait a little bit...");
   MSG_process_sleep(10.0);              /* - Wait for 10 seconds */
   XBT_INFO("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
index b7a827c..015834f 100644 (file)
@@ -550,8 +550,6 @@ int smpi_main(const char* executable, int argc, char *argv[])
   SIMIX_create_environment(argv[1]);
   SIMIX_comm_set_copy_data_callback(smpi_comm_copy_buffer_callback);
 
-  static std::size_t rank = 0;
-
   smpi_init_options();
 
   if (smpi_privatize_global_variables == SMPI_PRIVATIZE_DLOPEN) {
@@ -562,6 +560,7 @@ int smpi_main(const char* executable, int argc, char *argv[])
     struct stat fdin_stat;
     stat(executable_copy.c_str(), &fdin_stat);
     off_t fdin_size = fdin_stat.st_size;
+    static std::size_t rank = 0;
 
     simix_global->default_function = [executable_copy, fdin_size](std::vector<std::string> args) {
       return std::function<void()>([executable_copy, fdin_size, args] {
index 635e0d7..4c68e80 100644 (file)
@@ -2127,8 +2127,7 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
     }
 
     extra->datatype1 = encode_datatype(sendtmptype, &known);
-    int dt_size_send = 1;
-    dt_size_send     = sendtmptype->size();
+    int dt_size_send = sendtmptype->size();
 
     for (i = 0; i < size; i++) { // copy data to avoid bad free
       extra->send_size += sendtmpcounts[i] * dt_size_send;
index ebfc570..3547243 100644 (file)
@@ -757,10 +757,10 @@ void Request::wait(MPI_Request * request, MPI_Status * status)
 int Request::waitany(int count, MPI_Request requests[], MPI_Status * status)
 {
   s_xbt_dynar_t comms; // Keep it on stack to save some extra mallocs
-  int size = 0;
   int index = MPI_UNDEFINED;
 
   if(count > 0) {
+    int size = 0;
     // Wait for a request to complete
     xbt_dynar_init(&comms, sizeof(smx_activity_t), [](void*ptr){
       intrusive_ptr_release(*(simgrid::kernel::activity::ActivityImpl**)ptr);
@@ -914,9 +914,10 @@ int Request::add_f() {
 }
 
 void Request::free_f(int id) {
-  char key[KEY_SIZE];
-  if(id!=MPI_FORTRAN_REQUEST_NULL)
+  if (id != MPI_FORTRAN_REQUEST_NULL) {
+    char key[KEY_SIZE];
     xbt_dict_remove(F2C::f2c_lookup(), get_key_id(key, id));
+  }
 }
 
 }
index e02b6fc..4ad25ed 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -44,11 +43,9 @@ static int __check_feasible(xbt_swag_t cnst_list, xbt_swag_t var_list, int warn)
   lmm_constraint_t cnst = nullptr;
   lmm_variable_t var = nullptr;
 
-  double tmp;
-
   xbt_swag_foreach(_cnst, cnst_list) {
-  cnst = static_cast<lmm_constraint_t>(_cnst);
-    tmp = 0;
+    cnst       = static_cast<lmm_constraint_t>(_cnst);
+    double tmp = 0;
     elem_list = &(cnst->enabled_element_set);
     xbt_swag_foreach(_elem, elem_list) {
       elem = static_cast<lmm_element_t>(_elem);
@@ -431,30 +428,25 @@ static double dichotomy(double init, double diff(double, void *), void *var_cnst
 
 static double partial_diff_lambda(double lambda, void *param_cnst)
 {
-  int j;
-  void *_elem;
-  xbt_swag_t elem_list = nullptr;
-  lmm_element_t elem = nullptr;
-  lmm_variable_t var = nullptr;
   lmm_constraint_t cnst = static_cast<lmm_constraint_t>(param_cnst);
   double diff = 0.0;
-  double sigma_i = 0.0;
 
   XBT_IN();
-  elem_list = &(cnst->enabled_element_set);
 
   XBT_CDEBUG(surf_lagrange_dichotomy, "Computing diff of cnst (%p)", cnst);
 
+  xbt_swag_t elem_list = &(cnst->enabled_element_set);
+  void* _elem;
   xbt_swag_foreach(_elem, elem_list) {
-  elem = static_cast<lmm_element_t>(_elem);
-    var = elem->variable;
+    lmm_element_t elem = static_cast<lmm_element_t>(_elem);
+    lmm_variable_t var = elem->variable;
     xbt_assert(var->weight > 0);
     XBT_CDEBUG(surf_lagrange_dichotomy, "Computing sigma_i for var (%p)", var);
     // Initialize the summation variable
-    sigma_i = 0.0;
+    double sigma_i = 0.0;
 
     // Compute sigma_i
-    for (j = 0; j < var->cnsts_number; j++) {
+    for (int j = 0; j < var->cnsts_number; j++) {
       sigma_i += (var->cnsts[j].constraint)->lambda;
     }
 
index f666911..85d3d0c 100644 (file)
@@ -166,10 +166,10 @@ void HostEnergy::update()
 {
   double start_time  = this->last_updated;
   double finish_time = surf_get_clock();
-  double cpu_load;
   double current_speed = host->speed();
 
   if (start_time < finish_time) {
+    double cpu_load;
     // We may have start == finish if the past consumption was updated since the simcall was started
     // for example if 2 actors requested to update the same host's consumption in a given scheduling round.
     //
index 008ead8..44c5d96 100644 (file)
@@ -21,8 +21,7 @@ struct xbt_automaton_propositional_symbol{
 };
 
 xbt_automaton_t xbt_automaton_new(void){
-  xbt_automaton_t automaton = NULL;
-  automaton = xbt_new0(struct xbt_automaton, 1);
+  xbt_automaton_t automaton = xbt_new0(struct xbt_automaton, 1);
   automaton->states = xbt_dynar_new(sizeof(xbt_automaton_state_t), xbt_automaton_state_free_voidp);
   automaton->transitions = xbt_dynar_new(sizeof(xbt_automaton_transition_t), xbt_automaton_transition_free_voidp);
   automaton->propositional_symbols = xbt_dynar_new(sizeof(xbt_automaton_propositional_symbol_t), xbt_automaton_propositional_symbol_free_voidp);
@@ -30,8 +29,7 @@ xbt_automaton_t xbt_automaton_new(void){
 }
 
 xbt_automaton_state_t xbt_automaton_state_new(xbt_automaton_t a, int type, char* id){
-  xbt_automaton_state_t state = NULL;
-  state = xbt_new0(struct xbt_automaton_state, 1);
+  xbt_automaton_state_t state = xbt_new0(struct xbt_automaton_state, 1);
   state->type = type;
   state->id = xbt_strdup(id);
   state->in = xbt_dynar_new(sizeof(xbt_automaton_transition_t), xbt_automaton_transition_free_voidp);
@@ -41,8 +39,7 @@ xbt_automaton_state_t xbt_automaton_state_new(xbt_automaton_t a, int type, char*
 }
 
 xbt_automaton_transition_t xbt_automaton_transition_new(xbt_automaton_t a, xbt_automaton_state_t src, xbt_automaton_state_t dst, xbt_automaton_exp_label_t label){
-  xbt_automaton_transition_t transition = NULL;
-  transition = xbt_new0(struct xbt_automaton_transition, 1);
+  xbt_automaton_transition_t transition = xbt_new0(struct xbt_automaton_transition, 1);
   if(src != NULL){
     xbt_dynar_push(src->out, &transition);
     transition->src = src;
@@ -205,8 +202,7 @@ static int call_simple_function(void* function)
 }
 
 xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new(xbt_automaton_t a, const char* id, int(*fct)(void)){
-  xbt_automaton_propositional_symbol_t prop_symb = NULL;
-  prop_symb = xbt_new0(struct xbt_automaton_propositional_symbol, 1);
+  xbt_automaton_propositional_symbol_t prop_symb = xbt_new0(struct xbt_automaton_propositional_symbol, 1);
   prop_symb->pred = xbt_strdup(id);
   prop_symb->callback                            = &call_simple_function;
   prop_symb->data = fct;
index 047079c..dffb34e 100644 (file)
@@ -1,7 +1,6 @@
 /* methods for implementation of automaton from promela description */
 
-/* Copyright (c) 2011-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2011-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -33,8 +32,7 @@ static void new_state(char* id, int src){
   }
   free(id_copy);
 
-  xbt_automaton_state_t state = NULL;
-  state = xbt_automaton_state_exists(parsed_automaton, id);
+  xbt_automaton_state_t state = xbt_automaton_state_exists(parsed_automaton, id);
   if(state == NULL){
     state = xbt_automaton_state_new(parsed_automaton, type, id);
   }
index 0983062..8008c3e 100644 (file)
@@ -250,7 +250,6 @@ static int xbt_test_suite_run(xbt_test_suite_t suite, int verbosity)
   xbt_test_test_t test;
   xbt_test_log_t log;
 
-  unsigned int it_unit;
   unsigned int it_test;
 
   if (suite == nullptr)
@@ -276,6 +275,7 @@ static int xbt_test_suite_run(xbt_test_suite_t suite, int verbosity)
 
   if (suite->enabled) {
     /* iterate through all tests */
+    unsigned int it_unit;
     xbt_dynar_foreach(suite->units, it_unit, unit) {
       /* init unit case counters */
       unit->nb_tests = 0;
index f5759cf..ccc2d35 100644 (file)
@@ -72,20 +72,15 @@ xbt_dict_t xbt_dict_new_homogeneous(void_f_pvoid_t free_ctn)
  */
 void xbt_dict_free(xbt_dict_t * dict)
 {
-  xbt_dictelm_t current;
-  xbt_dictelm_t previous;
-  int table_size;
-  xbt_dictelm_t *table;
-
-  //  if ( *dict )  xbt_dict_dump_sizes(*dict);
-
   if (dict != nullptr && *dict != nullptr) {
-    table_size = (*dict)->table_size;
-    table = (*dict)->table;
+    int table_size       = (*dict)->table_size;
+    xbt_dictelm_t* table = (*dict)->table;
     /* Warning: the size of the table is 'table_size+1'...
      * This is because table_size is used as a binary mask in xbt_dict_rehash */
     for (int i = 0; (*dict)->count && i <= table_size; i++) {
-      current = table[i];
+      xbt_dictelm_t current = table[i];
+      xbt_dictelm_t previous;
+
       while (current != nullptr) {
         previous = current;
         current = current->next;