From a30523ee9a7f4c3a5d86d33f1d5183386a212b22 Mon Sep 17 00:00:00 2001 From: Navarrop Date: Thu, 20 Oct 2011 11:11:25 +0200 Subject: [PATCH] Remove supernovae mode for SimGrid v3.7 --- .gitignore | 3 +- buildtools/Cmake/CTestConfig.cmake | 4 - buildtools/Cmake/CompleteInFiles.cmake | 3 - buildtools/Cmake/DefinePackages.cmake | 1 - buildtools/Cmake/Distrib.cmake | 7 -- buildtools/Cmake/MakeLib.cmake | 19 ---- buildtools/Cmake/Modules/FindNS3.cmake | 6 +- buildtools/Cmake/Option.cmake | 21 +---- buildtools/Cmake/PrintArgs.cmake | 1 - buildtools/Cmake/Supernovae.cmake | 69 -------------- buildtools/pipol/Experimental.sh | 24 +---- buildtools/pipol/Experimental_bindings.sh | 1 - buildtools/pipol/MemCheck.sh | 2 - buildtools/pipol/Nightly_memCheck.sh | 1 - buildtools/pipol/Nightly_simgrid.sh | 5 +- doc/installSimgrid.doc | 4 - src/mk_supernovae.pl | 110 ---------------------- 17 files changed, 9 insertions(+), 272 deletions(-) delete mode 100644 buildtools/Cmake/Supernovae.cmake delete mode 100755 src/mk_supernovae.pl diff --git a/.gitignore b/.gitignore index f25af124a2..9c37201669 100644 --- a/.gitignore +++ b/.gitignore @@ -34,10 +34,9 @@ examples/msg/masterslave/simgrid.so examples/simdag/simgrid.so ################################################ -### Units and supernovae files +### Units files src/simgrid_units_main.c src/*_unit.c -src/supernovae_*.c ################################################ ### Generated files diff --git a/buildtools/Cmake/CTestConfig.cmake b/buildtools/Cmake/CTestConfig.cmake index 6e833cece4..35e004bca4 100644 --- a/buildtools/Cmake/CTestConfig.cmake +++ b/buildtools/Cmake/CTestConfig.cmake @@ -18,10 +18,6 @@ if(enable_compile_warnings AND enable_compile_optimizations) SET(BUILDNAME "FULL_FLAGS" CACHE TYPE INTERNAL FORCE) endif(enable_compile_warnings AND enable_compile_optimizations) -if(enable_supernovae) - SET(BUILDNAME "SUPERNOVAE" CACHE TYPE INTERNAL FORCE) -endif(enable_supernovae) - if(HAVE_GTNETS) SET(BUILDNAME "GTNETS" CACHE TYPE INTERNAL FORCE) endif(HAVE_GTNETS) diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 1f422e1332..36c3303fb6 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -808,9 +808,6 @@ ${CMAKE_BINARY_DIR}/bin/smpirun ${CMAKE_BINARY_DIR}/bin/colorize ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml ${CMAKE_BINARY_DIR}/examples/smpi/smpi_traced.trace -${CMAKE_BINARY_DIR}/src/supernovae_sg.c -${CMAKE_BINARY_DIR}/src/supernovae_gras.c -${CMAKE_BINARY_DIR}/src/supernovae_smpi.c ) if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}") diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index 95636b9d95..0a03012686 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -87,7 +87,6 @@ set(EXTRA_DIST src/smpi/private.h src/smpi/smpi_mpi_dt_private.h src/smpi/README - src/mk_supernovae.pl examples/gras/ping/ping.h examples/gras/console/ping.h diff --git a/buildtools/Cmake/Distrib.cmake b/buildtools/Cmake/Distrib.cmake index 3f0730849f..42b903239d 100644 --- a/buildtools/Cmake/Distrib.cmake +++ b/buildtools/Cmake/Distrib.cmake @@ -306,13 +306,6 @@ COMMAND ${CMAKE_COMMAND} -E remove -f src/xbt_synchro_unit.c WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}" ) -add_custom_target(supernovae-clean -COMMAND ${CMAKE_COMMAND} -E remove -f src/supernovae_gras.c -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}" -) - ############################################# ### Fill in the "make sync-gforge" target ### ############################################# diff --git a/buildtools/Cmake/MakeLib.cmake b/buildtools/Cmake/MakeLib.cmake index 45b347dd60..b6de4e9dcd 100644 --- a/buildtools/Cmake/MakeLib.cmake +++ b/buildtools/Cmake/MakeLib.cmake @@ -3,9 +3,6 @@ ############################### # 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 add_library(simgrid SHARED ${simgrid_sources}) @@ -29,22 +26,6 @@ endif(enable_smpi) add_dependencies(gras 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(enable_lib_static) - add_dependencies(gras ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_gras.c) - - if(enable_smpi) - add_dependencies(smpi ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c) - if(enable_lib_static) - add_dependencies(smpi_static ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c) - endif(enable_lib_static) - endif(enable_smpi) -endif(enable_supernovae) - # Compute the dependencies of GRAS ################################## set(GRAS_DEP "-lm -lpthread") diff --git a/buildtools/Cmake/Modules/FindNS3.cmake b/buildtools/Cmake/Modules/FindNS3.cmake index c8e34bbc8d..3bbf48e405 100644 --- a/buildtools/Cmake/Modules/FindNS3.cmake +++ b/buildtools/Cmake/Modules/FindNS3.cmake @@ -103,8 +103,4 @@ if(HAVE_NS3) endif(NOT operation) else(HAVE_NS3) message(STATUS "Warning: To use NS-3 Please install ns3 at least version 3.10 (http://www.nsnam.org/releases/)") -endif(HAVE_NS3) - -if(HAVE_NS3 AND enable_supernovae) - set(enable_supernovae OFF) -endif(HAVE_NS3 AND enable_supernovae) \ No newline at end of file +endif(HAVE_NS3) \ No newline at end of file diff --git a/buildtools/Cmake/Option.cmake b/buildtools/Cmake/Option.cmake index 9e2bf45440..f17905ec69 100644 --- a/buildtools/Cmake/Option.cmake +++ b/buildtools/Cmake/Option.cmake @@ -15,22 +15,16 @@ endif(NOT CMAKE_INSTALL_PREFIX) set(pipol_user ${pipol_user} CACHE TYPE INTERNAL FORCE) option(release "Whether Release Mode is activated (disable tests on experimental parts)" on) +option(enable_compile_optimizations "" on) +option(enable_debug "Set NDEBUG flag" on) option(enable_gtnets "Whether gtnets model is activated." off) option(enable_ns3 "Whether ns3 model is activated." off) option(enable_smpi "This variable set smpi lib." off) -option(enable_lua "Whether the lua bindings are activated." on) - -if(WIN32 OR APPLE) -set(enable_smpi off CACHE TYPE INTERNAL FORCE) -set(enable_lua off CACHE TYPE INTERNAL FORCE) -endif(WIN32 OR APPLE) - -option(enable_compile_optimizations "" on) +option(enable_lua "Whether the lua bindings are activated." off) option(enable_compile_warnings "Whether compilation warnings should be turned into errors." off) option(enable_maintainer_mode "Whether flex and flexml files should be rebuilt." off) -option(enable_supernovae "Whether Supernovae mode (helping compiler optimization) is activated." on) -option(enable_tracing "Tracing simulations for visualization." on) +option(enable_tracing "Tracing simulations for visualization." off) option(enable_latency_bound_tracking "" off) option(enable_coverage "Enable coverage." off) option(enable_memcheck "Enable memcheck." off) @@ -38,13 +32,6 @@ option(enable_print_message "Enable print message during config." off) option(enable_model-checking "" off) option(enable_lib_static "" off) option(enable_jedule "Jedule output of SimDAG." off) -option(enable_debug "Set NDEBUG flag" on) - -if(enable_supernovae AND enable_model-checking) - set(enable_model-checking false CACHE TYPE INTERNAL FORCE) - message("\n\nWith supernovae mode the model checking must be disable.!!!\n\n") -endif(enable_supernovae AND enable_model-checking) - mark_as_advanced(HAVE_SSH) mark_as_advanced(HAVE_RSYNC) diff --git a/buildtools/Cmake/PrintArgs.cmake b/buildtools/Cmake/PrintArgs.cmake index 5b9912fee5..4b541a805f 100644 --- a/buildtools/Cmake/PrintArgs.cmake +++ b/buildtools/Cmake/PrintArgs.cmake @@ -98,7 +98,6 @@ message(" Compile Smpi : ${enable_smpi}") 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}") diff --git a/buildtools/Cmake/Supernovae.cmake b/buildtools/Cmake/Supernovae.cmake deleted file mode 100644 index 4e7c2f9a0c..0000000000 --- a/buildtools/Cmake/Supernovae.cmake +++ /dev/null @@ -1,69 +0,0 @@ -### Make supernovae files and libs - -############################################################################# -### Add here every files that should not be supernovaed (generated files) ### -############################################################################# -set(simgrid_fragile_sources - src/gras/DataDesc/ddt_parse.yy.c - src/surf/surfxml_parse.c - src/xbt/graphxml_parse.c - src/simdag/sd_daxloader.c - ${GTNETS_USED} -) -set(gras_fragile_sources - src/gras/DataDesc/ddt_parse.yy.c - src/xbt/graphxml_parse.c -) - -##################################################### -### END OF CONFIGURATION, NO NEED TO READ FURTHER ### -##################################################### - -### Rebuild the supernovae source files -if (enable_supernovae) # I need supernovae - - # 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_gras.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_gras.c - DEPENDS ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl ${gras_sources} - COMMAND perl ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_gras.c '--fragile=${gras_fragile_sources}' '${gras_sources}' - WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} - COMMENT "Generating supernovae_gras.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(gras_sources - ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_gras.c - ${gras_fragile_sources}) - - set(SMPI_SRC - ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c) - -endif(enable_supernovae) # I need supernovae diff --git a/buildtools/pipol/Experimental.sh b/buildtools/pipol/Experimental.sh index afa30ee5ee..c5cfd88d8c 100755 --- a/buildtools/pipol/Experimental.sh +++ b/buildtools/pipol/Experimental.sh @@ -29,27 +29,6 @@ fi #SIMGRID_ROOT=`pwd` #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SIMGRID_ROOT/gtnets_install/lib -#supernovae -cmake \ --Denable_lua=on \ --Denable_tracing=on \ --Denable_smpi=on \ --Denable_supernovae=on \ --Denable_compile_optimizations=on \ --Denable_compile_warnings=on \ --Denable_lib_static=off \ --Denable_model-checking=off \ --Denable_latency_bound_tracking=off \ --Drelease=on \ --Denable_gtnets=off . - -ctest -D ExperimentalStart -ctest -D ExperimentalConfigure -ctest -D ExperimentalBuild -ctest -D ExperimentalTest -ctest -D ExperimentalSubmit -make clean - #MC cmake \ -Denable_latency_bound_tracking=on \ @@ -60,8 +39,7 @@ cmake \ -Denable_compile_optimizations=off \ -Denable_auto_install=on \ -DCMAKE_INSTALL_PREFIX=./simgrid_install \ --Drelease=on \ --Denable_supernovae=off . +-Drelease=on . ctest -D ExperimentalStart ctest -D ExperimentalConfigure ctest -D ExperimentalBuild diff --git a/buildtools/pipol/Experimental_bindings.sh b/buildtools/pipol/Experimental_bindings.sh index 6f689e877e..73a6f131fa 100755 --- a/buildtools/pipol/Experimental_bindings.sh +++ b/buildtools/pipol/Experimental_bindings.sh @@ -24,7 +24,6 @@ export CC=gcc export CXX=g++ fi -#supernovae cmake -Drelease=on . ctest -D ExperimentalStart ctest -D ExperimentalConfigure diff --git a/buildtools/pipol/MemCheck.sh b/buildtools/pipol/MemCheck.sh index 6bc51d898c..ffc42baba4 100755 --- a/buildtools/pipol/MemCheck.sh +++ b/buildtools/pipol/MemCheck.sh @@ -28,8 +28,6 @@ fi cmake \ -Denable_lua=off \ -Denable_tracing=off \ --Denable_smpi=off \ --Denable_supernovae=off \ -Denable_compile_optimizations=off \ -Denable_compile_warnings=on \ -Denable_lib_static=off \ diff --git a/buildtools/pipol/Nightly_memCheck.sh b/buildtools/pipol/Nightly_memCheck.sh index 67e1784373..5efe3851fb 100755 --- a/buildtools/pipol/Nightly_memCheck.sh +++ b/buildtools/pipol/Nightly_memCheck.sh @@ -31,7 +31,6 @@ cmake \ -Denable_lua=off \ -Denable_tracing=off \ -Denable_smpi=off \ --Denable_supernovae=off \ -Denable_compile_optimizations=off \ -Denable_compile_warnings=on \ -Denable_lib_static=off \ diff --git a/buildtools/pipol/Nightly_simgrid.sh b/buildtools/pipol/Nightly_simgrid.sh index 1e147a74fa..b9ead54091 100755 --- a/buildtools/pipol/Nightly_simgrid.sh +++ b/buildtools/pipol/Nightly_simgrid.sh @@ -72,7 +72,7 @@ export CC=gcc export CXX=g++ fi -#supernovae DEFAULT CONF +#DEFAULT CONF cmake -Drelease=on . ctest -D NightlyStart ctest -D NightlyConfigure @@ -86,8 +86,7 @@ cmake \ -Denable_coverage=on \ -Denable_model-checking=on \ -Denable_compile_optimizations=off \ --Drelease=on \ --Denable_supernovae=off . +-Drelease=on . ctest -D NightlyStart ctest -D NightlyConfigure ctest -D NightlyBuild diff --git a/doc/installSimgrid.doc b/doc/installSimgrid.doc index 456835344c..46cfd830bd 100644 --- a/doc/installSimgrid.doc +++ b/doc/installSimgrid.doc @@ -41,7 +41,6 @@ For Windows : enable_compile_warnings ON/OFF or TRUE/FALSE or 1/0 enable_smpi ON/OFF or TRUE/FALSE or 1/0 enable_maintainer_mode ON/OFF or TRUE/FALSE or 1/0 - enable_supernovae ON/OFF or TRUE/FALSE or 1/0 enable_tracing ON/OFF or TRUE/FALSE or 1/0 enable_coverage ON/OFF or TRUE/FALSE or 1/0 enable_memcheck ON/OFF or TRUE/FALSE or 1/0 @@ -72,8 +71,6 @@ For Windows : \li enable_maintainer_mode : set to true it remakes some files. - \li enable_supernovae : set to true make one file for each lib and compile with those generated files. - \li enable_tracing : To enable the generation of simulation traces for visualization. \li enable_coverage : When set to true this option enable code coverage by setting -fprofile-arcs -ftest-coverage flags. @@ -110,7 +107,6 @@ Those options are initialized the first time you launch "cmake ." whithout speci enable_gtnets on enable_lua on enable_smpi on -enable_supernovae on enable_tracing on enable_compile_optimizations on enable_debug on diff --git a/src/mk_supernovae.pl b/src/mk_supernovae.pl deleted file mode 100755 index bd99ab4238..0000000000 --- a/src/mk_supernovae.pl +++ /dev/null @@ -1,110 +0,0 @@ -#! /usr/bin/perl - -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 < -#include "portable.h" -#include "xbt.h" - -EOF - ; - -sub readfile($) { - my $filename=shift; - open IN,"$filename" || die "ERROR: cannot read $filename: $!\n"; - my $res; - while () { - $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"; -- 2.20.1