Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Supernovae mode was deprecated. It is currently broken too. Remove it.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 10 Feb 2014 08:17:46 +0000 (09:17 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 10 Feb 2014 14:27:17 +0000 (15:27 +0100)
15 files changed:
.gitignore
ChangeLog
buildtools/Cmake/CTestConfig.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/Distrib.cmake
buildtools/Cmake/MakeLib.cmake
buildtools/Cmake/Modules/FindNS3.cmake
buildtools/Cmake/Option.cmake
buildtools/Cmake/PrintArgs.cmake
buildtools/Cmake/Supernovae.cmake [deleted file]
doc/doxygen/install.doc
include/xbt/log.h
src/mk_supernovae.pl [deleted file]
src/xbt/RngStream.c

index dbcfa12..8897d7f 100644 (file)
@@ -36,10 +36,9 @@ examples/lua/console/simgrid.so
 simgrid.jar
 
 ################################################
 simgrid.jar
 
 ################################################
-### Units and supernovae files
+### Unit files
 src/simgrid_units_main.c
 src/*_unit.c
 src/simgrid_units_main.c
 src/*_unit.c
-src/supernovae_*.c
 
 ################################################
 ### Generated files
 
 ################################################
 ### Generated files
index 3d7c651..b61dace 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,6 @@
 SimGrid (3.11) NOT RELEASED; urgency=low
 
  TENTATIVE RELEASE GOALS for 3.11:
 SimGrid (3.11) NOT RELEASED; urgency=low
 
  TENTATIVE RELEASE GOALS for 3.11:
- * Consider the removal of Supernovae mode if no user has manifested since the
-   release of version 3.10.
  * Switch to tesh.pl, and kill the now unused parts of xbt that seem fragile
  * Clean up CMake files (may need a full rewrite).
    Non exhaustive list of subgoals:
  * Switch to tesh.pl, and kill the now unused parts of xbt that seem fragile
  * Clean up CMake files (may need a full rewrite).
    Non exhaustive list of subgoals:
@@ -24,6 +22,11 @@ SimGrid (3.11) NOT RELEASED; urgency=low
  SURF:
  * [FIXME: elaborate] Rewrite Surf in C++
 
  SURF:
  * [FIXME: elaborate] Rewrite Surf in C++
 
+ Build System:
+ * Supernovae build mode is definitively removed. It was used to improve
+   inlining and inter-module optimizations. It is nowadays superseded by
+   link-time optimizations commonly available in compilers.
+
  -- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
 SimGrid (3.10) stable; urgency=low
  -- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
 SimGrid (3.10) stable; urgency=low
index e51e466..7c961b1 100644 (file)
@@ -18,10 +18,6 @@ if(enable_compile_warnings AND enable_compile_optimizations)
   SET(BUILDNAME "FULL_FLAGS" CACHE TYPE INTERNAL FORCE)
 endif()
 
   SET(BUILDNAME "FULL_FLAGS" CACHE TYPE INTERNAL FORCE)
 endif()
 
-if(enable_supernovae)
-  SET(BUILDNAME "SUPERNOVAE" CACHE TYPE INTERNAL FORCE)
-endif()
-
 if(HAVE_GTNETS)
   SET(BUILDNAME "GTNETS" CACHE TYPE INTERNAL FORCE)
 endif()
 if(HAVE_GTNETS)
   SET(BUILDNAME "GTNETS" CACHE TYPE INTERNAL FORCE)
 endif()
index f1ff59f..82be210 100644 (file)
@@ -889,8 +889,6 @@ set(generated_files_to_clean
   ${CMAKE_BINARY_DIR}/bin/colorize
   ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml
   ${CMAKE_BINARY_DIR}/examples/smpi/tracing/smpi_traced.trace
   ${CMAKE_BINARY_DIR}/bin/colorize
   ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml
   ${CMAKE_BINARY_DIR}/examples/smpi/tracing/smpi_traced.trace
-  ${CMAKE_BINARY_DIR}/src/supernovae_sg.c
-  ${CMAKE_BINARY_DIR}/src/supernovae_smpi.c
   )
 
 if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
   )
 
 if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
index b4b6295..b3a3ce2 100644 (file)
@@ -19,7 +19,6 @@ set(EXTRA_DIST
   src/include/surf/trace_mgr.h
   src/include/xbt/wine_dbghelp.h
   src/include/xbt/xbt_os_time.h
   src/include/surf/trace_mgr.h
   src/include/xbt/wine_dbghelp.h
   src/include/xbt/xbt_os_time.h
-  src/mk_supernovae.pl
   src/msg/msg_mailbox.h
   src/msg/msg_private.h
   src/portable.h
   src/msg/msg_mailbox.h
   src/msg/msg_private.h
   src/portable.h
@@ -1027,7 +1026,6 @@ set(CMAKE_SOURCE_FILES
   buildtools/Cmake/Scripts/preinstall.sh
   buildtools/Cmake/Scripts/tesh.pl
   buildtools/Cmake/Scripts/update_tesh.pl
   buildtools/Cmake/Scripts/preinstall.sh
   buildtools/Cmake/Scripts/tesh.pl
   buildtools/Cmake/Scripts/update_tesh.pl
-  buildtools/Cmake/Supernovae.cmake
   buildtools/Cmake/UnitTesting.cmake
   buildtools/Cmake/src/internal_config.h.in
   buildtools/Cmake/src/simgrid.nsi.in
   buildtools/Cmake/UnitTesting.cmake
   buildtools/Cmake/src/internal_config.h.in
   buildtools/Cmake/src/simgrid.nsi.in
index 9b9b00a..07ea786 100644 (file)
@@ -374,11 +374,4 @@ add_custom_target(maintainer-clean
   WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
   )
 
   WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
   )
 
-add_custom_target(supernovae-clean
-  COMMAND ${CMAKE_COMMAND} -E remove -f src/supernovae_sg.c
-  COMMAND ${CMAKE_COMMAND} -E remove -f src/supernovae_smpi.c
-  WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
-  )
-
-
 include(CPack)
 include(CPack)
index adcd92e..95f7576 100644 (file)
@@ -3,11 +3,8 @@
 ###############################
 # Declare the library content #
 ###############################
 ###############################
 # Declare the library content #
 ###############################
-# If we want supernovae, rewrite the libs' content to use it
-include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Supernovae.cmake)
 
 # Actually declare our libraries
 
 # Actually declare our libraries
-
 add_library(simgrid SHARED ${simgrid_sources})
 set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version})
 
 add_library(simgrid SHARED ${simgrid_sources})
 set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version})
 
@@ -21,21 +18,6 @@ endif()
 
 add_dependencies(simgrid maintainer_files)
 
 
 add_dependencies(simgrid maintainer_files)
 
-# if supernovaeing, we need some depends to make sure that the source gets generated
-if (enable_supernovae)
-  add_dependencies(simgrid ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c)
-  if(enable_lib_static)
-    add_dependencies(simgrid_static ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c)
-  endif()
-
-  if(enable_smpi)
-    add_dependencies(simgrid ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c)
-    if(enable_lib_static)
-      add_dependencies(simgrid_static ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c)
-    endif()
-  endif()
-endif()
-
 # Compute the dependencies of SimGrid
 #####################################
 set(SIMGRID_DEP "-lm -lstdc++")
 # Compute the dependencies of SimGrid
 #####################################
 set(SIMGRID_DEP "-lm -lstdc++")
index 04e568c..8bb4c0c 100644 (file)
@@ -88,7 +88,3 @@ if(HAVE_NS3)
 else()
   message(STATUS "Warning: To use NS-3 Please install ns3 at least version 3.10 (http://www.nsnam.org/releases/)")
 endif()
 else()
   message(STATUS "Warning: To use NS-3 Please install ns3 at least version 3.10 (http://www.nsnam.org/releases/)")
 endif()
-
-if(HAVE_NS3 AND enable_supernovae)
-  set(enable_supernovae OFF)
-endif()
index f9f4d28..5842fe2 100644 (file)
@@ -36,7 +36,6 @@ option(enable_model-checking "Turn this on to experiment with our prototype of m
 option(enable_lib_static "" off)
 option(enable_jedule "Jedule output of SimDAG." off)
 option(enable_debug "Turn this off to remove all debug messages at compile time (faster, but no debug activable)" on)
 option(enable_lib_static "" off)
 option(enable_jedule "Jedule output of SimDAG." off)
 option(enable_debug "Turn this off to remove all debug messages at compile time (faster, but no debug activable)" on)
-option(enable_supernovae "Whether Supernovae mode (helping compiler optimization) is activated." off)
 option(enable_msg_deprecated "This option enable the use of msg deprecated functions" off)
 
 if(WIN32)
 option(enable_msg_deprecated "This option enable the use of msg deprecated functions" off)
 
 if(WIN32)
index 6e12615..c6e0bd1 100644 (file)
@@ -117,7 +117,6 @@ message("        Compile Smpi f90 ....: ${SMPI_F90}")
 message("        Compile Static ......: ${enable_lib_static}")
 message("")
 message("        Maintainer mode .....: ${enable_maintainer_mode}")
 message("        Compile Static ......: ${enable_lib_static}")
 message("")
 message("        Maintainer mode .....: ${enable_maintainer_mode}")
-message("        Supernovae mode .....: ${enable_supernovae}")
 message("        Model checking ......: ${enable_model-checking}")
 message("        Tracing mode ........: ${enable_tracing}")
 message("        Jedule  mode ........: ${enable_jedule}")
 message("        Model checking ......: ${enable_model-checking}")
 message("        Tracing mode ........: ${enable_tracing}")
 message("        Jedule  mode ........: ${enable_jedule}")
diff --git a/buildtools/Cmake/Supernovae.cmake b/buildtools/Cmake/Supernovae.cmake
deleted file mode 100644 (file)
index 347192e..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-### Make supernovae files and libs
-
-#############################################################################
-### Add here every files that should not be supernovaed (generated files) ###
-#############################################################################
-set(simgrid_fragile_sources
-  src/simdag/sd_daxloader.c
-  src/surf/surfxml_parse.c
-  src/xbt/graphxml_parse.c
-  src/xbt/mmalloc/mm.c
-  ${GTNETS_USED}
-  )
-
-#####################################################
-### END OF CONFIGURATION, NO NEED TO READ FURTHER ###
-#####################################################
-
-### Rebuild the supernovae source files
-if (enable_supernovae) # I need supernovae
-
-  message(WARNING
-"==============================================================================\n"
-"WARNING\n"
-"Supernovae builds are deprecated, and expected to be removed in the next version of SimGrid.\n"
-"If you want this feature to be kept, please tell us at <simgrid-user@lists.gforge.inria.fr>.\n"
-"===============================================================================
-")
-
-  # supernovae files are generated. I promise
-  set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c
-    PROPERTIES GENERATED true)
-  set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c
-    PROPERTIES GENERATED true)
-
-  ADD_CUSTOM_COMMAND(
-    OUTPUT   ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c
-    DEPENDS  ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl ${simgrid_sources}
-    COMMAND  perl ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c '--fragile=${simgrid_fragile_sources}' '${simgrid_sources}'
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}
-    COMMENT "Generating supernovae_sg.c"
-    )
-
-
-  ADD_CUSTOM_COMMAND(
-    OUTPUT   ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c
-    DEPENDS  ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl ${SMPI_SRC}
-    COMMAND  perl ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c  '${SMPI_SRC}'
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}
-    COMMENT "Generating supernovae_smpi.c"
-    )
-
-  ### Change the content of the libraries so that it contains only supernovae+fragiles
-  set(simgrid_sources
-    ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c
-    ${simgrid_fragile_sources})
-
-  set(SMPI_SRC
-    ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c)
-
-endif() # I need supernovae
index 8867f4c..63aebcf 100644 (file)
@@ -188,13 +188,6 @@ accepts several options, as listed below.
       your simulation speed even if you simulate without activating
       the model-checker. We are working on improving this situation.
 
       your simulation speed even if you simulate without activating
       the model-checker. We are working on improving this situation.
 
-  @li <b>enable_supernovae</b> (ON/OFF): If you use an ancient
-      compiler (such as gcc prior to 4.6), you want to enable this
-      option to ensure that the whole SimGrid library is presented to
-      the compiler as a unique compilation unit to allow cross-units
-      optimizations. This is useless on modern compilers (and will
-      soon be droped).
-
   @li <b>enable_compile_warnings</b> (ON/OFF): request the compiler to
       issue error message whenever the source code is not perfectly
       clean. If you develop SimGrid itself, you must activate it to
   @li <b>enable_compile_warnings</b> (ON/OFF): request the compiler to
       issue error message whenever the source code is not perfectly
       clean. If you develop SimGrid itself, you must activate it to
index 471ee3a..c33d0ff 100644 (file)
@@ -183,7 +183,7 @@ typedef enum {
  * Indicates which category is the default one.
  */
 
  * Indicates which category is the default one.
  */
 
-#if defined(XBT_LOG_MAYDAY) || defined(SUPERNOVAE_MODE) /*|| defined (NLOG) * turning logging off */
+#if defined(XBT_LOG_MAYDAY) /*|| defined (NLOG) * turning logging off */
 # define XBT_LOG_DEFAULT_CATEGORY(cname)
 #else
 # define XBT_LOG_DEFAULT_CATEGORY(cname) \
 # define XBT_LOG_DEFAULT_CATEGORY(cname)
 #else
 # define XBT_LOG_DEFAULT_CATEGORY(cname) \
diff --git a/src/mk_supernovae.pl b/src/mk_supernovae.pl
deleted file mode 100644 (file)
index e0ea6dc..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#! /usr/bin/perl
-
-# Copyright (c) 2010-2011, 2014. 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.
-
-use strict;
-use Getopt::Long qw(GetOptions);
-
-#open TMP,">mk_supernovae.pl.args";
-#map {print TMP "$_ "} @ARGV;
-#close TMP;
-
-sub usage($) {
-    my $ret;
-    print "USAGE: mk_supernovae.pl [--fragile=file]* --out=file file1 file2*\n";
-    print "  --help: show this message\n";
-    print "  --fragile=file: specify that file is fragile and shouldn't be supernovaed\n";
-    print "  --out=file: specify the name of the output file\n";
-    print "elements may be separated by semi-columns (;) instead of spaces, too\n";
-    exit $ret;
-}
-
-my @fragile_files=undef;
-my $outfile=undef;
-my $help;
-
-Getopt::Long::config('permute','no_getopt_compat', 'no_auto_abbrev');
-GetOptions(
-    'help|h'                => \$help,
-
-    'fragile=s' =>\@fragile_files,
-    'out=s'     =>\$outfile) or usage(1);
-
-@fragile_files = split(/;/,join(';',@fragile_files));
-@fragile_files = split(/ /,join(' ',@fragile_files));
-
-usage(0) if (defined($help));
-unless(defined($outfile)) {
-    print "ERROR: No outfile defined.\n";
-    usage(1);
-}
-
-#print "mk_supernovae: generate $outfile\n";  
-
-open OUT, ">$outfile" or die "ERROR: cannot open $outfile: $!\n";
-
-print OUT <<EOF
-#define SUPERNOVAE_MODE 1
-#ifndef _GNU_SOURCE
-#  define _GNU_SOURCE     /* for getline() with older libc */
-#endif
-#ifndef _SVID_SOURCE
-#  define _SVID_SOURCE    /* strdup() */
-#endif
-#ifndef _ISOC99_SOURCE
-#  define _ISOC99_SOURCE  /* isfinite() */
-#endif
-#ifndef _ISO_C99_SOURCE
-#  define _ISO_C99_SOURCE /* isfinite() */
-#endif
-#include <ctype.h>
-#include "portable.h"
-#include "xbt.h"
-  
-EOF
-  ;
-
-sub readfile($) {
-    my $filename=shift;
-    open IN,"$filename" || die "ERROR: cannot read $filename: $!\n";
-    my $res;
-    while (<IN>) {
-       $res .= $_;
-    }
-    close IN;  
-    return $res;
-}
-
-
-my %fragile;
-map {$fragile{$_}=1} @fragile_files;
-my @args = split(/;/,join(';',@ARGV));
-@args = split(/ /,join(' ',@args));
-my $nbfile=0;
-foreach my $file (@args) {
-    if ($fragile{$file}) {
-       print "mk_supernovae: $file is fragile, skip it\n";
-       next;
-    } 
-#      print "mk_supernovae: process $file\n";
-    $nbfile++;
-
-    my $needundef=1;
-    print OUT "/* file $file */\n";
-    if ($file eq "xbt/log.c") {
-       print OUT "  #define _simgrid_log_category__default &_simgrid_log_category__log\n";
-    } else {
-       my $ctn = readfile($file);
-       if ($ctn =~ m/XBT_LOG_[^ ]*?DEFAULT_[^ ]*?CATEGORY/s) {
-           my $default=$ctn;
-           $default =~ s/.*XBT_LOG_[^ ]*?DEFAULT_[^ ]*?CATEGORY[^(]*\(([^,)]*).*$/$1/s;
-           print OUT "  #define _simgrid_log_category__default &_simgrid_log_category__$default\n";
-       } else {
-           print OUT "  /* no default category in file $file */\n";
-           $needundef = 0;
-       }
-    }
-    print OUT "  #include \"$file\"\n";
-    print OUT "  #undef _simgrid_log_category__default\n" if $needundef;
-    print OUT "\n";
-}
-close OUT;
-print "mk_supernovae: $outfile contains $nbfile files inlined\n";
index 5adcfcc..e4dbbb5 100644 (file)
@@ -545,15 +545,3 @@ int RngStream_RandInt (RngStream g, int i, int j)
 {
    return i + (int) ((j - i + 1.0) * RngStream_RandU01 (g));
 }
 {
    return i + (int) ((j - i + 1.0) * RngStream_RandU01 (g));
 }
-
-/* Undefine this terms, or supernovae build will fail. */
-#undef norm
-#undef m1
-#undef m2
-#undef a12
-#undef a13n
-#undef a21
-#undef a23n
-#undef two17
-#undef two53
-#undef fact