### Check 32bits or 64bits
INCLUDE (CheckTypeSize)
-CHECK_TYPE_SIZE("long" SIZEOF_LONG)
-IF(SIZEOF_LONG EQUAL 4)
+CHECK_TYPE_SIZE("void*" SIZEOF_VOIDSTAR)
+IF(SIZEOF_VOIDSTAR EQUAL 4)
SET(ARCH_32_BITS 1)
-ELSE(SIZEOF_LONG EQUAL 4)
+ELSE(SIZEOF_VOIDSTAR EQUAL 4)
SET(ARCH_32_BITS 0)
-ENDIF(SIZEOF_LONG EQUAL 4)
+ENDIF(SIZEOF_VOIDSTAR EQUAL 4)
if(WIN32)
licenses. More specifically, these files are listed below, along with
their license.
+=========================================================================
+
+We have embeded pcre 8.12 library into the windows installer.
+
+PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+Release 8 of PCRE is distributed under the terms of the "BSD" licence.
+The basic library functions are written in C and are freestanding. Also
+included in the distribution is a set of C++ wrapper functions.
+
+/*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
+
==========================================================================
The file src/xbt/snprintf.c contains this license text:
SimGrid (3.7) unstable; urgency=low
+ Dot Loader
+ * Bug fix: correction of the dot file parsing with the libcgraph
+
+ Windows Port
+ * Fix many issues that prevented SimGrid from working
+ correctly on windows (both for 32 and 64 bit architectures):
+ - port win32_ucontext.c to 64 bit arch
+ - now that we rely on gcc, clean xbt/log.h so that it does not
+ add useless bugs that had been introduced to handle the
+ borland compiler
+ * Create an installer for windows with nsis(amd64 and win32)
+ - Add an hello world project to illustrate simgrid project creation.
+ - Embed libpcre into the Simgrid installer to avoid
+ its compilation burden
+
-- `LC_ALL=C date` Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
SIMDAG
- [dot loader]
- * Bug fix: correction of the dot file parsing with the libcgraph
SimGrid (3.6.1) unstable; urgency=low
# Those tests are broken : set to "fail" for release v3.6
if(release)
-if(${ARCH_32_BITS})
- set_tests_properties(gras-rpc-sg-32-thread PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-all2all-sg-32-thread PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-synchro-sg-32-thread PROPERTIES WILL_FAIL true)
- if(HAVE_UCONTEXT_H)
- set_tests_properties(gras-rpc-sg-32-ucontext PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-all2all-sg-32-ucontext PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-synchro-sg-32-ucontext PROPERTIES WILL_FAIL true)
- endif(HAVE_UCONTEXT_H)
- if(HAVE_RAWCTX)
- set_tests_properties(gras-rpc-sg-32-raw PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-all2all-sg-32-raw PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-synchro-sg-32-raw PROPERTIES WILL_FAIL true)
- endif(HAVE_RAWCTX)
-else(${ARCH_32_BITS})
- set_tests_properties(gras-rpc-sg-64-thread PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-all2all-sg-64-thread PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-synchro-sg-64-thread PROPERTIES WILL_FAIL true)
- if(HAVE_UCONTEXT_H)
- set_tests_properties(gras-rpc-sg-64-ucontext PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-all2all-sg-64-ucontext PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-synchro-sg-64-ucontext PROPERTIES WILL_FAIL true)
- endif(HAVE_UCONTEXT_H)
- if(HAVE_RAWCTX)
- set_tests_properties(gras-rpc-sg-64-raw PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-all2all-sg-64-raw PROPERTIES WILL_FAIL true)
- set_tests_properties(gras-synchro-sg-64-raw PROPERTIES WILL_FAIL true)
- endif(HAVE_RAWCTX)
-endif(${ARCH_32_BITS})
if(HAVE_MC)
set_tests_properties(mc-bugged1-thread PROPERTIES WILL_FAIL true)
set_tests_properties(mc-bugged2-thread PROPERTIES WILL_FAIL true)
${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Modules
)
-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") #Intel processor 64 bits
- message(STATUS "System processor: amd64")
- set(HAVE_RAWCTX 1)
-
-ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86") #Intel processor 32 bits
- message(STATUS "System processor: x86")
- set(PROCESSOR_i686 1)
- set(HAVE_RAWCTX 1)
-
-ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
+# x86_64
+# x86
+# i.86
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86")
IF(${ARCH_32_BITS})
set(PROCESSOR_i686 1)
+ set(SIMGRID_SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")
ELSE(${ARCH_32_BITS})
message(STATUS "System processor: amd64")
+ set(SIMGRID_SYSTEM_PROCESSOR "amd64")
set(PROCESSOR_x86_64 1)
set(PROCESSOR_i686 0)
ENDIF(${ARCH_32_BITS})
ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") #PROCESSOR NOT fIND
message(STATUS "PROCESSOR NOT FOUND: ${CMAKE_SYSTEM_PROCESSOR}")
-ENDIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86")
message(STATUS "Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
OUTPUT_VARIABLE HAVE_SEM_OPEN_run)
if(HAVE_SEM_OPEN_run)
set(HAVE_SEM_OPEN 0)
+ message(STATUS "Warning: sem_open not compilable")
else(HAVE_SEM_OPEN_run)
exec_program("./testprog" RETURN_VALUE HAVE_SEM_OPEN_run2 OUTPUT_VARIABLE var_compil)
if(HAVE_SEM_OPEN_run2)
set(HAVE_SEM_OPEN 0)
+ message(STATUS "Warning: sem_open not executable")
else(HAVE_SEM_OPEN_run2)
set(HAVE_SEM_OPEN 1)
endif(HAVE_SEM_OPEN_run2)
OUTPUT_VARIABLE HAVE_SEM_INIT_run)
if(HAVE_SEM_INIT_run)
set(HAVE_SEM_INIT 0)
+ message(STATUS "Warning: sem_init not compilable")
else(HAVE_SEM_INIT_run)
exec_program("./testprog" RETURN_VALUE HAVE_SEM_INIT_run OUTPUT_VARIABLE var_compil)
if(HAVE_SEM_INIT_run)
set(HAVE_SEM_INIT 0)
+ message(STATUS "Warning: sem_init not executable")
else(HAVE_SEM_INIT_run)
set(HAVE_SEM_INIT 1)
endif(HAVE_SEM_INIT_run)
endif(HAVE_SEM_INIT_LIB)
if(NOT HAVE_SEM_OPEN AND NOT HAVE_SEM_INIT)
- message(FATAL_ERROR "Semaphores are not usable, but they are mandatory to threads (you may need to mount /dev).")
+ message(FATAL_ERROR "Semaphores are not usable (neither sem_open nor sem_init is both compilable and executable), but they are mandatory to threads (you may need to mount /dev).")
endif(NOT HAVE_SEM_OPEN AND NOT HAVE_SEM_INIT)
### Test that we have a way to timewait for semaphores
SET(GRAS_THISARCH 4)
endif(val_big MATCHES "l_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/8:")
if(val_big MATCHES "l_C:1/1:_I:2/2:4/4:4/4:8/8:_P:8/8:8/8:_D:4/4:8/8:")
- #gras_arch=11; gras_size=64; gras_arch_name=little64_2;
+ #gras_arch=5; gras_size=64; gras_arch_name=little64_2;
SET(GRAS_ARCH_32_BITS 0)
SET(GRAS_THISARCH 5)
endif(val_big MATCHES "l_C:1/1:_I:2/2:4/4:4/4:8/8:_P:8/8:8/8:_D:4/4:8/8:")
if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/8:")
- #gras_arch=5; gras_size=32; gras_arch_name=big32;
+ #gras_arch=6; gras_size=32; gras_arch_name=big32_8;
SET(GRAS_ARCH_32_BITS 1)
SET(GRAS_THISARCH 6)
endif(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/8:")
if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/4:")
- #gras_arch=6; gras_size=32; gras_arch_name=big32_8_4;
+ #gras_arch=7; gras_size=32; gras_arch_name=big32_8_4;
SET(GRAS_ARCH_32_BITS 1)
SET(GRAS_THISARCH 7)
endif(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/4:")
if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/4:_P:4/4:4/4:_D:4/4:8/4:")
- #gras_arch=7; gras_size=32; gras_arch_name=big32_4;
+ #gras_arch=8; gras_size=32; gras_arch_name=big32_4;
SET(GRAS_ARCH_32_BITS 1)
SET(GRAS_THISARCH 8)
endif(val_big MATCHES "B_C:1/1:_I:2/2:4/4:4/4:8/4:_P:4/4:4/4:_D:4/4:8/4:")
if(val_big MATCHES "B_C:1/1:_I:2/2:4/2:4/2:8/2:_P:4/2:4/2:_D:4/2:8/2:")
- #gras_arch=8; gras_size=32; gras_arch_name=big32_2;
+ #gras_arch=9; gras_size=32; gras_arch_name=big32_2;
SET(GRAS_ARCH_32_BITS 1)
SET(GRAS_THISARCH 9)
endif(val_big MATCHES "B_C:1/1:_I:2/2:4/2:4/2:8/2:_P:4/2:4/2:_D:4/2:8/2:")
if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/8:")
- #gras_arch=9; gras_size=64; gras_arch_name=big64;
+ #gras_arch=10; gras_size=64; gras_arch_name=big64;
SET(GRAS_ARCH_32_BITS 0)
SET(GRAS_THISARCH 10)
endif(val_big MATCHES "B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/8:")
if(val_big MATCHES "B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/4:")
- #gras_arch=10;gras_size=64; gras_arch_name=big64_8_4;
+ #gras_arch=11; gras_size=64; gras_arch_name=big64_8_4;
SET(GRAS_ARCH_32_BITS 0)
SET(GRAS_THISARCH 11)
endif(val_big MATCHES "B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/4:")
add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets)\r
endif(HAVE_GTNETS)\r
\r
+if(HAVE_NS3)\r
+ add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/ns3)\r
+endif(HAVE_NS3)\r
+\r
add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth)\r
add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/amok/saturate)\r
\r
endif(CMAKE_COMPILER_IS_GNUCC)\r
endif(MSVC)\r
\r
-set(GRAS_DEP "wsock32")\r
-set(SIMGRID_DEP "wsock32")\r
+set(GRAS_DEP "ws2_32")\r
+set(SIMGRID_DEP "ws2_32")\r
\r
if(HAVE_PCRE_LIB)\r
SET(SIMGRID_DEP "${SIMGRID_DEP} -lpcre")\r
find_library(PATH_PCRE_LIB
NAMES pcre
HINTS
+ $ENV{SIMGRID_PCRE_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{PCRE_LIBRARY_PATH}
PATH_SUFFIXES lib/ GnuWin32/lib
/sw
/usr)
+string(REGEX MATCH ".dll.a" operation "${PATH_PCRE_LIB}")
+
+if(NOT operation)
+ if(WIN32)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-DPCRE_STATIC ")
+ endif(WIN32)
+endif(NOT operation)
+
+
find_path(PATH_PCRE_H "pcre.h"
HINTS
+ $ENV{SIMGRID_PCRE_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{PCRE_LIBRARY_PATH}
PATH_SUFFIXES include/ GnuWin32/include
/opt/csw
/sw
/usr)
-
+
set(HAVE_PCRE_LIB 0)
message(STATUS "Looking for pcre.h")
message(STATUS "Looking for lib pcre - not found")
endif(PATH_PCRE_LIB)
+if(WIN32)
+ find_path(PATH_PCRE_LICENCE "LICENCE"
+ HINTS
+ $ENV{SIMGRID_PCRE_LIBRARY_PATH}
+ $ENV{LD_LIBRARY_PATH}
+ $ENV{PCRE_LIBRARY_PATH}
+ PATH_SUFFIXES GnuWin32
+ PATHS
+ /opt
+ /opt/local
+ /opt/csw
+ /sw
+ /usr)
+ message(STATUS "Looking for pcre licence")
+ if(PATH_PCRE_LICENCE)
+ message(STATUS "Looking for pcre licence - found")
+ else(PATH_PCRE_LICENCE)
+ message(STATUS "Looking for pcre licence - not found")
+ endif(PATH_PCRE_LICENCE)
+endif(WIN32)
+
if(PATH_PCRE_LIB AND PATH_PCRE_H)
string(REGEX REPLACE "/libpcre.*[.]${LIB_EXE}$" "" PATHLIBPCRE "${PATH_PCRE_LIB}")
string(REGEX REPLACE "/pcre.h" "" PATH_PCRE_H "${PATH_PCRE_H}")
;--------------------------------\r
\r
Name "Simgrid"\r
-outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@CMAKE_SYSTEM_PROCESSOR@@BIN_EXE@"\r
+outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@SIMGRID_SYSTEM_PROCESSOR@@BIN_EXE@"\r
Icon "@CMAKE_HOME_DIRECTORY@\doc\webcruft\SimGrid.ico"\r
\r
# set the default installation directory\r
createShortCut "$SMPROGRAMS\SimGrid\HelloWorld project.lnk" "$INSTDIR\examples\HelloWorld" \r
\r
SectionEnd\r
+Section "Pcre library" PCRESection \r
+ # install pcre library\r
+ CreateDirectory $INSTDIR\GnuWin32\r
+ setOutPath $INSTDIR\GnuWin32\r
+ file "@PATH_PCRE_LICENCE@\LICENCE"\r
+\r
+ CreateDirectory $INSTDIR\GnuWin32\lib\r
+ setOutPath $INSTDIR\GnuWin32\lib\r
+ file @PATHLIBPCRE@\libpcre.a\r
+ file @PATHLIBPCRE@\libpcreposix.a\r
+ \r
+ CreateDirectory $INSTDIR\GnuWin32\include\r
+ setOutPath $INSTDIR\GnuWin32\include\r
+ file @PATH_PCRE_H@\pcre.h\r
+ file @PATH_PCRE_H@\pcreposix.h\r
+SectionEnd\r
\r
# default section start\r
section \r
WriteRegExpandStr ${env_hklm} SIMGRID_ROOT $INSTDIR\r
WriteRegExpandStr ${env_hklm} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\r
\r
+ WriteRegExpandStr ${env_hklm} SIMGRID_PCRE_LIBRARY_PATH $INSTDIR\GnuWin32\r
+ WriteRegExpandStr ${env_hklm} SIMGRID_PCRE_LIBRARY_VERSION "8.12"\r
+\r
WriteRegStr HKCU "SOFTWARE\SimGrid" "Version" "@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"\r
WriteRegStr HKCU "SOFTWARE\SimGrid" "InstallPath" "$INSTDIR"\r
\r
LangString DESC_BinSection ${LANG_ENGLISH} "Install some useful tools for Simgrid."\r
LangString DESC_DocSection ${LANG_ENGLISH} "Generated (doxygen) documentation."\r
LangString DESC_ExamplesSection ${LANG_ENGLISH} "Simgrid's HelloWorld example and some classical platforms."\r
+LangString DESC_PCRESection ${LANG_ENGLISH} "Install the PCRE and PCREPOSIX libraries for SimGrid."\r
\r
LangString DESC_LibSection ${LANG_FRENCH} "Installer les librairies Simgrid et Gras et leurs Entêtes."\r
LangString DESC_BinSection ${LANG_FRENCH} "Installer les outils optionnels."\r
LangString DESC_DocSection ${LANG_FRENCH} "Installer la documentation."\r
LangString DESC_ExamplesSection ${LANG_FRENCH} "Installer un exemple 'HelloWorld' et des fichiers de plate-formes types."\r
+LangString DESC_PCRESection ${LANG_FRENCH} "Installer les librairies PCRE et PCREPOSIX for SimGrid."\r
\r
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
!insertmacro MUI_DESCRIPTION_TEXT ${LibSection} $(DESC_LibSection)\r
!insertmacro MUI_DESCRIPTION_TEXT ${BinSection} $(DESC_BinSection)\r
!insertmacro MUI_DESCRIPTION_TEXT ${DocSection} $(DESC_DocSection)\r
!insertmacro MUI_DESCRIPTION_TEXT ${ExamplesSection} $(DESC_ExamplesSection)\r
+ !insertmacro MUI_DESCRIPTION_TEXT ${PCRESection} $(DESC_PCRESection)\r
!insertmacro MUI_FUNCTION_DESCRIPTION_END\r
\r
# create a section to define what the uninstaller does.\r
RMDir /r "$INSTDIR\examples"\r
RMDir "$SMPROGRAMS\SimGrid"\r
\r
+ # delete PCRE\r
+ RMDir /r "$INSTDIR\GnuWin32"\r
+ \r
# Delete variable\r
DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
+ DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_PATH\r
+ DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_VERSION\r
DeleteRegKey HKCU "SOFTWARE\SimGrid"\r
\r
# uninstall section end\r
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+
+if($#ARGV!=0) {
+ die "Usage: perl transfrom_optorsim_platform.pl <file.conf>\n";
+}
+
+my($conf_file)=$ARGV[0];
+
+open FILE, $conf_file or die "Unable to open $conf_file";
+
+print "<?xml version='1.0'?>\n";
+print "<!DOCTYPE platform SYSTEM \"http://simgrid.gforge.inria.fr/simgrid.dtd\">\n";
+print "<platform version=\"3\">\n";
+print "<AS id=\"AS0\" routing=\"Floyd\">\n";
+
+my $line;
+my @tokens;
+my $token;
+my $dst = 0;
+my $src = 0;
+my @list_of_name;
+my $num_link = 0;
+
+my @links = ();
+my @routers = ();
+my @hosts = ();
+my @routes = ();
+my $power;
+while(defined($line=<FILE>))
+{
+
+ if($line =~ /^#(.*)\)(.*)$/)
+ {
+ print "<!--$1 $2-->\n";
+ push @list_of_name, $2;
+ }
+ elsif($line =~ /^([0-9]*) ([0-9]*) ([0-9]*) (.*)$/)
+ {
+ if($1.$2.$3 == "000"){
+ if(@list_of_name){
+ push @routers, "\t<router id=\"$list_of_name[$src]\"/>\n";
+ }
+ else{
+ push @routers, "\t<router id=\"$src\"/>\n";
+ }
+ }
+ else{
+ $power = $1 * $3;
+ if($power == 0){
+ $power=1;
+ }
+ if(@list_of_name){
+ push @hosts, "\t<host id=\"$list_of_name[$src]\" power=\"$power\"/>\n";
+ }
+ else{
+ push @hosts, "\t<host id=\"$src\" power=\"$power\"/>\n";
+ }
+ }
+ my $table = $4;
+ @tokens = split(/ /,$table);
+ foreach $token (@tokens) {
+ if($token != "0"){
+ if($src <= $dst){
+
+ push @links, "\t<link id=\"link$num_link\" bandwidth=\"$token\"/>\n";
+
+ if(@list_of_name){
+ push @routes, "\t<route src=\"$list_of_name[$src]\" dst=\"$list_of_name[$dst]\">\n";
+ }
+ else{
+ push @routes, "\t<route src=\"$src\" dst=\"$dst\">\n";
+ }
+ push @routes, "\t\t<link_ctn id=\"link$num_link\"/>\n";
+ push @routes, "\t</route>\n";
+ $num_link++;
+ }
+ }
+ $dst++;
+ }
+ $src++;
+ $dst = 0;
+ }
+ else
+ {
+ die;
+ }
+
+
+}
+close(FILE);
+
+print @hosts;
+print "\n";
+print @routers;
+print "\n";
+print @links;
+print "\n";
+print @routes;
+
+print "</AS>\n";
+print "</platform>";
+
+print " \n";
\ No newline at end of file
find_library(PATH_PCRE_LIB
NAMES pcre
HINTS
+ $ENV{SIMGRID_PCRE_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{PCRE_LIBRARY_PATH}
PATH_SUFFIXES lib/ GnuWin32/lib
/sw
/usr)
+string(REGEX MATCH ".dll.a" operation "${PATH_PCRE_LIB}")
+
+if(NOT operation)
+ if(WIN32)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-DPCRE_STATIC ")
+ endif(WIN32)
+endif(NOT operation)
+
find_path(PATH_PCRE_H "pcre.h"
HINTS
+ $ENV{SIMGRID_PCRE_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{PCRE_LIBRARY_PATH}
PATH_SUFFIXES include/ GnuWin32/include
message(STATUS "Looking for lib pcre - not found")
endif(PATH_PCRE_LIB)
+if(WIN32)
+ find_path(PATH_PCRE_LICENCE "LICENCE"
+ HINTS
+ $ENV{SIMGRID_PCRE_LIBRARY_PATH}
+ $ENV{LD_LIBRARY_PATH}
+ $ENV{PCRE_LIBRARY_PATH}
+ PATH_SUFFIXES GnuWin32
+ PATHS
+ /opt
+ /opt/local
+ /opt/csw
+ /sw
+ /usr)
+ message(STATUS "Looking for pcre licence")
+ if(PATH_PCRE_LICENCE)
+ message(STATUS "Looking for pcre licence - found")
+ else(PATH_PCRE_LICENCE)
+ message(STATUS "Looking for pcre licence - not found")
+ endif(PATH_PCRE_LICENCE)
+endif(WIN32)
+
if(PATH_PCRE_LIB AND PATH_PCRE_H)
string(REGEX REPLACE "/libpcre.*[.]${LIB_EXE}$" "" PATHLIBPCRE "${PATH_PCRE_LIB}")
string(REGEX REPLACE "/pcre.h" "" PATH_PCRE_H "${PATH_PCRE_H}")
1) How to compile an example: (HelloWorld)
-- Run "Git bash" (installed with git).
+- Run "Git bash" (installed with git) or windows shell "cmd".
- Open HelloWorld Directory ('cd' command line).
- Create a build directory and change directory. (optional)
- Type 'cmake -G"Unix Makefiles" <path_to_HelloWorld_project>'
It allows to configure the project.
- FindPCRE.cmake
Simgrid needs pcre regular expression.
- This finds and links to the pcre library.
+ This finds and links to the pcre library (Normally included into Simgrid directory "GnuWin32").
- README
This explaination.
+#! ./tesh
+
! output sort
$ $SG_TEST_EXENV ./all2all_simulator$EXEEXT ${srcdir:=.}/../../msg/small_platform.xml ${srcdir:=.}/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n"
> [ 0.000000] (01:sender@Tremblay) Launch current node
> [ 0.072245] (04:receiver@Jupiter) Got Data from Fafard:5000 (still 2 to go)
> [ 0.072245] (05:sender@Fafard) Sent Data from Fafard to Jupiter
> [ 0.072245] (06:receiver@Fafard) Got Data from Jupiter:5000 (still 2 to go)
+> [ 0.085572] (05:sender@Fafard) Sent Data from Fafard to Ginette
+> [ 0.085572] (08:receiver@Ginette) Got Data from Fafard:5000 (still 2 to go)
+> [ 0.091209] (05:sender@Fafard) Sent Data from Fafard to Bourassa
+> [ 0.091209] (05:sender@Fafard) Exiting GRAS
+> [ 0.091209] (10:receiver@Bourassa) Got Data from Fafard:5000 (still 2 to go)
> [ 0.100817] (04:receiver@Jupiter) Got Data from Ginette:5000 (still 1 to go)
> [ 0.100817] (07:sender@Ginette) Sent Data from Ginette to Jupiter
-> [ 0.100973] (03:sender@Jupiter) Sent Data from Jupiter to Ginette
-> [ 0.100973] (08:receiver@Ginette) Got Data from Jupiter:5000 (still 2 to go)
-> [ 0.114212] (05:sender@Fafard) Sent Data from Fafard to Ginette
-> [ 0.114212] (06:receiver@Fafard) Got Data from Ginette:5000 (still 1 to go)
-> [ 0.114212] (07:sender@Ginette) Sent Data from Ginette to Fafard
-> [ 0.114212] (08:receiver@Ginette) Got Data from Fafard:5000 (still 1 to go)
+> [ 0.114144] (03:sender@Jupiter) Sent Data from Jupiter to Ginette
+> [ 0.114144] (06:receiver@Fafard) Got Data from Ginette:5000 (still 1 to go)
+> [ 0.114144] (07:sender@Ginette) Sent Data from Ginette to Fafard
+> [ 0.114144] (08:receiver@Ginette) Got Data from Jupiter:5000 (still 1 to go)
> [ 0.136528] (04:receiver@Jupiter) Got Data from Bourassa:5000 (still 0 to go)
> [ 0.136528] (04:receiver@Jupiter) Exiting GRAS
> [ 0.136528] (09:sender@Bourassa) Sent Data from Bourassa to Jupiter
-> [ 0.136840] (03:sender@Jupiter) Sent Data from Jupiter to Bourassa
-> [ 0.136840] (03:sender@Jupiter) Exiting GRAS
-> [ 0.136840] (10:receiver@Bourassa) Got Data from Jupiter:5000 (still 2 to go)
> [ 0.142165] (06:receiver@Fafard) Got Data from Bourassa:5000 (still 0 to go)
> [ 0.142165] (06:receiver@Fafard) Exiting GRAS
> [ 0.142165] (09:sender@Bourassa) Sent Data from Bourassa to Fafard
-> [ 0.142321] (05:sender@Fafard) Sent Data from Fafard to Bourassa
-> [ 0.142321] (05:sender@Fafard) Exiting GRAS
-> [ 0.142321] (10:receiver@Bourassa) Got Data from Fafard:5000 (still 1 to go)
-> [ 0.155305] (07:sender@Ginette) Sent Data from Ginette to Bourassa
-> [ 0.155305] (07:sender@Ginette) Exiting GRAS
-> [ 0.155305] (08:receiver@Ginette) Got Data from Bourassa:5000 (still 0 to go)
-> [ 0.155305] (08:receiver@Ginette) Exiting GRAS
-> [ 0.155305] (09:sender@Bourassa) Sent Data from Bourassa to Ginette
-> [ 0.155305] (09:sender@Bourassa) Exiting GRAS
-> [ 0.155305] (10:receiver@Bourassa) Got Data from Ginette:5000 (still 0 to go)
-> [ 0.155305] (10:receiver@Bourassa) Exiting GRAS
+> [ 0.150011] (03:sender@Jupiter) Sent Data from Jupiter to Bourassa
+> [ 0.150011] (03:sender@Jupiter) Exiting GRAS
+> [ 0.150011] (10:receiver@Bourassa) Got Data from Jupiter:5000 (still 1 to go)
+> [ 0.155272] (08:receiver@Ginette) Got Data from Bourassa:5000 (still 0 to go)
+> [ 0.155272] (08:receiver@Ginette) Exiting GRAS
+> [ 0.155272] (09:sender@Bourassa) Sent Data from Bourassa to Ginette
+> [ 0.155272] (09:sender@Bourassa) Exiting GRAS
+> [ 0.162962] (07:sender@Ginette) Sent Data from Ginette to Bourassa
+> [ 0.162962] (07:sender@Ginette) Exiting GRAS
+> [ 0.162962] (10:receiver@Bourassa) Got Data from Ginette:5000 (still 0 to go)
+> [ 0.162962] (10:receiver@Bourassa) Exiting GRAS
#! ./tesh
! output sort
-$ $SG_TEST_EXENV ./all2all_simulator$EXEEXT ${srcdir:=.}/../../msg/small_platform.xml ${srcdir:=.}/all2all.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (1:sender@Tremblay) Launch current node
-> [ 0.000000] (3:sender@Jupiter) Launch current node
-> [ 0.000000] (5:sender@Fafard) Launch current node
-> [ 0.000000] (7:sender@Ginette) Launch current node
-> [ 0.000000] (9:sender@Bourassa) Launch current node
+$ $SG_TEST_EXENV ./all2all_simulator$EXEEXT ${srcdir:=.}/../../msg/small_platform.xml ${srcdir:=.}/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n"
+> [ 0.000000] (01:sender@Tremblay) Launch current node
+> [ 0.000000] (03:sender@Jupiter) Launch current node
+> [ 0.000000] (05:sender@Fafard) Launch current node
+> [ 0.000000] (07:sender@Ginette) Launch current node
+> [ 0.000000] (09:sender@Bourassa) Launch current node
+> [ 0.000156] (02:receiver@Tremblay) Listening on port 4000 (expecting 4 messages)
+> [ 0.000156] (04:receiver@Jupiter) Listening on port 4000 (expecting 4 messages)
+> [ 0.000156] (06:receiver@Fafard) Listening on port 4000 (expecting 4 messages)
+> [ 0.000156] (08:receiver@Ginette) Listening on port 4000 (expecting 4 messages)
> [ 0.000156] (10:receiver@Bourassa) Listening on port 4000 (expecting 4 messages)
-> [ 0.000156] (2:receiver@Tremblay) Listening on port 4000 (expecting 4 messages)
-> [ 0.000156] (4:receiver@Jupiter) Listening on port 4000 (expecting 4 messages)
-> [ 0.000156] (6:receiver@Fafard) Listening on port 4000 (expecting 4 messages)
-> [ 0.000156] (8:receiver@Ginette) Listening on port 4000 (expecting 4 messages)
-> [ 0.015510] (1:sender@Tremblay) Sent Data from Tremblay to Jupiter
-> [ 0.015510] (2:receiver@Tremblay) Got Data from Jupiter:5000 (still 3 to go)
-> [ 0.015510] (3:sender@Jupiter) Sent Data from Jupiter to Tremblay
-> [ 0.015510] (4:receiver@Jupiter) Got Data from Tremblay:5000 (still 3 to go)
-> [ 0.036162] (2:receiver@Tremblay) Got Data from Fafard:5000 (still 2 to go)
-> [ 0.036162] (5:sender@Fafard) Sent Data from Fafard to Tremblay
-> [ 0.036318] (1:sender@Tremblay) Sent Data from Tremblay to Fafard
-> [ 0.036318] (6:receiver@Fafard) Got Data from Tremblay:5000 (still 3 to go)
-> [ 0.049459] (2:receiver@Tremblay) Got Data from Ginette:5000 (still 1 to go)
-> [ 0.049459] (7:sender@Ginette) Sent Data from Ginette to Tremblay
-> [ 0.049771] (1:sender@Tremblay) Sent Data from Tremblay to Ginette
-> [ 0.049771] (8:receiver@Ginette) Got Data from Tremblay:5000 (still 3 to go)
-> [ 0.069896] (2:receiver@Tremblay) Got Data from Bourassa:5000 (still 0 to go)
-> [ 0.069896] (2:receiver@Tremblay) Exiting GRAS
-> [ 0.069896] (9:sender@Bourassa) Sent Data from Bourassa to Tremblay
+> [ 0.015510] (01:sender@Tremblay) Sent Data from Tremblay to Jupiter
+> [ 0.015510] (02:receiver@Tremblay) Got Data from Jupiter:5000 (still 3 to go)
+> [ 0.015510] (03:sender@Jupiter) Sent Data from Jupiter to Tremblay
+> [ 0.015510] (04:receiver@Jupiter) Got Data from Tremblay:5000 (still 3 to go)
+> [ 0.036162] (02:receiver@Tremblay) Got Data from Fafard:5000 (still 2 to go)
+> [ 0.036162] (05:sender@Fafard) Sent Data from Fafard to Tremblay
+> [ 0.036318] (01:sender@Tremblay) Sent Data from Tremblay to Fafard
+> [ 0.036318] (06:receiver@Fafard) Got Data from Tremblay:5000 (still 3 to go)
+> [ 0.049459] (02:receiver@Tremblay) Got Data from Ginette:5000 (still 1 to go)
+> [ 0.049459] (07:sender@Ginette) Sent Data from Ginette to Tremblay
+> [ 0.049771] (01:sender@Tremblay) Sent Data from Tremblay to Ginette
+> [ 0.049771] (08:receiver@Ginette) Got Data from Tremblay:5000 (still 3 to go)
+> [ 0.069896] (02:receiver@Tremblay) Got Data from Bourassa:5000 (still 0 to go)
+> [ 0.069896] (02:receiver@Tremblay) Exiting GRAS
+> [ 0.069896] (09:sender@Bourassa) Sent Data from Bourassa to Tremblay
+> [ 0.070364] (01:sender@Tremblay) Sent Data from Tremblay to Bourassa
+> [ 0.070364] (01:sender@Tremblay) Exiting GRAS
> [ 0.070364] (10:receiver@Bourassa) Got Data from Tremblay:5000 (still 3 to go)
-> [ 0.070364] (1:sender@Tremblay) Sent Data from Tremblay to Bourassa
-> [ 0.070364] (1:sender@Tremblay) Exiting GRAS
-> [ 0.072245] (3:sender@Jupiter) Sent Data from Jupiter to Fafard
-> [ 0.072245] (4:receiver@Jupiter) Got Data from Fafard:5000 (still 2 to go)
-> [ 0.072245] (5:sender@Fafard) Sent Data from Fafard to Jupiter
-> [ 0.072245] (6:receiver@Fafard) Got Data from Jupiter:5000 (still 2 to go)
-> [ 0.100817] (4:receiver@Jupiter) Got Data from Ginette:5000 (still 1 to go)
-> [ 0.100817] (7:sender@Ginette) Sent Data from Ginette to Jupiter
-> [ 0.100973] (3:sender@Jupiter) Sent Data from Jupiter to Ginette
-> [ 0.100973] (8:receiver@Ginette) Got Data from Jupiter:5000 (still 2 to go)
-> [ 0.114212] (5:sender@Fafard) Sent Data from Fafard to Ginette
-> [ 0.114212] (6:receiver@Fafard) Got Data from Ginette:5000 (still 1 to go)
-> [ 0.114212] (7:sender@Ginette) Sent Data from Ginette to Fafard
-> [ 0.114212] (8:receiver@Ginette) Got Data from Fafard:5000 (still 1 to go)
-> [ 0.136528] (4:receiver@Jupiter) Got Data from Bourassa:5000 (still 0 to go)
-> [ 0.136528] (4:receiver@Jupiter) Exiting GRAS
-> [ 0.136528] (9:sender@Bourassa) Sent Data from Bourassa to Jupiter
-> [ 0.136840] (10:receiver@Bourassa) Got Data from Jupiter:5000 (still 2 to go)
-> [ 0.136840] (3:sender@Jupiter) Sent Data from Jupiter to Bourassa
-> [ 0.136840] (3:sender@Jupiter) Exiting GRAS
-> [ 0.142165] (6:receiver@Fafard) Got Data from Bourassa:5000 (still 0 to go)
-> [ 0.142165] (6:receiver@Fafard) Exiting GRAS
-> [ 0.142165] (9:sender@Bourassa) Sent Data from Bourassa to Fafard
-> [ 0.142321] (10:receiver@Bourassa) Got Data from Fafard:5000 (still 1 to go)
-> [ 0.142321] (5:sender@Fafard) Sent Data from Fafard to Bourassa
-> [ 0.142321] (5:sender@Fafard) Exiting GRAS
-> [ 0.155305] (10:receiver@Bourassa) Got Data from Ginette:5000 (still 0 to go)
-> [ 0.155305] (10:receiver@Bourassa) Exiting GRAS
-> [ 0.155305] (7:sender@Ginette) Sent Data from Ginette to Bourassa
-> [ 0.155305] (7:sender@Ginette) Exiting GRAS
-> [ 0.155305] (8:receiver@Ginette) Got Data from Bourassa:5000 (still 0 to go)
-> [ 0.155305] (8:receiver@Ginette) Exiting GRAS
-> [ 0.155305] (9:sender@Bourassa) Sent Data from Bourassa to Ginette
-> [ 0.155305] (9:sender@Bourassa) Exiting GRAS
+> [ 0.072245] (03:sender@Jupiter) Sent Data from Jupiter to Fafard
+> [ 0.072245] (04:receiver@Jupiter) Got Data from Fafard:5000 (still 2 to go)
+> [ 0.072245] (05:sender@Fafard) Sent Data from Fafard to Jupiter
+> [ 0.072245] (06:receiver@Fafard) Got Data from Jupiter:5000 (still 2 to go)
+> [ 0.085572] (05:sender@Fafard) Sent Data from Fafard to Ginette
+> [ 0.085572] (08:receiver@Ginette) Got Data from Fafard:5000 (still 2 to go)
+> [ 0.091209] (05:sender@Fafard) Sent Data from Fafard to Bourassa
+> [ 0.091209] (05:sender@Fafard) Exiting GRAS
+> [ 0.091209] (10:receiver@Bourassa) Got Data from Fafard:5000 (still 2 to go)
+> [ 0.100817] (04:receiver@Jupiter) Got Data from Ginette:5000 (still 1 to go)
+> [ 0.100817] (07:sender@Ginette) Sent Data from Ginette to Jupiter
+> [ 0.114144] (03:sender@Jupiter) Sent Data from Jupiter to Ginette
+> [ 0.114144] (06:receiver@Fafard) Got Data from Ginette:5000 (still 1 to go)
+> [ 0.114144] (07:sender@Ginette) Sent Data from Ginette to Fafard
+> [ 0.114144] (08:receiver@Ginette) Got Data from Jupiter:5000 (still 1 to go)
+> [ 0.136528] (04:receiver@Jupiter) Got Data from Bourassa:5000 (still 0 to go)
+> [ 0.136528] (04:receiver@Jupiter) Exiting GRAS
+> [ 0.136528] (09:sender@Bourassa) Sent Data from Bourassa to Jupiter
+> [ 0.142165] (06:receiver@Fafard) Got Data from Bourassa:5000 (still 0 to go)
+> [ 0.142165] (06:receiver@Fafard) Exiting GRAS
+> [ 0.142165] (09:sender@Bourassa) Sent Data from Bourassa to Fafard
+> [ 0.150011] (03:sender@Jupiter) Sent Data from Jupiter to Bourassa
+> [ 0.150011] (03:sender@Jupiter) Exiting GRAS
+> [ 0.150011] (10:receiver@Bourassa) Got Data from Jupiter:5000 (still 1 to go)
+> [ 0.155272] (08:receiver@Ginette) Got Data from Bourassa:5000 (still 0 to go)
+> [ 0.155272] (08:receiver@Ginette) Exiting GRAS
+> [ 0.155272] (09:sender@Bourassa) Sent Data from Bourassa to Ginette
+> [ 0.155272] (09:sender@Bourassa) Exiting GRAS
+> [ 0.162962] (07:sender@Ginette) Sent Data from Ginette to Bourassa
+> [ 0.162962] (07:sender@Ginette) Exiting GRAS
+> [ 0.162962] (10:receiver@Bourassa) Got Data from Ginette:5000 (still 0 to go)
+> [ 0.162962] (10:receiver@Bourassa) Exiting GRAS
+! timeout 10
+
& $SG_TEST_EXENV ./rpc_server$EXEEXT 4202 --log=root.fmt:%m%n $@
> Launch server (port=4202)
> Listening on port 4202
#! ./tesh
+# There is no timestamp in this test, because we exchange exceptions,
+# which contain not only the filename (which could change in case of
+# VPATH builds), but also the function name (which changes with the
+# optimization level: if inlining, gcc changes it).
+
+! timeout 10
! output sort
-$ $SG_TEST_EXENV ./rpc_simulator$EXEEXT ${srcdir:=.}/../../msg/small_platform.xml ${srcdir:=.}/rpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (1:server@Tremblay) Launch server (port=4000)
-> [ 0.000000] (2:forwarder@Ginette) Launch forwarder (port=4000)
-> [ 0.000000] (3:client@Fafard) Launch client (server on Tremblay:4000)
-> [ 0.000156] (1:server@Tremblay) Listening on port 4000
-> [ 2.000312] (3:client@Fafard) Connected to Tremblay:4000.
-> [ 2.000312] (3:client@Fafard) Connected to server which is on Tremblay:4000
-> [ 2.020863] (1:server@Tremblay) Got message PING(1234) from Fafard:5000
-> [ 2.041415] (1:server@Tremblay) Answered with PONG(4321)
-> [ 2.041415] (3:client@Fafard) The answer to PING(1234) on Tremblay:4000 is PONG(4321)
-> [ 2.041415] (3:client@Fafard) Call the exception raising RPC
-> [ 2.061966] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.082607] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.082607] (3:client@Fafard) Called the exception raising RPC
-> [ 2.082607] (3:client@Fafard) Call the exception raising RPC (i=0)
-> [ 2.103157] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.123799] (3:client@Fafard) Call the exception raising RPC (i=1)
-> [ 2.144349] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.164990] (3:client@Fafard) Call the exception raising RPC (i=2)
-> [ 2.185541] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.206182] (3:client@Fafard) Call the exception raising RPC (i=3)
-> [ 2.226733] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.247374] (3:client@Fafard) Call the exception raising RPC (i=4)
-> [ 2.267925] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.288566] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=0)
-> [ 2.301669] (2:forwarder@Ginette) Forward a request
-> [ 2.314900] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.328190] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.341354] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.341354] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=1)
-> [ 2.354457] (2:forwarder@Ginette) Forward a request
-> [ 2.367688] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.380978] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.394142] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.394142] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=2)
-> [ 2.407245] (2:forwarder@Ginette) Forward a request
-> [ 2.420477] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.433767] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.446930] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.446930] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=3)
-> [ 2.460033] (2:forwarder@Ginette) Forward a request
-> [ 2.473265] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.486555] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.499718] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.499718] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=4)
-> [ 2.512821] (2:forwarder@Ginette) Forward a request
-> [ 2.526053] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.539343] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.552507] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.552507] (3:client@Fafard) Ask Ginette:4000 to die
-> [ 2.565609] (2:forwarder@Ginette) Asked to die by Fafard:5000
-> [ 2.565609] (2:forwarder@Ginette) Done.
-> [ 2.565609] (2:forwarder@Ginette) Exiting GRAS
-> [ 2.565609] (3:client@Fafard) Ask Tremblay:4000 to die
-> [ 2.586160] (1:server@Tremblay) Asked to die by Fafard:5000
-> [ 2.586160] (1:server@Tremblay) Done.
-> [ 2.586160] (1:server@Tremblay) Exiting GRAS
-> [ 2.586160] (3:client@Fafard) Done.
-> [ 2.586160] (3:client@Fafard) Exiting GRAS
+$ $SG_TEST_EXENV ./rpc_simulator$EXEEXT ${srcdir:=.}/../../msg/small_platform.xml ${srcdir:=.}/rpc.xml "--log=root.fmt:[0]%e(%i:%P@%h)%e%m%n"
+> [0] (1:server@Tremblay) Launch server (port=4000)
+> [0] (1:server@Tremblay) Listening on port 4000
+> [0] (1:server@Tremblay) Got message PING(1234) from Fafard:5000
+> [0] (1:server@Tremblay) Answered with PONG(4321)
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Asked to die by Fafard:5000
+> [0] (1:server@Tremblay) Done.
+> [0] (1:server@Tremblay) Exiting GRAS
+> [0] (2:forwarder@Ginette) Launch forwarder (port=4000)
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Asked to die by Fafard:5000
+> [0] (2:forwarder@Ginette) Done.
+> [0] (2:forwarder@Ginette) Exiting GRAS
+> [0] (3:client@Fafard) Launch client (server on Tremblay:4000)
+> [0] (3:client@Fafard) Connected to Tremblay:4000.
+> [0] (3:client@Fafard) Connected to server which is on Tremblay:4000
+> [0] (3:client@Fafard) The answer to PING(1234) on Tremblay:4000 is PONG(4321)
+> [0] (3:client@Fafard) Call the exception raising RPC
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Called the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC (i=0)
+> [0] (3:client@Fafard) Call the exception raising RPC (i=1)
+> [0] (3:client@Fafard) Call the exception raising RPC (i=2)
+> [0] (3:client@Fafard) Call the exception raising RPC (i=3)
+> [0] (3:client@Fafard) Call the exception raising RPC (i=4)
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=0)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=1)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=2)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=3)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=4)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Ask Ginette:4000 to die
+> [0] (3:client@Fafard) Ask Tremblay:4000 to die
+> [0] (3:client@Fafard) Done.
+> [0] (3:client@Fafard) Exiting GRAS
#! ./tesh
+# There is no timestamp in this test, because we exchange exceptions,
+# which contain not only the filename (which could change in case of
+# VPATH builds), but also the function name (which changes with the
+# optimization level: if inlining, gcc changes it).
+
+! timeout 10
! output sort
-$ $SG_TEST_EXENV ./rpc_simulator$EXEEXT ${srcdir:=.}/../../msg/small_platform.xml ${srcdir:=.}/rpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (1:server@Tremblay) Launch server (port=4000)
-> [ 0.000000] (2:forwarder@Ginette) Launch forwarder (port=4000)
-> [ 0.000000] (3:client@Fafard) Launch client (server on Tremblay:4000)
-> [ 0.000156] (1:server@Tremblay) Listening on port 4000
-> [ 2.000312] (3:client@Fafard) Connected to Tremblay:4000.
-> [ 2.000312] (3:client@Fafard) Connected to server which is on Tremblay:4000
-> [ 2.020863] (1:server@Tremblay) Got message PING(1234) from Fafard:5000
-> [ 2.041415] (1:server@Tremblay) Answered with PONG(4321)
-> [ 2.041415] (3:client@Fafard) The answer to PING(1234) on Tremblay:4000 is PONG(4321)
-> [ 2.041415] (3:client@Fafard) Call the exception raising RPC
-> [ 2.061966] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.082632] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.082632] (3:client@Fafard) Called the exception raising RPC
-> [ 2.082632] (3:client@Fafard) Call the exception raising RPC (i=0)
-> [ 2.103182] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.123849] (3:client@Fafard) Call the exception raising RPC (i=1)
-> [ 2.144399] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.165066] (3:client@Fafard) Call the exception raising RPC (i=2)
-> [ 2.185616] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.206283] (3:client@Fafard) Call the exception raising RPC (i=3)
-> [ 2.226833] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.247499] (3:client@Fafard) Call the exception raising RPC (i=4)
-> [ 2.268050] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
-> [ 2.288716] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=0)
-> [ 2.301819] (2:forwarder@Ginette) Forward a request
-> [ 2.315051] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.328357] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.341538] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.341538] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=1)
-> [ 2.354640] (2:forwarder@Ginette) Forward a request
-> [ 2.367872] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.381178] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.394359] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.394359] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=2)
-> [ 2.407462] (2:forwarder@Ginette) Forward a request
-> [ 2.420693] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.433999] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.447180] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.447180] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=3)
-> [ 2.460283] (2:forwarder@Ginette) Forward a request
-> [ 2.473515] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.486821] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.500001] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.500001] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=4)
-> [ 2.513104] (2:forwarder@Ginette) Forward a request
-> [ 2.526336] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
-> [ 2.539642] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
-> [ 2.552823] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
-> [ 2.552823] (3:client@Fafard) Ask Ginette:4000 to die
-> [ 2.565925] (2:forwarder@Ginette) Asked to die by Fafard:5000
-> [ 2.565925] (2:forwarder@Ginette) Done.
-> [ 2.565925] (2:forwarder@Ginette) Exiting GRAS
-> [ 2.565925] (3:client@Fafard) Ask Tremblay:4000 to die
-> [ 2.586476] (1:server@Tremblay) Asked to die by Fafard:5000
-> [ 2.586476] (1:server@Tremblay) Done.
-> [ 2.586476] (1:server@Tremblay) Exiting GRAS
-> [ 2.586476] (3:client@Fafard) Done.
-> [ 2.586476] (3:client@Fafard) Exiting GRAS
+$ $SG_TEST_EXENV ./rpc_simulator$EXEEXT ${srcdir:=.}/../../msg/small_platform.xml ${srcdir:=.}/rpc.xml "--log=root.fmt:[0]%e(%i:%P@%h)%e%m%n"
+> [0] (1:server@Tremblay) Launch server (port=4000)
+> [0] (1:server@Tremblay) Listening on port 4000
+> [0] (1:server@Tremblay) Got message PING(1234) from Fafard:5000
+> [0] (1:server@Tremblay) Answered with PONG(4321)
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Fafard:5000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Propagate local exception ('Error for the client') from 'raise exception' RPC cb back to Ginette:4000
+> [0] (1:server@Tremblay) Asked to die by Fafard:5000
+> [0] (1:server@Tremblay) Done.
+> [0] (1:server@Tremblay) Exiting GRAS
+> [0] (2:forwarder@Ginette) Launch forwarder (port=4000)
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Forward a request
+> [0] (2:forwarder@Ginette) Propagate remote exception ('Error for the client') from 'forward exception' RPC cb back to Fafard:5000
+> [0] (2:forwarder@Ginette) Asked to die by Fafard:5000
+> [0] (2:forwarder@Ginette) Done.
+> [0] (2:forwarder@Ginette) Exiting GRAS
+> [0] (3:client@Fafard) Launch client (server on Tremblay:4000)
+> [0] (3:client@Fafard) Connected to Tremblay:4000.
+> [0] (3:client@Fafard) Connected to server which is on Tremblay:4000
+> [0] (3:client@Fafard) The answer to PING(1234) on Tremblay:4000 is PONG(4321)
+> [0] (3:client@Fafard) Call the exception raising RPC
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Called the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC (i=0)
+> [0] (3:client@Fafard) Call the exception raising RPC (i=1)
+> [0] (3:client@Fafard) Call the exception raising RPC (i=2)
+> [0] (3:client@Fafard) Call the exception raising RPC (i=3)
+> [0] (3:client@Fafard) Call the exception raising RPC (i=4)
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=0)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=1)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=2)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=3)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Call the exception raising RPC on the forwarder (i=4)
+> [0] (3:client@Fafard) Got the expected exception when calling the exception raising RPC
+> [0] (3:client@Fafard) Ask Ginette:4000 to die
+> [0] (3:client@Fafard) Ask Tremblay:4000 to die
+> [0] (3:client@Fafard) Done.
+> [0] (3:client@Fafard) Exiting GRAS
> [ 0.110000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #2)
> [ 0.120000] (1:thread 1@Tremblay) Thread 1 is full
> [ 0.120000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.120000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.120000] (1:thread 3@Tremblay) Thread 3 eats
> [ 0.120000] (1:thread 4@Tremblay) Thread 4 is full
> [ 0.120000] (1:thread 4@Tremblay) Thread 4 thinks
> [ 0.130000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #5)
-> [ 0.140000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.140000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.140000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.140000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.150000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.150000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.160000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #6)
-> [ 0.160000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.160000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #3)
+> [ 0.130000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.140000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.140000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.150000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #6)
+> [ 0.150000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.150000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.150000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.160000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.160000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.160000] (1:thread 2@Tremblay) Thread 2 eats
> [ 0.160000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #2)
-> [ 0.170000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.170000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.170000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.170000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.170000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.170000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.180000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #7)
-> [ 0.190000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.190000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.190000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.200000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.200000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.200000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #2)
-> [ 0.210000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #8)
-> [ 0.210000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.210000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #4)
-> [ 0.210000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.210000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.210000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.220000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.220000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.230000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #9)
-> [ 0.230000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.240000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.240000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.240000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.240000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.240000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.250000] (1:thread 1@Tremblay) Thread 1 tries to enter the dead-end; hopefully, the master will cancel it
-> [ 0.250000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #3)
+> [ 0.160000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.170000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #7)
+> [ 0.180000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.180000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.180000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.180000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #2)
+> [ 0.190000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.190000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.200000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #8)
+> [ 0.200000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #3)
+> [ 0.200000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.200000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.200000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.220000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.220000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.220000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.220000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.230000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.230000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.240000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #9)
+> [ 0.240000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.240000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #4)
+> [ 0.240000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #3)
+> [ 0.250000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.250000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.250000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.250000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.250000] (1:thread 3@Tremblay) Thread 3 thinks
> [ 0.250000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.260000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.260000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.270000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #3)
-> [ 0.280000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #5)
-> [ 0.280000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.260000] (1:thread 1@Tremblay) Thread 1 tries to enter the dead-end; hopefully, the master will cancel it
+> [ 0.270000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.270000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.280000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #3)
+> [ 0.290000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #5)
+> [ 0.290000] (1:thread 2@Tremblay) Thread 2 eats
> [ 0.290000] (1:thread 4@Tremblay) Thread 4 is full
> [ 0.290000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.300000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.300000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.300000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.320000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #6)
-> [ 0.330000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.330000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.330000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.310000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.310000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.310000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.330000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #6)
> [ 0.330000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #4)
-> [ 0.330000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.350000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.350000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.360000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #4)
-> [ 0.370000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #7)
-> [ 0.370000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.370000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.370000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.390000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.390000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.390000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.410000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #8)
-> [ 0.410000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #5)
-> [ 0.420000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.420000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.420000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.420000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.440000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.440000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.450000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #5)
-> [ 0.460000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #9)
-> [ 0.460000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.460000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.460000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.480000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.480000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.480000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.500000] (1:thread 2@Tremblay) Thread 2 tries to enter the dead-end; hopefully, the master will cancel it
-> [ 0.500000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #6)
-> [ 0.510000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.510000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.510000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.540000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #6)
-> [ 0.550000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.550000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.550000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.580000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.580000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.590000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #7)
-> [ 0.590000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.610000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #7)
-> [ 0.630000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.630000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.630000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.660000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.660000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.670000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #8)
-> [ 0.670000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.690000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #8)
-> [ 0.710000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.710000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.710000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.740000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.740000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.750000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #9)
-> [ 0.750000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.770000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #9)
-> [ 0.790000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.790000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.790000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.820000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.820000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.830000] (1:thread 4@Tremblay) Thread 4 tries to enter the dead-end; hopefully, the master will cancel it
-> [ 0.850000] (1:philosopher@Tremblay) Cancel all childs
-> [ 0.850000] (1:philosopher@Tremblay) Exiting GRAS
-> [ 0.850000] (1:thread 3@Tremblay) Thread 3 tries to enter the dead-end; hopefully, the master will cancel it
+> [ 0.340000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.340000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.340000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.340000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.360000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.360000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.370000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #4)
+> [ 0.380000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #7)
+> [ 0.380000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.380000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.380000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.400000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.400000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.400000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.420000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #8)
+> [ 0.420000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #5)
+> [ 0.430000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.430000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.430000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.430000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.450000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.450000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.460000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #5)
+> [ 0.470000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #9)
+> [ 0.470000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.470000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.470000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.490000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.490000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.490000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.510000] (1:thread 2@Tremblay) Thread 2 tries to enter the dead-end; hopefully, the master will cancel it
+> [ 0.510000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #6)
+> [ 0.520000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.520000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.520000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.550000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #6)
+> [ 0.560000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.560000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.560000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.590000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.590000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.600000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #7)
+> [ 0.600000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.620000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #7)
+> [ 0.640000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.640000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.640000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.670000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.670000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.680000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #8)
+> [ 0.680000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.700000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #8)
+> [ 0.720000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.720000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.720000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.750000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.750000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.760000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #9)
+> [ 0.760000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.780000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #9)
+> [ 0.800000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.800000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.800000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.830000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.830000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.840000] (1:thread 4@Tremblay) Thread 4 tries to enter the dead-end; hopefully, the master will cancel it
+> [ 0.860000] (1:philosopher@Tremblay) Cancel all childs
+> [ 0.860000] (1:philosopher@Tremblay) Exiting GRAS
+> [ 0.860000] (1:thread 3@Tremblay) Thread 3 tries to enter the dead-end; hopefully, the master will cancel it
> [ 0.110000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #2)
> [ 0.120000] (1:thread 1@Tremblay) Thread 1 is full
> [ 0.120000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.120000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.120000] (1:thread 3@Tremblay) Thread 3 eats
> [ 0.120000] (1:thread 4@Tremblay) Thread 4 is full
> [ 0.120000] (1:thread 4@Tremblay) Thread 4 thinks
> [ 0.130000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #5)
-> [ 0.140000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.140000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.140000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.140000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.150000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.150000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.160000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #6)
-> [ 0.160000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.160000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #3)
+> [ 0.130000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.140000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.140000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.150000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #6)
+> [ 0.150000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.150000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.150000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.160000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.160000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.160000] (1:thread 2@Tremblay) Thread 2 eats
> [ 0.160000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #2)
-> [ 0.170000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.170000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.170000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.170000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.170000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.170000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.180000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #7)
-> [ 0.190000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.190000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.190000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.200000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.200000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.200000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #2)
-> [ 0.210000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #8)
-> [ 0.210000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.210000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #4)
-> [ 0.210000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.210000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.210000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.220000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.220000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.230000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #9)
-> [ 0.230000] (1:thread 1@Tremblay) Thread 1 eats
-> [ 0.240000] (1:thread 1@Tremblay) Thread 1 is full
-> [ 0.240000] (1:thread 1@Tremblay) Thread 1 thinks
-> [ 0.240000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.240000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.240000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.250000] (1:thread 1@Tremblay) Thread 1 tries to enter the dead-end; hopefully, the master will cancel it
-> [ 0.250000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #3)
+> [ 0.160000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.170000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #7)
+> [ 0.180000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.180000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.180000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.180000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #2)
+> [ 0.190000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.190000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.200000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #8)
+> [ 0.200000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #3)
+> [ 0.200000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.200000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.200000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.220000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.220000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.220000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.220000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.230000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.230000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.240000] (1:thread 1@Tremblay) Thread 1 gets hungry (lunch #9)
+> [ 0.240000] (1:thread 1@Tremblay) Thread 1 eats
+> [ 0.240000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #4)
+> [ 0.240000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #3)
+> [ 0.250000] (1:thread 1@Tremblay) Thread 1 is full
+> [ 0.250000] (1:thread 1@Tremblay) Thread 1 thinks
+> [ 0.250000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.250000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.250000] (1:thread 3@Tremblay) Thread 3 thinks
> [ 0.250000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.260000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.260000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.270000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #3)
-> [ 0.280000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #5)
-> [ 0.280000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.260000] (1:thread 1@Tremblay) Thread 1 tries to enter the dead-end; hopefully, the master will cancel it
+> [ 0.270000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.270000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.280000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #3)
+> [ 0.290000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #5)
+> [ 0.290000] (1:thread 2@Tremblay) Thread 2 eats
> [ 0.290000] (1:thread 4@Tremblay) Thread 4 is full
> [ 0.290000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.300000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.300000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.300000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.320000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #6)
-> [ 0.330000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.330000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.330000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.310000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.310000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.310000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.330000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #6)
> [ 0.330000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #4)
-> [ 0.330000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.350000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.350000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.360000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #4)
-> [ 0.370000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #7)
-> [ 0.370000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.370000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.370000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.390000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.390000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.390000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.410000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #8)
-> [ 0.410000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #5)
-> [ 0.420000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.420000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.420000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.420000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.440000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.440000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.450000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #5)
-> [ 0.460000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #9)
-> [ 0.460000] (1:thread 2@Tremblay) Thread 2 eats
-> [ 0.460000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.460000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.480000] (1:thread 2@Tremblay) Thread 2 is full
-> [ 0.480000] (1:thread 2@Tremblay) Thread 2 thinks
-> [ 0.480000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.500000] (1:thread 2@Tremblay) Thread 2 tries to enter the dead-end; hopefully, the master will cancel it
-> [ 0.500000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #6)
-> [ 0.510000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.510000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.510000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.540000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #6)
-> [ 0.550000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.550000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.550000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.580000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.580000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.590000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #7)
-> [ 0.590000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.610000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #7)
-> [ 0.630000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.630000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.630000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.660000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.660000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.670000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #8)
-> [ 0.670000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.690000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #8)
-> [ 0.710000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.710000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.710000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.740000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.740000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.750000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #9)
-> [ 0.750000] (1:thread 4@Tremblay) Thread 4 eats
-> [ 0.770000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #9)
-> [ 0.790000] (1:thread 3@Tremblay) Thread 3 eats
-> [ 0.790000] (1:thread 4@Tremblay) Thread 4 is full
-> [ 0.790000] (1:thread 4@Tremblay) Thread 4 thinks
-> [ 0.820000] (1:thread 3@Tremblay) Thread 3 is full
-> [ 0.820000] (1:thread 3@Tremblay) Thread 3 thinks
-> [ 0.830000] (1:thread 4@Tremblay) Thread 4 tries to enter the dead-end; hopefully, the master will cancel it
-> [ 0.850000] (1:philosopher@Tremblay) Cancel all childs
-> [ 0.850000] (1:philosopher@Tremblay) Exiting GRAS
-> [ 0.850000] (1:thread 3@Tremblay) Thread 3 tries to enter the dead-end; hopefully, the master will cancel it
+> [ 0.340000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.340000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.340000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.340000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.360000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.360000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.370000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #4)
+> [ 0.380000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #7)
+> [ 0.380000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.380000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.380000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.400000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.400000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.400000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.420000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #8)
+> [ 0.420000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #5)
+> [ 0.430000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.430000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.430000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.430000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.450000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.450000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.460000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #5)
+> [ 0.470000] (1:thread 2@Tremblay) Thread 2 gets hungry (lunch #9)
+> [ 0.470000] (1:thread 2@Tremblay) Thread 2 eats
+> [ 0.470000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.470000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.490000] (1:thread 2@Tremblay) Thread 2 is full
+> [ 0.490000] (1:thread 2@Tremblay) Thread 2 thinks
+> [ 0.490000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.510000] (1:thread 2@Tremblay) Thread 2 tries to enter the dead-end; hopefully, the master will cancel it
+> [ 0.510000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #6)
+> [ 0.520000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.520000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.520000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.550000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #6)
+> [ 0.560000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.560000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.560000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.590000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.590000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.600000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #7)
+> [ 0.600000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.620000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #7)
+> [ 0.640000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.640000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.640000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.670000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.670000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.680000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #8)
+> [ 0.680000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.700000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #8)
+> [ 0.720000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.720000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.720000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.750000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.750000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.760000] (1:thread 4@Tremblay) Thread 4 gets hungry (lunch #9)
+> [ 0.760000] (1:thread 4@Tremblay) Thread 4 eats
+> [ 0.780000] (1:thread 3@Tremblay) Thread 3 gets hungry (lunch #9)
+> [ 0.800000] (1:thread 3@Tremblay) Thread 3 eats
+> [ 0.800000] (1:thread 4@Tremblay) Thread 4 is full
+> [ 0.800000] (1:thread 4@Tremblay) Thread 4 thinks
+> [ 0.830000] (1:thread 3@Tremblay) Thread 3 is full
+> [ 0.830000] (1:thread 3@Tremblay) Thread 3 thinks
+> [ 0.840000] (1:thread 4@Tremblay) Thread 4 tries to enter the dead-end; hopefully, the master will cancel it
+> [ 0.860000] (1:philosopher@Tremblay) Cancel all childs
+> [ 0.860000] (1:philosopher@Tremblay) Exiting GRAS
+> [ 0.860000] (1:thread 3@Tremblay) Thread 3 tries to enter the dead-end; hopefully, the master will cancel it
gras_msg_handle(5.0);
}
gras_exit();
+ xbt_free(globals);
return 0;
} /* end_of_client */
--- /dev/null
+--------------------------------------------
+A few notes abouts what I would like to do
+to make Splay applications work with SimGrid
+--------------------------------------------
+
+Create an executable "simsplay" that runs a Splay Lua script
+with SimGrid.
+
+Ideally, its usage would be:
+
+simsplay platform_file.{xml|lua} deployment_file.{xml|lua} splay_script.lua [simgrid_options...]
+
+I'm not sure about the format of the platform and deployment files yet.
+We could accept both XML and Lua files, since their is a great Lua API to
+describe platforms, or only the XML ones.
+
+The simsplay executable (which is compiled C) would initialize SimGrid, create
+the environment, and for each simulated process, create a new lua_State*
+object that runs the Lua script provided by the user (splay_script.lua in the
+example above).
+
+The current Lua API of SimGrid (3.6) uses Lua coroutines (i.e. sequential,
+lightweight threads) to simulate processes in a single, shared Lua state.
+However, in Splay, the Lua global values must not be shared between simulated
+processes: this is why we need distinct Lua states.
+
require "simgrid"
+
-- Splay global modules
rpc = {}
log = {}
os = {}
start = {}
misc = {}
+
-- Splay global variables
-job.me ={}
+job.me = {}
job.nodes = {}
job.list_type = "random"
---Init nodes tables
+
+-- Init nodes tables
function init_nodes()
- for i= 1,simgrid.Host.number() do
- job.nodes[i] = simgrid.Host.getPropValue(simgrid.Host.at(i),"ip")..":"..simgrid.Host.getPropValue(simgrid.Host.at(i),"port");
- end
+ for i = 1, simgrid.Host.number() do
+ job.nodes[i] = { ip = simgrid.Host.getPropValue(simgrid.Host.at(i), "ip"),
+ port = simgrid.Host.getPropValue(simgrid.Host.at(i), "port") }
+ end
end
function init_jobs()
- init_nodes()
+ init_nodes()
end
-
-- Job methods
function job.me.ip()
- return simgrid.Host.getPropValue(simgrid.Host.self(),"ip");
+ return simgrid.Host.getPropValue(simgrid.Host.self(), "ip")
end
-
function job.me.port()
- return simgrid.Host.getPropValue(simgrid.Host.self(),"port");
+ return simgrid.Host.getPropValue(simgrid.Host.self(), "port")
end
function job.position()
- return simgrid.Host.getPropValue(simgrid.Host.self(),"position");
+ return simgrid.Host.getPropValue(simgrid.Host.self(), "position")
end
-- log Methods
end
-- rpc Methods
-function rpc.call(node,call)
- --init_nodes();
- func = "empty"
- arg = "empty"
- mailbox = node
-
- if type(node) == "table" then
- mailbox = node.ip..":"..node.port
- end
-
- if type(call) == "table" then
- func = call[1]
- arg = call[2]
- end
- task_call = simgrid.Task.new("splay_task",10000,10000);
- task_call['func_call_name'] = func;
- task_call['func_call_arg'] = arg;
- log:print("Sending Task to mailbox "..mailbox.." to call '"..func.."' with arg '"..arg.."'");
- simgrid.Task.iSend(task_call,mailbox);
-
-end
+function rpc.call(node, call)
+ --init_nodes();
+ func = "empty"
+ arg = "empty"
+ mailbox = node
+
+ if type(node) == "table" then
+ mailbox = node.ip..":"..node.port
+ end
+
+ if type(call) == "table" then
+ func = call[1]
+ arg = call[2]
+ end
+ task_call = simgrid.Task.new("splay_task", 10000, 10000)
+ task_call['func_call_name'] = func
+ task_call['func_call_arg'] = arg
+ log:print("Sending Task to mailbox "..mailbox.." to call '"..func.."' with arg '"..arg.."'")
+ simgrid.Task.send(task_call, mailbox)
-function rpc.server(port)
- -- nothing really to do : no need to open Socket since it's a Simulation
end
+function rpc.server(port)
+ -- nothing really to do : no need to open Socket since it's a Simulation
+end
-- event Methods
function events.sleep(time)
my_mailbox = job.me.ip()..":"..job.me.port()
- tk = simgrid.Task.splay_recv(my_mailbox, time)
-
- if type(tk) == "table" then
- call_function(task['func_call_name'],task['func_call_arg'])
- else log:print("task type is :"..type(tk).." it must be table?!");
+ task = simgrid.Task.recv_timeout(my_mailbox, time)
+
+ if task ~= nil then
+ -- an RPC call just woke me up
+ call_function(task['func_call_name'], task['func_call_arg'])
end
end
-
--- main func for each process, this is equivalent to the Deploiment file
+-- main function for each process, this is equivalent to the deployment file
function events.thread(main_func)
- dofile("platform_script.lua");
- init_jobs()
+ dofile("platform_script.lua")
+ init_jobs()
end
-- OS methods
function os.exit()
- simgrid.Host.destroy(simgrid.Host.self());
+ simgrid.Host.destroy(simgrid.Host.self())
end
-- Start Methods
function start.loop()
- simgrid.run()
- --simgrid.clean()
+ simgrid.run()
+ --simgrid.clean()
end
-- Misc Methods
-function misc.between(a,b)
- return a
+function misc.between(a, b)
+ return a
end
-- useful functions
-function call_function(fct,arg)
- _G[fct](arg)
+function call_function(fct, arg)
+ _G[fct](arg)
end
function SPLAYschool(arg)
- simgrid.info("Calling me..."..arg)
+ simgrid.info("Calling me..."..arg)
end
+
-dofile 'sim_splay.lua'
+require("sim_splay")
function SPLAYschool()
- log:print("My ip is :" ..job.me.ip())
- events.sleep(5)
- rpc.call(job.nodes[3],{"call_me","Arg_test"})
- events.sleep(5)
- os.exit()
+ log:print("My ip is: "..job.me.ip())
+ for i = 1000,10000 do
+ log:print(i)
+ end
+
+ events.sleep(5)
+
+ if job.me.ip() == job.nodes[1].ip then
+ rpc.call(job.nodes[2], {"call_me", job.me.ip()})
+ end
+ events.sleep(5)
+ os.exit()
end
-function call_me(position)
- log:print("I received an RPC from node "..position);
+function call_me(from)
+ log:print("I received an RPC from "..from)
end
events.thread("SPLAYschool")
start.loop()
-
-
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+ <process host="a" function="master">
+ <argument value="100"/>
+ <argument value="c"/>
+ <argument value="1"/>
+ </process>
+
+ <process host="c" function="slave">
+ <argument value="1"/>
+ </process>
+
+</platform>
--- /dev/null
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+ <!--
+
+ a ______1______ b _____2_____ c
+
+ -->
+
+ <AS id="AS0" routing="Full">
+
+ <host id="a" power="1000000000"/>
+ <host id="b" power="1000000000"/>
+ <host id="c" power="1000000000"/>
+
+ <link id="1" bandwidth="1000" latency="0.01"/>
+ <link id="2" bandwidth="1000" latency="0.01"/>
+
+ <route src="a" dst="b">
+ <link_ctn id="1"/>
+ </route>
+ <route src="b" dst="c">
+ <link_ctn id="2"/>
+ </route>
+
+ </AS>
+ </platform>
\ No newline at end of file
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+ <process host="S1" function="master">
+ <argument value="100"/>
+ <argument value="C1"/>
+ <argument value="1"/>
+ </process>
+
+ <process host="C1" function="slave">
+ <argument value="1"/>
+ </process>
+
+ <process host="S2" function="master">
+ <argument value="1000"/>
+ <argument value="C2"/>
+ <argument value="2"/>
+ </process>
+
+ <process host="C2" function="slave">
+ <argument value="2"/>
+ </process>
+
+
+ <process host="S3" function="master">
+ <argument value="2000"/>
+ <argument value="C3"/>
+ <argument value="3"/>
+ </process>
+
+ <process host="C3" function="slave">
+ <argument value="3"/>
+ </process>
+
+</platform>
--- /dev/null
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+ <!--
+
+ S1 ______1______ C1
+
+ S2 _______2_____ C2
+
+ S3 ________3____ C2
+
+ -->
+
+ <AS id="AS0" routing="Full">
+ <host id="S1" power="1000000000"/>
+ <host id="C1" power="1000000000"/>
+ <host id="S2" power="1000000000"/>
+ <host id="C2" power="1000000000"/>
+ <host id="S3" power="1000000000"/>
+ <host id="C3" power="1000000000"/>
+
+ <link id="1" bandwidth="1000" latency="0.01"/>
+ <link id="2" bandwidth="1000" latency="0.01"/>
+ <link id="3" bandwidth="1000" latency="0.01"/>
+
+ <route src="S1" dst="C1">
+ <link_ctn id="1"/>
+ </route>
+ <route src="S2" dst="C2">
+ <link_ctn id="2"/>
+ </route>
+ <route src="S3" dst="C3">
+ <link_ctn id="3"/>
+ </route>
+
+ </AS>
+ </platform>
\ No newline at end of file
--- /dev/null
+cmake_minimum_required(VERSION 2.6)
+
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_executable(ns3 "ns3.c")
+
+### Add definitions for compile
+target_link_libraries(ns3 simgrid m )
+
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+ <process host="c-2.me" function="master">
+ <argument value="100"/>
+ <argument value="c-6.me"/>
+ <argument value="1"/>
+ </process>
+
+ <process host="c-6.me" function="slave">
+ <argument value="1"/>
+ </process>
+
+</platform>
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<!-- _________
+ | |
+ | router |
+ ____________|__________|_____________ backbone
+ | | | | | |
+ l0| l1| l2| l97| l96 | | l99
+ | | | ........ | | |
+ | |
+ c-0.me c-99.me
+-->
+<platform version="3">
+<AS id="AS0" routing="Full">
+ <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+ radical="0-99" power="1000000000" bw="125000000" lat="5E-5"
+ bb_bw="2250000000" bb_lat="5E-4"/>
+</AS>
+</platform>
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+ <process host="c-30.me" function="master">
+ <argument value="100"/>
+ <argument value="c-160.me"/>
+ <argument value="1"/>
+ </process>
+
+ <process host="c-160.me" function="slave">
+ <argument value="1"/>
+ </process>
+
+</platform>
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+<!--
+ __________________________________________________
+ ____|_____ |
+ | | |
+ | router1 | |
+ ____________|__________|_____________ csma1 |
+ | | | | | | |backbone
+ l0| l1| l2| l97| l98| | l99 |
+ | | | ........ | | | |
+ | | |
+ c-0.me c-99.me |
+ ___________________________________________________|
+ ___|______
+ | |
+ | router2 |
+ ____________|__________|_____________ csma2
+ | | | | | |
+ l100|l101| | l197| l198| | l199
+ | | | ........ | | |
+ | |
+ c-100.me c-199.me
+-->
+<AS id="AS0" routing="Full">
+ <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+ radical="0-99" power="1000000000" bw="125000000" lat="5E-5"
+ bb_bw="2250000000" bb_lat="5E-4"/>
+
+ <cluster id="my_cluster_2" prefix="c-" suffix=".me"
+ radical="100-199" power="1000000000" bw="125000000" lat="5E-5"
+ bb_bw="2250000000" bb_lat="5E-4"/>
+
+ <link id="backbone" bandwidth="1250000000" latency="5E-4"/>
+
+ <ASroute src="my_cluster_1" dst="my_cluster_2"
+ gw_src="c-my_cluster_1_router.me"
+ gw_dst="c-my_cluster_2_router.me">
+ <link_ctn id="backbone"/>
+ </ASroute>
+ <ASroute src="my_cluster_2" dst="my_cluster_1"
+ gw_src="c-my_cluster_2_router.me"
+ gw_dst="c-my_cluster_1_router.me">
+ <link_ctn id="backbone"/>
+ </ASroute>
+</AS>
+</platform>
--- /dev/null
+/* Copyright (c) 2007, 2008, 2009, 2010. 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. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "msg/msg.h"
+#include "xbt/log.h"
+#include "xbt/asserts.h"
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
+ "Messages specific for this msg example");
+
+int master(int argc, char *argv[]);
+int slave(int argc, char *argv[]);
+int timer(int argc, char *argv[]);
+MSG_error_t test_all(const char *platform_file,
+ const char *application_file);
+
+int timer_start = 1;
+
+typedef enum {
+ PORT_22 = 0,
+ MAX_CHANNEL
+} channel_t;
+
+//keep a pointer to all surf running tasks.
+#define NTASKS 1500
+int bool_printed = 0;
+double start_time, end_time, elapsed_time;
+double gl_data_size[NTASKS];
+m_task_t gl_task_array[NTASKS];
+const char *slavenames[NTASKS];
+const char *masternames[NTASKS];
+int gl_task_array_id = 0;
+int count_finished = 0;
+
+#define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */
+
+/** master */
+int master(int argc, char *argv[])
+{
+ char *slavename = NULL;
+ double task_comm_size = 0;
+ m_task_t todo;
+ char id_alias[10];
+ //unique id to control statistics
+ int id = -1;
+
+ if (argc != 4) {
+ XBT_INFO("Strange number of arguments expected 3 got %d", argc - 1);
+ }
+
+ /* data size */
+ int read;
+ read = sscanf(argv[1], "%lg", &task_comm_size);
+ xbt_assert(read, "Invalid argument %s\n", argv[1]);
+
+ /* slave name */
+ slavename = argv[2];
+ id = atoi(argv[3]);
+ sprintf(id_alias, "flow_%d", id);
+ slavenames[id] = slavename;
+ TRACE_category(id_alias);
+
+ masternames[id] = MSG_host_get_name(MSG_host_self());
+
+ { /* Task creation. */
+ char sprintf_buffer[64] = "Task_0";
+ todo = MSG_task_create(sprintf_buffer, 100*task_comm_size, task_comm_size, NULL);
+ TRACE_msg_set_task_category(todo, id_alias);
+ //keep track of running tasks
+ gl_task_array[id] = todo;
+ gl_data_size[id] = task_comm_size;
+ }
+
+ { /* Process organisation */
+ MSG_get_host_by_name(slavename);
+ }
+
+ count_finished++;
+
+ /* time measurement */
+ sprintf(id_alias, "%d", id);
+ start_time = MSG_get_clock();
+ //MSG_task_execute(todo);
+ MSG_task_send(todo, id_alias);
+ end_time = MSG_get_clock();
+
+
+ return 0;
+} /* end_of_master */
+
+
+/** Timer function */
+int timer(int argc, char *argv[])
+{
+ int sleep_time;
+ int first_sleep;
+
+ if (argc != 3) {
+ XBT_INFO("Strange number of arguments expected 2 got %d", argc - 1);
+ }
+
+ sscanf(argv[1], "%d", &first_sleep);
+ sscanf(argv[2], "%d", &sleep_time);
+
+ if(first_sleep){
+ MSG_process_sleep(first_sleep);
+ }
+
+ while(timer_start){
+ MSG_process_sleep(sleep_time);
+ }
+
+ return 0;
+}
+
+/** Receiver function */
+int slave(int argc, char *argv[])
+{
+
+ m_task_t task = NULL;
+ int a = MSG_OK;
+ int id = 0;
+ char id_alias[10];
+
+ if (argc != 2) {
+ XBT_INFO("Strange number of arguments expected 1 got %d", argc - 1);
+ }
+
+ id = atoi(argv[1]);
+ sprintf(id_alias, "%d", id);
+
+ a = MSG_task_receive(&(task), id_alias);
+
+ count_finished--;
+ if(count_finished == 0){
+ timer_start = 0;
+ }
+
+
+
+ if (a != MSG_OK) {
+ XBT_INFO("Hey?! What's up?");
+ xbt_die("Unexpected behavior.");
+ }
+
+ elapsed_time = MSG_get_clock() - start_time;
+
+ XBT_INFO("FLOW[%d] : Receive %.0f bytes from %s to %s",
+ id,
+ MSG_task_get_data_size(task),
+ masternames[id],
+ slavenames[id]);
+
+ MSG_task_destroy(task);
+
+ return 0;
+} /* end_of_slave */
+
+/** Test function */
+MSG_error_t test_all(const char *platform_file,
+ const char *application_file)
+{
+ MSG_error_t res = MSG_OK;
+
+ /* MSG_config("workstation/model", "GTNETS"); */
+ /* MSG_config("workstation/model","KCCFLN05"); */
+ { /* Simulation setting */
+ MSG_set_channel_number(MAX_CHANNEL);
+ MSG_create_environment(platform_file);
+ }
+
+ TRACE_declare_mark("endmark");
+
+ { /* Application deployment */
+ MSG_function_register("master", master);
+ MSG_function_register("slave", slave);
+ MSG_function_register("timer", timer);
+
+ MSG_launch_application(application_file);
+ }
+ res = MSG_main();
+ return res;
+} /* end_of_test_all */
+
+/** Main function */
+int main(int argc, char *argv[])
+{
+ MSG_error_t res = MSG_OK;
+ bool_printed = 0;
+
+ MSG_global_init(&argc, argv);
+ if (argc < 3) {
+ printf("Usage: %s platform_file deployment_file\n", argv[0]);
+ exit(1);
+ }
+
+ res = test_all(argv[1], argv[2]);
+
+ MSG_clean();
+
+ if (res == MSG_OK)
+ return 0;
+ else
+ return 1;
+} /* end_of_main */
--- /dev/null
+#0)WC_Gla
+#1)WC_Edi
+#2)WC_Manc
+#3)WC_Leeds
+#4)WC_Reading
+#5)WC_London
+#6)WC_Bristol
+#7)WC_Portsmouth
+#8)Gla_router
+#9)Edi_router
+#10)NorMAN
+#11)YHMAN
+#12)EastNet
+#13)LMN
+#14)SWAN_BWEMAN
+#15)TVN
+#16)MidMAN
+#17)NNW_router
+#18)Glasgow
+#19)Edi
+#20)Durham
+#21)Sheffield
+#22)Cam
+#23)UCL
+#24)IC
+#25)QMW
+#26)Brunel
+#27)RHNBC
+#28)Bristol
+#29)RAL
+#30)Oxford
+#31)B_ham
+#32)L_pool
+#33)Manc
+#34)Lanc
+#35)CERN
+0 0 0 10000 10000 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 10000 0 0 10000 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 10000 0 0 10000 10000 0 0 0 0 0 0 0 0 0 0 0 1000 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 10000 10000 0 0 10000 0 0 0 0 622 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 10000 0 0 10000 10000 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 0 10000 10000 0 0 10000 0 0 0 0 1000 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 10000 0 0 10000 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 0 10000 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500
+0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 0 622 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0 0 0 0
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<AS id="AS0" routing="Floyd">
+<!--0 WC_Gla-->
+<!--1 WC_Edi-->
+<!--2 WC_Manc-->
+<!--3 WC_Leeds-->
+<!--4 WC_Reading-->
+<!--5 WC_London-->
+<!--6 WC_Bristol-->
+<!--7 WC_Portsmouth-->
+<!--8 Gla_router-->
+<!--9 Edi_router-->
+<!--10 NorMAN-->
+<!--11 YHMAN-->
+<!--12 EastNet-->
+<!--13 LMN-->
+<!--14 SWAN_BWEMAN-->
+<!--15 TVN-->
+<!--16 MidMAN-->
+<!--17 NNW_router-->
+<!--18 Glasgow-->
+<!--19 Edi-->
+<!--20 Durham-->
+<!--21 Sheffield-->
+<!--22 Cam-->
+<!--23 UCL-->
+<!--24 IC-->
+<!--25 QMW-->
+<!--26 Brunel-->
+<!--27 RHNBC-->
+<!--28 Bristol-->
+<!--29 RAL-->
+<!--30 Oxford-->
+<!--31 B_ham-->
+<!--32 L_pool-->
+<!--33 Manc-->
+<!--34 Lanc-->
+<!--35 CERN-->
+ <host id="WC_Edi" power="1"/>
+ <host id="WC_Manc" power="1"/>
+ <host id="Gla_router" power="1"/>
+ <host id="Glasgow" power="20000000"/>
+ <host id="Edi" power="25600000"/>
+ <host id="Durham" power="4134000"/>
+ <host id="Sheffield" power="49640000"/>
+ <host id="Cam" power="1320000"/>
+ <host id="UCL" power="22500000"/>
+ <host id="IC" power="440000000"/>
+ <host id="QMW" power="44000000"/>
+ <host id="Brunel" power="85680000"/>
+ <host id="RHNBC" power="7200000"/>
+ <host id="Bristol" power="60000000"/>
+ <host id="RAL" power="556956000"/>
+ <host id="Oxford" power="156560000"/>
+ <host id="B_ham" power="13500000"/>
+ <host id="L_pool" power="308070000"/>
+ <host id="Manc" power="22500000"/>
+ <host id="Lanc" power="204800000"/>
+ <host id="CERN" power="1"/>
+
+ <router id="WC_Gla"/>
+ <router id="WC_Leeds"/>
+ <router id="WC_Reading"/>
+ <router id="WC_London"/>
+ <router id="WC_Bristol"/>
+ <router id="WC_Portsmouth"/>
+ <router id="Edi_router"/>
+ <router id="NorMAN"/>
+ <router id="YHMAN"/>
+ <router id="EastNet"/>
+ <router id="LMN"/>
+ <router id="SWAN_BWEMAN"/>
+ <router id="TVN"/>
+ <router id="MidMAN"/>
+ <router id="NNW_router"/>
+
+ <link id="link0" bandwidth="10000"/>
+ <link id="link1" bandwidth="10000"/>
+ <link id="link2" bandwidth="1000"/>
+ <link id="link3" bandwidth="10000"/>
+ <link id="link4" bandwidth="1000"/>
+ <link id="link5" bandwidth="10000"/>
+ <link id="link6" bandwidth="10000"/>
+ <link id="link7" bandwidth="1000"/>
+ <link id="link8" bandwidth="1000"/>
+ <link id="link9" bandwidth="10000"/>
+ <link id="link10" bandwidth="622"/>
+ <link id="link11" bandwidth="1000"/>
+ <link id="link12" bandwidth="10000"/>
+ <link id="link13" bandwidth="10000"/>
+ <link id="link14" bandwidth="622"/>
+ <link id="link15" bandwidth="10000"/>
+ <link id="link16" bandwidth="1000"/>
+ <link id="link17" bandwidth="1000"/>
+ <link id="link18" bandwidth="10000"/>
+ <link id="link19" bandwidth="622"/>
+ <link id="link20" bandwidth="2500"/>
+ <link id="link21" bandwidth="1000"/>
+ <link id="link22" bandwidth="1000"/>
+ <link id="link23" bandwidth="155"/>
+ <link id="link24" bandwidth="155"/>
+ <link id="link25" bandwidth="155"/>
+ <link id="link26" bandwidth="155"/>
+ <link id="link27" bandwidth="155"/>
+ <link id="link28" bandwidth="155"/>
+ <link id="link29" bandwidth="155"/>
+ <link id="link30" bandwidth="155"/>
+ <link id="link31" bandwidth="622"/>
+ <link id="link32" bandwidth="622"/>
+ <link id="link33" bandwidth="622"/>
+ <link id="link34" bandwidth="622"/>
+ <link id="link35" bandwidth="155"/>
+ <link id="link36" bandwidth="1000"/>
+ <link id="link37" bandwidth="155"/>
+
+ <route src="WC_Gla" dst="WC_Gla">
+ <link_ctn id="link0"/>
+ </route>
+ <route src="WC_Gla" dst="WC_Edi">
+ <link_ctn id="link1"/>
+ </route>
+ <route src="WC_Gla" dst="WC_Portsmouth">
+ <link_ctn id="link2"/>
+ </route>
+ <route src="WC_Edi" dst="WC_Manc">
+ <link_ctn id="link3"/>
+ </route>
+ <route src="WC_Edi" dst="Gla_router">
+ <link_ctn id="link4"/>
+ </route>
+ <route src="WC_Manc" dst="WC_Manc">
+ <link_ctn id="link5"/>
+ </route>
+ <route src="WC_Manc" dst="WC_Leeds">
+ <link_ctn id="link6"/>
+ </route>
+ <route src="WC_Manc" dst="TVN">
+ <link_ctn id="link7"/>
+ </route>
+ <route src="WC_Manc" dst="MidMAN">
+ <link_ctn id="link8"/>
+ </route>
+ <route src="WC_Leeds" dst="WC_Reading">
+ <link_ctn id="link9"/>
+ </route>
+ <route src="WC_Leeds" dst="Edi_router">
+ <link_ctn id="link10"/>
+ </route>
+ <route src="WC_Leeds" dst="NorMAN">
+ <link_ctn id="link11"/>
+ </route>
+ <route src="WC_Reading" dst="WC_Reading">
+ <link_ctn id="link12"/>
+ </route>
+ <route src="WC_Reading" dst="WC_London">
+ <link_ctn id="link13"/>
+ </route>
+ <route src="WC_Reading" dst="SWAN_BWEMAN">
+ <link_ctn id="link14"/>
+ </route>
+ <route src="WC_London" dst="WC_Bristol">
+ <link_ctn id="link15"/>
+ </route>
+ <route src="WC_London" dst="YHMAN">
+ <link_ctn id="link16"/>
+ </route>
+ <route src="WC_London" dst="EastNet">
+ <link_ctn id="link17"/>
+ </route>
+ <route src="WC_Bristol" dst="WC_Bristol">
+ <link_ctn id="link18"/>
+ </route>
+ <route src="WC_Bristol" dst="LMN">
+ <link_ctn id="link19"/>
+ </route>
+ <route src="WC_Portsmouth" dst="Lanc">
+ <link_ctn id="link20"/>
+ </route>
+ <route src="Gla_router" dst="NNW_router">
+ <link_ctn id="link21"/>
+ </route>
+ <route src="Edi_router" dst="Glasgow">
+ <link_ctn id="link22"/>
+ </route>
+ <route src="NorMAN" dst="Edi">
+ <link_ctn id="link23"/>
+ </route>
+ <route src="YHMAN" dst="Durham">
+ <link_ctn id="link24"/>
+ </route>
+ <route src="EastNet" dst="Sheffield">
+ <link_ctn id="link25"/>
+ </route>
+ <route src="LMN" dst="Cam">
+ <link_ctn id="link26"/>
+ </route>
+ <route src="LMN" dst="UCL">
+ <link_ctn id="link27"/>
+ </route>
+ <route src="LMN" dst="IC">
+ <link_ctn id="link28"/>
+ </route>
+ <route src="LMN" dst="QMW">
+ <link_ctn id="link29"/>
+ </route>
+ <route src="LMN" dst="Brunel">
+ <link_ctn id="link30"/>
+ </route>
+ <route src="SWAN_BWEMAN" dst="RHNBC">
+ <link_ctn id="link31"/>
+ </route>
+ <route src="TVN" dst="Bristol">
+ <link_ctn id="link32"/>
+ </route>
+ <route src="TVN" dst="RAL">
+ <link_ctn id="link33"/>
+ </route>
+ <route src="MidMAN" dst="Oxford">
+ <link_ctn id="link34"/>
+ </route>
+ <route src="NNW_router" dst="B_ham">
+ <link_ctn id="link35"/>
+ </route>
+ <route src="NNW_router" dst="L_pool">
+ <link_ctn id="link36"/>
+ </route>
+ <route src="NNW_router" dst="Manc">
+ <link_ctn id="link37"/>
+ </route>
+</AS>
+</platform>
--- /dev/null
+1400 1 1050000000 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+70 1 26000000 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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0 0 0 0 0 0 0 155 0 0 0 0
+446 1 63000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<AS id="AS0" routing="Floyd">
+ <host id="0" power="1470000000000"/>
+ <host id="1" power="1820000000"/>
+ <host id="2" power="1"/>
+ <host id="4" power="593460000000"/>
+ <host id="5" power="560000000"/>
+ <host id="6" power="560000000"/>
+ <host id="7" power="560000000"/>
+ <host id="8" power="96000000"/>
+ <host id="9" power="7680000000"/>
+ <host id="10" power="910000000"/>
+ <host id="12" power="250000000"/>
+ <host id="13" power="448000000"/>
+ <host id="15" power="12500000"/>
+ <host id="16" power="12500000"/>
+ <host id="18" power="78000000"/>
+ <host id="20" power="560000000"/>
+ <host id="23" power="60000000"/>
+ <host id="24" power="154524000000"/>
+ <host id="25" power="60000000"/>
+ <host id="26" power="60000000"/>
+ <host id="27" power="60000000"/>
+ <host id="28" power="60000000"/>
+ <host id="29" power="60000000"/>
+ <host id="30" power="60000000"/>
+ <host id="31" power="1"/>
+ <host id="32" power="2100000000"/>
+ <host id="33" power="21000000000"/>
+ <host id="35" power="442000000"/>
+ <host id="36" power="6500000000"/>
+ <host id="38" power="300000000"/>
+ <host id="39" power="1200000000"/>
+ <host id="42" power="540000000"/>
+ <host id="43" power="390000000"/>
+ <host id="44" power="208000000"/>
+ <host id="45" power="600000000"/>
+ <host id="49" power="44352000000"/>
+ <host id="50" power="4564000000"/>
+ <host id="52" power="78522000000"/>
+ <host id="54" power="9200000000"/>
+ <host id="56" power="142476000000"/>
+ <host id="57" power="448000000"/>
+ <host id="59" power="3780000000"/>
+ <host id="60" power="250000000"/>
+ <host id="61" power="650000000"/>
+ <host id="64" power="9200000000"/>
+ <host id="65" power="250000000"/>
+ <host id="66" power="250000000"/>
+ <host id="67" power="592000000"/>
+ <host id="68" power="250000000"/>
+ <host id="69" power="250000000"/>
+ <host id="70" power="250000000"/>
+ <host id="71" power="4000000"/>
+ <host id="72" power="250000000"/>
+ <host id="73" power="250000000"/>
+ <host id="74" power="1"/>
+ <host id="75" power="53600000000"/>
+ <host id="77" power="14248000000"/>
+ <host id="79" power="24000000"/>
+ <host id="82" power="240000000"/>
+ <host id="83" power="2560000000"/>
+ <host id="86" power="2280000000"/>
+ <host id="89" power="20000000"/>
+ <host id="93" power="250000000"/>
+ <host id="95" power="8636000000"/>
+ <host id="97" power="250000000"/>
+ <host id="98" power="250000000"/>
+ <host id="99" power="28098000000"/>
+ <host id="100" power="250000000"/>
+
+ <router id="3"/>
+ <router id="11"/>
+ <router id="14"/>
+ <router id="17"/>
+ <router id="19"/>
+ <router id="21"/>
+ <router id="22"/>
+ <router id="34"/>
+ <router id="37"/>
+ <router id="40"/>
+ <router id="41"/>
+ <router id="46"/>
+ <router id="47"/>
+ <router id="48"/>
+ <router id="51"/>
+ <router id="53"/>
+ <router id="55"/>
+ <router id="58"/>
+ <router id="62"/>
+ <router id="63"/>
+ <router id="76"/>
+ <router id="78"/>
+ <router id="80"/>
+ <router id="81"/>
+ <router id="84"/>
+ <router id="85"/>
+ <router id="87"/>
+ <router id="88"/>
+ <router id="90"/>
+ <router id="91"/>
+ <router id="92"/>
+ <router id="94"/>
+ <router id="96"/>
+
+ <link id="link0" bandwidth="1000"/>
+ <link id="link1" bandwidth="10000"/>
+ <link id="link2" bandwidth="10000"/>
+ <link id="link3" bandwidth="155"/>
+ <link id="link4" bandwidth="10000"/>
+ <link id="link5" bandwidth="10000"/>
+ <link id="link6" bandwidth="10000"/>
+ <link id="link7" bandwidth="155"/>
+ <link id="link8" bandwidth="155"/>
+ <link id="link9" bandwidth="155"/>
+ <link id="link10" bandwidth="155"/>
+ <link id="link11" bandwidth="155"/>
+ <link id="link12" bandwidth="155"/>
+ <link id="link13" bandwidth="155"/>
+ <link id="link14" bandwidth="155"/>
+ <link id="link15" bandwidth="10000"/>
+ <link id="link16" bandwidth="10000"/>
+ <link id="link17" bandwidth="155"/>
+ <link id="link18" bandwidth="155"/>
+ <link id="link19" bandwidth="155"/>
+ <link id="link20" bandwidth="155"/>
+ <link id="link21" bandwidth="155"/>
+ <link id="link22" bandwidth="622"/>
+ <link id="link23" bandwidth="622"/>
+ <link id="link24" bandwidth="155"/>
+ <link id="link25" bandwidth="10000"/>
+ <link id="link26" bandwidth="2500"/>
+ <link id="link27" bandwidth="155"/>
+ <link id="link28" bandwidth="2500"/>
+ <link id="link29" bandwidth="1000"/>
+ <link id="link30" bandwidth="10000"/>
+ <link id="link31" bandwidth="10000"/>
+ <link id="link32" bandwidth="155"/>
+ <link id="link33" bandwidth="1000"/>
+ <link id="link34" bandwidth="155"/>
+ <link id="link35" bandwidth="155"/>
+ <link id="link36" bandwidth="155"/>
+ <link id="link37" bandwidth="155"/>
+ <link id="link38" bandwidth="155"/>
+ <link id="link39" bandwidth="155"/>
+ <link id="link40" bandwidth="1000"/>
+ <link id="link41" bandwidth="1000"/>
+ <link id="link42" bandwidth="10000"/>
+ <link id="link43" bandwidth="2500"/>
+ <link id="link44" bandwidth="10000"/>
+ <link id="link45" bandwidth="155"/>
+ <link id="link46" bandwidth="155"/>
+ <link id="link47" bandwidth="2500"/>
+ <link id="link48" bandwidth="155"/>
+ <link id="link49" bandwidth="155"/>
+ <link id="link50" bandwidth="10000"/>
+ <link id="link51" bandwidth="155"/>
+ <link id="link52" bandwidth="10000"/>
+ <link id="link53" bandwidth="155"/>
+ <link id="link54" bandwidth="155"/>
+ <link id="link55" bandwidth="155"/>
+ <link id="link56" bandwidth="155"/>
+ <link id="link57" bandwidth="2500"/>
+ <link id="link58" bandwidth="1000"/>
+ <link id="link59" bandwidth="10000"/>
+ <link id="link60" bandwidth="2500"/>
+ <link id="link61" bandwidth="2500"/>
+ <link id="link62" bandwidth="155"/>
+ <link id="link63" bandwidth="10000"/>
+ <link id="link64" bandwidth="10000"/>
+ <link id="link65" bandwidth="1000"/>
+ <link id="link66" bandwidth="155"/>
+ <link id="link67" bandwidth="10000"/>
+ <link id="link68" bandwidth="10000"/>
+ <link id="link69" bandwidth="1000"/>
+ <link id="link70" bandwidth="10000"/>
+ <link id="link71" bandwidth="1000"/>
+ <link id="link72" bandwidth="10000"/>
+ <link id="link73" bandwidth="622"/>
+ <link id="link74" bandwidth="1000"/>
+ <link id="link75" bandwidth="1000"/>
+ <link id="link76" bandwidth="1000"/>
+ <link id="link77" bandwidth="10000"/>
+ <link id="link78" bandwidth="155"/>
+ <link id="link79" bandwidth="155"/>
+ <link id="link80" bandwidth="155"/>
+ <link id="link81" bandwidth="155"/>
+ <link id="link82" bandwidth="155"/>
+ <link id="link83" bandwidth="155"/>
+ <link id="link84" bandwidth="155"/>
+ <link id="link85" bandwidth="155"/>
+ <link id="link86" bandwidth="155"/>
+ <link id="link87" bandwidth="155"/>
+ <link id="link88" bandwidth="155"/>
+ <link id="link89" bandwidth="2500"/>
+ <link id="link90" bandwidth="10000"/>
+ <link id="link91" bandwidth="3000"/>
+ <link id="link92" bandwidth="3000"/>
+ <link id="link93" bandwidth="10000"/>
+ <link id="link94" bandwidth="10000"/>
+ <link id="link95" bandwidth="622"/>
+ <link id="link96" bandwidth="622"/>
+ <link id="link97" bandwidth="1000"/>
+ <link id="link98" bandwidth="3000"/>
+ <link id="link99" bandwidth="3000"/>
+ <link id="link100" bandwidth="10000"/>
+ <link id="link101" bandwidth="2500"/>
+ <link id="link102" bandwidth="155"/>
+ <link id="link103" bandwidth="10000"/>
+ <link id="link104" bandwidth="10000"/>
+ <link id="link105" bandwidth="155"/>
+ <link id="link106" bandwidth="155"/>
+ <link id="link107" bandwidth="10000"/>
+ <link id="link108" bandwidth="10000"/>
+ <link id="link109" bandwidth="10000"/>
+ <link id="link110" bandwidth="155"/>
+ <link id="link111" bandwidth="10000"/>
+ <link id="link112" bandwidth="10000"/>
+ <link id="link113" bandwidth="3000"/>
+ <link id="link114" bandwidth="155"/>
+ <link id="link115" bandwidth="3000"/>
+ <link id="link116" bandwidth="10000"/>
+ <link id="link117" bandwidth="622"/>
+ <link id="link118" bandwidth="155"/>
+ <link id="link119" bandwidth="33"/>
+ <link id="link120" bandwidth="1000"/>
+ <link id="link121" bandwidth="622"/>
+ <link id="link122" bandwidth="155"/>
+ <link id="link123" bandwidth="155"/>
+ <link id="link124" bandwidth="155"/>
+ <link id="link125" bandwidth="155"/>
+ <link id="link126" bandwidth="622"/>
+
+ <route src="0" dst="2">
+ <link_ctn id="link0"/>
+ </route>
+ <route src="0" dst="31">
+ <link_ctn id="link1"/>
+ </route>
+ <route src="0" dst="74">
+ <link_ctn id="link2"/>
+ </route>
+ <route src="1" dst="2">
+ <link_ctn id="link3"/>
+ </route>
+ <route src="2" dst="2">
+ <link_ctn id="link4"/>
+ </route>
+ <route src="2" dst="16">
+ <link_ctn id="link5"/>
+ </route>
+ <route src="2" dst="57">
+ <link_ctn id="link6"/>
+ </route>
+ <route src="3" dst="3">
+ <link_ctn id="link7"/>
+ </route>
+ <route src="3" dst="4">
+ <link_ctn id="link8"/>
+ </route>
+ <route src="3" dst="5">
+ <link_ctn id="link9"/>
+ </route>
+ <route src="3" dst="6">
+ <link_ctn id="link10"/>
+ </route>
+ <route src="3" dst="7">
+ <link_ctn id="link11"/>
+ </route>
+ <route src="3" dst="8">
+ <link_ctn id="link12"/>
+ </route>
+ <route src="3" dst="9">
+ <link_ctn id="link13"/>
+ </route>
+ <route src="3" dst="10">
+ <link_ctn id="link14"/>
+ </route>
+ <route src="3" dst="20">
+ <link_ctn id="link15"/>
+ </route>
+ <route src="3" dst="61">
+ <link_ctn id="link16"/>
+ </route>
+ <route src="11" dst="11">
+ <link_ctn id="link17"/>
+ </route>
+ <route src="11" dst="12">
+ <link_ctn id="link18"/>
+ </route>
+ <route src="11" dst="30">
+ <link_ctn id="link19"/>
+ </route>
+ <route src="14" dst="14">
+ <link_ctn id="link20"/>
+ </route>
+ <route src="14" dst="15">
+ <link_ctn id="link21"/>
+ </route>
+ <route src="14" dst="20">
+ <link_ctn id="link22"/>
+ </route>
+ <route src="14" dst="45">
+ <link_ctn id="link23"/>
+ </route>
+ <route src="17" dst="17">
+ <link_ctn id="link24"/>
+ </route>
+ <route src="17" dst="18">
+ <link_ctn id="link25"/>
+ </route>
+ <route src="17" dst="20">
+ <link_ctn id="link26"/>
+ </route>
+ <route src="19" dst="19">
+ <link_ctn id="link27"/>
+ </route>
+ <route src="19" dst="33">
+ <link_ctn id="link28"/>
+ </route>
+ <route src="21" dst="21">
+ <link_ctn id="link29"/>
+ </route>
+ <route src="21" dst="30">
+ <link_ctn id="link30"/>
+ </route>
+ <route src="21" dst="57">
+ <link_ctn id="link31"/>
+ </route>
+ <route src="22" dst="22">
+ <link_ctn id="link32"/>
+ </route>
+ <route src="22" dst="23">
+ <link_ctn id="link33"/>
+ </route>
+ <route src="22" dst="24">
+ <link_ctn id="link34"/>
+ </route>
+ <route src="22" dst="25">
+ <link_ctn id="link35"/>
+ </route>
+ <route src="22" dst="26">
+ <link_ctn id="link36"/>
+ </route>
+ <route src="22" dst="27">
+ <link_ctn id="link37"/>
+ </route>
+ <route src="22" dst="28">
+ <link_ctn id="link38"/>
+ </route>
+ <route src="22" dst="29">
+ <link_ctn id="link39"/>
+ </route>
+ <route src="31" dst="31">
+ <link_ctn id="link40"/>
+ </route>
+ <route src="31" dst="32">
+ <link_ctn id="link41"/>
+ </route>
+ <route src="31" dst="45">
+ <link_ctn id="link42"/>
+ </route>
+ <route src="31" dst="57">
+ <link_ctn id="link43"/>
+ </route>
+ <route src="31" dst="73">
+ <link_ctn id="link44"/>
+ </route>
+ <route src="34" dst="34">
+ <link_ctn id="link45"/>
+ </route>
+ <route src="34" dst="35">
+ <link_ctn id="link46"/>
+ </route>
+ <route src="34" dst="36">
+ <link_ctn id="link47"/>
+ </route>
+ <route src="37" dst="37">
+ <link_ctn id="link48"/>
+ </route>
+ <route src="37" dst="38">
+ <link_ctn id="link49"/>
+ </route>
+ <route src="37" dst="39">
+ <link_ctn id="link50"/>
+ </route>
+ <route src="40" dst="40">
+ <link_ctn id="link51"/>
+ </route>
+ <route src="40" dst="45">
+ <link_ctn id="link52"/>
+ </route>
+ <route src="41" dst="41">
+ <link_ctn id="link53"/>
+ </route>
+ <route src="41" dst="42">
+ <link_ctn id="link54"/>
+ </route>
+ <route src="41" dst="43">
+ <link_ctn id="link55"/>
+ </route>
+ <route src="41" dst="44">
+ <link_ctn id="link56"/>
+ </route>
+ <route src="46" dst="46">
+ <link_ctn id="link57"/>
+ </route>
+ <route src="46" dst="56">
+ <link_ctn id="link58"/>
+ </route>
+ <route src="46" dst="57">
+ <link_ctn id="link59"/>
+ </route>
+ <route src="46" dst="75">
+ <link_ctn id="link60"/>
+ </route>
+ <route src="46" dst="79">
+ <link_ctn id="link61"/>
+ </route>
+ <route src="46" dst="95">
+ <link_ctn id="link62"/>
+ </route>
+ <route src="47" dst="47">
+ <link_ctn id="link63"/>
+ </route>
+ <route src="47" dst="54">
+ <link_ctn id="link64"/>
+ </route>
+ <route src="48" dst="48">
+ <link_ctn id="link65"/>
+ </route>
+ <route src="48" dst="49">
+ <link_ctn id="link66"/>
+ </route>
+ <route src="48" dst="50">
+ <link_ctn id="link67"/>
+ </route>
+ <route src="48" dst="54">
+ <link_ctn id="link68"/>
+ </route>
+ <route src="51" dst="51">
+ <link_ctn id="link69"/>
+ </route>
+ <route src="51" dst="52">
+ <link_ctn id="link70"/>
+ </route>
+ <route src="53" dst="53">
+ <link_ctn id="link71"/>
+ </route>
+ <route src="53" dst="54">
+ <link_ctn id="link72"/>
+ </route>
+ <route src="55" dst="55">
+ <link_ctn id="link73"/>
+ </route>
+ <route src="58" dst="58">
+ <link_ctn id="link74"/>
+ </route>
+ <route src="58" dst="59">
+ <link_ctn id="link75"/>
+ </route>
+ <route src="58" dst="60">
+ <link_ctn id="link76"/>
+ </route>
+ <route src="58" dst="61">
+ <link_ctn id="link77"/>
+ </route>
+ <route src="62" dst="62">
+ <link_ctn id="link78"/>
+ </route>
+ <route src="62" dst="65">
+ <link_ctn id="link79"/>
+ </route>
+ <route src="62" dst="66">
+ <link_ctn id="link80"/>
+ </route>
+ <route src="62" dst="67">
+ <link_ctn id="link81"/>
+ </route>
+ <route src="62" dst="68">
+ <link_ctn id="link82"/>
+ </route>
+ <route src="62" dst="69">
+ <link_ctn id="link83"/>
+ </route>
+ <route src="62" dst="70">
+ <link_ctn id="link84"/>
+ </route>
+ <route src="62" dst="71">
+ <link_ctn id="link85"/>
+ </route>
+ <route src="62" dst="72">
+ <link_ctn id="link86"/>
+ </route>
+ <route src="63" dst="63">
+ <link_ctn id="link87"/>
+ </route>
+ <route src="63" dst="64">
+ <link_ctn id="link88"/>
+ </route>
+ <route src="74" dst="74">
+ <link_ctn id="link89"/>
+ </route>
+ <route src="74" dst="75">
+ <link_ctn id="link90"/>
+ </route>
+ <route src="74" dst="80">
+ <link_ctn id="link91"/>
+ </route>
+ <route src="74" dst="83">
+ <link_ctn id="link92"/>
+ </route>
+ <route src="74" dst="89">
+ <link_ctn id="link93"/>
+ </route>
+ <route src="74" dst="90">
+ <link_ctn id="link94"/>
+ </route>
+ <route src="74" dst="95">
+ <link_ctn id="link95"/>
+ </route>
+ <route src="74" dst="99">
+ <link_ctn id="link96"/>
+ </route>
+ <route src="76" dst="76">
+ <link_ctn id="link97"/>
+ </route>
+ <route src="76" dst="77">
+ <link_ctn id="link98"/>
+ </route>
+ <route src="76" dst="80">
+ <link_ctn id="link99"/>
+ </route>
+ <route src="76" dst="90">
+ <link_ctn id="link100"/>
+ </route>
+ <route src="76" dst="93">
+ <link_ctn id="link101"/>
+ </route>
+ <route src="78" dst="78">
+ <link_ctn id="link102"/>
+ </route>
+ <route src="78" dst="79">
+ <link_ctn id="link103"/>
+ </route>
+ <route src="80" dst="80">
+ <link_ctn id="link104"/>
+ </route>
+ <route src="81" dst="81">
+ <link_ctn id="link105"/>
+ </route>
+ <route src="81" dst="82">
+ <link_ctn id="link106"/>
+ </route>
+ <route src="81" dst="83">
+ <link_ctn id="link107"/>
+ </route>
+ <route src="84" dst="84">
+ <link_ctn id="link108"/>
+ </route>
+ <route src="84" dst="86">
+ <link_ctn id="link109"/>
+ </route>
+ <route src="85" dst="85">
+ <link_ctn id="link110"/>
+ </route>
+ <route src="85" dst="86">
+ <link_ctn id="link111"/>
+ </route>
+ <route src="87" dst="87">
+ <link_ctn id="link112"/>
+ </route>
+ <route src="87" dst="89">
+ <link_ctn id="link113"/>
+ </route>
+ <route src="88" dst="88">
+ <link_ctn id="link114"/>
+ </route>
+ <route src="88" dst="89">
+ <link_ctn id="link115"/>
+ </route>
+ <route src="90" dst="90">
+ <link_ctn id="link116"/>
+ </route>
+ <route src="90" dst="91">
+ <link_ctn id="link117"/>
+ </route>
+ <route src="90" dst="95">
+ <link_ctn id="link118"/>
+ </route>
+ <route src="91" dst="93">
+ <link_ctn id="link119"/>
+ </route>
+ <route src="92" dst="92">
+ <link_ctn id="link120"/>
+ </route>
+ <route src="92" dst="93">
+ <link_ctn id="link121"/>
+ </route>
+ <route src="94" dst="94">
+ <link_ctn id="link122"/>
+ </route>
+ <route src="94" dst="95">
+ <link_ctn id="link123"/>
+ </route>
+ <route src="96" dst="96">
+ <link_ctn id="link124"/>
+ </route>
+ <route src="96" dst="97">
+ <link_ctn id="link125"/>
+ </route>
+ <route src="96" dst="98">
+ <link_ctn id="link126"/>
+ </route>
+</AS>
+</platform>
/*
* Do NOT access any members of this structure directly. FIXME: move to private?
*/
-#ifdef _XBT_WIN32
-#define XBT_LOG_BUFF_SIZE 16384 /* Size of the static string in which we build the log string */
-#else
+
#define XBT_LOG_BUFF_SIZE 2048 /* Size of the static string in which we build the log string */
-#endif
+
struct xbt_log_category_s {
xbt_log_category_t parent;
xbt_log_category_t firstChild;
int lineNum;
va_list ap;
va_list ap_copy; /* need a copy to launch dynamic layouts when the static ones overflowed */
-#ifdef _XBT_WIN32
- char *buffer;
-#else
char buffer[XBT_LOG_BUFF_SIZE];
-#endif
};
/**
* code.
* Setting the LogEvent's valist member is done inside _log_logEvent.
*/
-#ifdef _XBT_WIN32
-#include <stdlib.h> /* calloc */
-#define _XBT_LOG_EV_BUFFER_ZERO() \
- _log_ev.buffer = (char*) calloc(XBT_LOG_BUFF_SIZE + 1, sizeof(char))
-#else
+
#include <string.h> /* memset */
#define _XBT_LOG_EV_BUFFER_ZERO() \
memset(_log_ev.buffer, 0, XBT_LOG_BUFF_SIZE)
-#endif
/* Logging Macros */
# define XBT_CLOG(cat, prio, ...) \
_XBT_IF_ONE_ARG(_XBT_CLOG_ARG1, _XBT_CLOG_ARGN, __VA_ARGS__)(__VA_ARGS__)
# define _XBT_CLOG_ARG1(f) \
- fprintf(stderr,"%s:%d:" f, __FILE__, __LINE__)
+ fprintf(stderr,"%s:%d:\n" f, __FILE__, __LINE__)
# define _XBT_CLOG_ARGN(f, ...) \
- fprintf(stderr,"%s:%d:" f, __FILE__, __LINE__, __VA_ARGS__)
+ fprintf(stderr,"%s:%d:\n" f, __FILE__, __LINE__, __VA_ARGS__)
# define XBT_LOG(...) XBT_CLOG(0, __VA_ARGS__)
#else
# define XBT_CLOG_(catv, prio, ...) \
/* */
XBT_PUBLIC(void) xbt_str_strip_spaces(char *);
-XBT_PUBLIC(char *) xbt_str_diff(char *a, char *b);
+XBT_PUBLIC(char *) xbt_str_diff(const char *a, const char *b);
XBT_PUBLIC(char *) xbt_str_from_file(FILE * file);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua, bindings, "Lua Bindings");
-lua_State *simgrid_lua_state;
+static lua_State *lua_maestro_state;
#define TASK_MODULE_NAME "simgrid.Task"
#define HOST_MODULE_NAME "simgrid.Host"
-// Surf ( bypass XML )
+// Surf (bypass XML)
#define LINK_MODULE_NAME "simgrid.Link"
#define ROUTE_MODULE_NAME "simgrid.Route"
#define AS_MODULE_NAME "simgrid.AS"
#define TRACE_MODULE_NAME "simgrid.Trace"
+static void stack_dump(const char *msg, lua_State *L);
+static m_task_t check_task(lua_State *L, int index);
+static void register_c_functions(lua_State *L);
+
/* ********************************************************************************* */
/* helper functions */
/* ********************************************************************************* */
-static void stackDump(const char *msg, lua_State * L)
+
+/**
+ * @brief Dumps the Lua stack
+ * @param msg a message to print
+ * @param L a Lua state
+ */
+static void stack_dump(const char *msg, lua_State *L)
{
char buff[2048];
char *p = buff;
XBT_INFO("%s%s", msg, buff);
}
-/** @brief ensures that a userdata on the stack is a task and returns the pointer inside the userdata */
+/**
+ * @brief Ensures that a userdata on the stack is a task
+ * and returns the pointer inside the userdata.
+ * @param L a Lua state
+ * @param index an index in the Lua stack
+ * @return the task at this index
+ */
static m_task_t checkTask(lua_State * L, int index)
{
m_task_t *pi, tk;
/* * * *
* * Constructors * *
* * * */
+
/**
- * Construct an new task with the specified processing amount and amount
+ * @brief Constructs a new task with the specified processing amount and amount
* of data needed.
*
* @param name Task's name
if (res != MSG_OK)
switch (res) {
case MSG_TIMEOUT:
- XBT_ERROR("MSG_task_send failed : Timeout");
+ XBT_DEBUG("MSG_task_send failed : Timeout");
break;
case MSG_TRANSFER_FAILURE:
- XBT_ERROR("MSG_task_send failed : Transfer Failure");
+ XBT_DEBUG("MSG_task_send failed : Transfer Failure");
break;
case MSG_HOST_FAILURE:
- XBT_ERROR("MSG_task_send failed : Host Failure ");
+ XBT_DEBUG("MSG_task_send failed : Host Failure ");
break;
default:
XBT_ERROR
return 0;
}
-static int Task_recv(lua_State * L)
-{
- m_task_t tk = NULL;
- const char *mailbox = luaL_checkstring(L, -1);
- MSG_error_t res = MSG_task_receive(&tk, mailbox);
-
- lua_State *sender_stack = MSG_task_get_data(tk);
- lua_xmove(sender_stack, L, 1); // copy the data directly from sender's stack
- MSG_task_set_data(tk, NULL);
-
- if (res != MSG_OK)
- switch (res) {
- case MSG_TIMEOUT:
- XBT_ERROR("MSG_task_receive failed : Timeout");
- break;
- case MSG_TRANSFER_FAILURE:
- XBT_ERROR("MSG_task_receive failed : Transfer Failure");
- break;
- case MSG_HOST_FAILURE:
- XBT_ERROR("MSG_task_receive failed : Host Failure ");
- break;
- default:
- XBT_ERROR
- ("MSG_task_receive failed : Unexpected error , please report this bug");
- break;
- }
-
- return 1;
-}
-
-static int Task_recv_with_timeout(lua_State * L)
+static int Task_recv_with_timeout(lua_State *L)
{
m_task_t tk = NULL;
const char *mailbox = luaL_checkstring(L, -2);
int timeout = luaL_checknumber(L, -1);
MSG_error_t res = MSG_task_receive_with_timeout(&tk, mailbox, timeout);
- lua_State *sender_stack = MSG_task_get_data(tk);
- lua_xmove(sender_stack, L, 1); // copy the data directly from sender's stack
- MSG_task_set_data(tk, NULL);
-
- if (res != MSG_OK)
+ if (res == MSG_OK) {
+ lua_State *sender_stack = MSG_task_get_data(tk);
+ lua_xmove(sender_stack, L, 1); // copy the data directly from sender's stack
+ MSG_task_set_data(tk, NULL);
+ }
+ else {
switch (res) {
case MSG_TIMEOUT:
- XBT_ERROR("MSG_task_receive failed : Timeout");
+ XBT_DEBUG("MSG_task_receive failed : Timeout");
break;
case MSG_TRANSFER_FAILURE:
- XBT_ERROR("MSG_task_receive failed : Transfer Failure");
+ XBT_DEBUG("MSG_task_receive failed : Transfer Failure");
break;
case MSG_HOST_FAILURE:
- XBT_ERROR("MSG_task_receive failed : Host Failure ");
+ XBT_DEBUG("MSG_task_receive failed : Host Failure ");
break;
default:
- XBT_ERROR
- ("MSG_task_receive failed : Unexpected error , please report this bug");
+ XBT_ERROR("MSG_task_receive failed : Unexpected error , please report this bug");
break;
}
+ lua_pushnil(L);
+ }
return 1;
}
-/**
- * Static Binding for the Splay methods : event.sleep :
- * it use MSG_task_irecv with MSG_comm_wait
- */
-static int Task_splay_irecv(lua_State *L)
-{
- m_task_t task = NULL;
- msg_comm_t comm = NULL; //current communication to receive
- const char *mailbox = luaL_checkstring(L, -2);
- double timeout = luaL_checknumber(L, -1);
- comm = MSG_task_irecv(&task, mailbox);
- MSG_comm_wait(comm, timeout);
- if (MSG_comm_get_status(comm) == MSG_OK)
- {
- XBT_DEBUG("Receiving task : %s",MSG_task_get_name(task));
- lua_State *sender_stack = MSG_task_get_data(task);
- lua_xmove(sender_stack, L, 1); // copy the data directly from sender's stack
- MSG_task_set_data(task, NULL);
- }
- MSG_comm_destroy(comm);
- return 1;
-}
-
-static int Task_splay_isend(lua_State *L)
+static int Task_recv(lua_State * L)
{
- m_task_t tk = checkTask(L, 1);
- const char *mailbox = luaL_checkstring(L, 2);
- lua_pop(L, 1); // remove the string so that the task is on top of it
- MSG_task_set_data(tk, L); // Copy my stack into the task, so that the receiver can copy the lua task directly
- MSG_task_isend(tk, mailbox);
-
- return 1;
+ lua_pushnumber(L, -1.0);
+ return Task_recv_with_timeout(L);
}
static const luaL_reg Task_methods[] = {
{"destroy", Task_destroy},
{"send", Task_send},
{"recv", Task_recv},
- {"recv_timeout",Task_recv_with_timeout},
- {"splay_recv",Task_splay_irecv},
- {"iSend",Task_splay_isend},
- {0, 0}
+ {"recv_timeout", Task_recv_with_timeout},
+ {NULL, NULL}
};
static int Task_gc(lua_State * L)
static const luaL_reg Task_meta[] = {
{"__gc", Task_gc},
{"__tostring", Task_tostring},
- {0, 0}
+ {NULL, NULL}
};
/**
return 1;
}
-
static int Host_get_name(lua_State * L)
{
m_host_t ht = checkHost(L, -1);
static int Host_self(lua_State * L)
{
- m_host_t host = MSG_host_self();
- lua_newtable(L);
- m_host_t *lua_host =(m_host_t *)lua_newuserdata(L,sizeof(m_host_t));
- *lua_host = host;
- luaL_getmetatable(L, HOST_MODULE_NAME);
- lua_setmetatable(L, -2);
- lua_setfield(L, -2, "__simgrid_host");
- return 1;
-
+ m_host_t host = MSG_host_self();
+ lua_newtable(L);
+ m_host_t *lua_host =(m_host_t *)lua_newuserdata(L,sizeof(m_host_t));
+ *lua_host = host;
+ luaL_getmetatable(L, HOST_MODULE_NAME);
+ lua_setmetatable(L, -2);
+ lua_setfield(L, -2, "__simgrid_host");
+ return 1;
}
static int Host_get_property_value(lua_State * L)
{
- m_host_t ht = checkHost(L, -2);
- const char *prop = luaL_checkstring(L, -1);
- lua_pushstring(L,MSG_host_get_property_value(ht,prop));
- return 1;
+ m_host_t ht = checkHost(L, -2);
+ const char *prop = luaL_checkstring(L, -1);
+ lua_pushstring(L,MSG_host_get_property_value(ht,prop));
+ return 1;
}
static int Host_sleep(lua_State *L)
{
- int time = luaL_checknumber(L, -1);
- MSG_process_sleep(time);
- return 1;
+ int time = luaL_checknumber(L, -1);
+ MSG_process_sleep(time);
+ return 1;
}
static int Host_destroy(lua_State *L)
{
- m_host_t ht = checkHost(L, -1);
- __MSG_host_destroy(ht);
- return 1;
+ m_host_t ht = checkHost(L, -1);
+ __MSG_host_destroy(ht);
+ return 1;
}
/* ********************************************************************************* */
#endif
return 1;
}
-//***********Register Methods *******************************************//
+
+// *********** Register Methods ******************************************* //
+
/*
* Host Methods
*/
{"name", Host_get_name},
{"number", Host_number},
{"at", Host_at},
- {"self",Host_self},
+ {"self", Host_self},
{"getPropValue", Host_get_property_value},
{"sleep", Host_sleep},
- {"destroy",Host_destroy},
+ {"destroy", Host_destroy},
// Bypass XML Methods
{"setFunction", console_set_function},
{"setProperty", console_host_set_property},
- {0, 0}
+ {NULL, NULL}
};
static int Host_gc(lua_State * L)
*/
static const luaL_reg AS_methods[] = {
{"new", console_add_AS},
- {"addHost",console_add_host},
- {"addLink",console_add_link},
- {"addRoute",console_add_route},
- {0, 0}
+ {"addHost", console_add_host},
+ {"addLink", console_add_link},
+ {"addRoute", console_add_route},
+ {NULL, NULL}
};
/**
* Tracing Functions
*/
static const luaL_reg Trace_methods[] = {
- {"start",trace_start},
- {"category",trace_category},
- {"setTaskCategory",trace_set_task_category},
- {"finish",trace_end},
- {0,0}
+ {"start", trace_start},
+ {"category", trace_category},
+ {"setTaskCategory", trace_set_task_category},
+ {"finish", trace_end},
+ {NULL, NULL}
};
+
/*
* Environment related
*/
-//extern lua_State *simgrid_lua_state;
-
+/**
+ * @brief Runs a Lua function as a new simulated process.
+ * @param argc number of arguments of the function
+ * @param argv name of the Lua function and array of its arguments
+ * @return result of the function
+ */
static int run_lua_code(int argc, char **argv)
{
XBT_DEBUG("Run lua code %s", argv[0]);
- lua_State *L = lua_newthread(simgrid_lua_state);
- int ref = luaL_ref(simgrid_lua_state, LUA_REGISTRYINDEX); // protect the thread from being garbage collected
+
+ lua_State *L = lua_newthread(lua_maestro_state);
+ int ref = luaL_ref(lua_maestro_state, LUA_REGISTRYINDEX); /* protect the thread from being garbage collected */
int res = 1;
- /* Start the co-routine */
+ /* start the co-routine */
lua_getglobal(L, argv[0]);
xbt_assert(lua_isfunction(L, -1),
"The lua function %s does not seem to exist", argv[0]);
- // push arguments onto the stack
+ /* push arguments onto the stack */
int i;
for (i = 1; i < argc; i++)
lua_pushstring(L, argv[i]);
- // Call the function (in resume)
+ /* call the function */
int err;
err = lua_pcall(L, argc - 1, 1, 0);
xbt_assert(err == 0, "error running function `%s': %s", argv[0],
res = lua_tonumber(L, -1);
lua_pop(L, 1); /* pop returned value */
}
- // cleanups
- luaL_unref(simgrid_lua_state, LUA_REGISTRYINDEX, ref);
- XBT_DEBUG("Execution of lua code %s is over", (argv ? argv[0] : "(null)"));
+
+ /* cleanups */
+ luaL_unref(lua_maestro_state, LUA_REGISTRYINDEX, ref);
+ XBT_DEBUG("Execution of Lua code %s is over", (argv ? argv[0] : "(null)"));
+
return res;
}
return 0;
}
-#include "simix/simix.h" //FIXME: KILLME when debugging on simix internals become useless
static int create_environment(lua_State * L)
{
const char *file = luaL_checkstring(L, 1);
XBT_DEBUG("Loading environment file %s", file);
MSG_create_environment(file);
-
-/*
- xbt_dict_t hosts = SIMIX_host_get_dict();
- smx_host_t host;
- xbt_dict_cursor_t c;
- const char *name;
-
- xbt_dict_foreach(hosts, c, name, host) {
- XBT_DEBUG("We have an host %s", SIMIX_host_get_name(host));
- }
-*/
-
return 0;
}
/* ********************************************************************************* */
#define LUA_MAX_ARGS_COUNT 10 /* maximum amount of arguments we can get from lua on command line */
-#define TEST
-int luaopen_simgrid(lua_State * L); // Fuck gcc: we don't need that prototype
-int luaopen_simgrid(lua_State * L)
+
+int luaopen_simgrid(lua_State *L); // Fuck gcc: we don't need that prototype
+
+/**
+ * This function is called automatically by the Lua interpreter when some Lua code requires
+ * the "simgrid" module.
+ * @param L the Lua state
+ */
+int luaopen_simgrid(lua_State *L)
{
- XBT_DEBUG("Luaopen_Simgrid *****");
+ XBT_DEBUG("luaopen_simgrid *****");
+
+ /* Get the command line arguments from the lua interpreter */
char **argv = malloc(sizeof(char *) * LUA_MAX_ARGS_COUNT);
int argc = 1;
argv[0] = (char *) "/usr/bin/lua"; /* Lie on the argv[0] so that the stack dumping facilities find the right binary. FIXME: what if lua is not in that location? */
- /* Get the command line arguments from the lua interpreter */
+
lua_getglobal(L, "arg");
/* if arg is a null value, it means we use lua only as a script to init platform
* else it should be a table and then take arg in consideration
MSG_global_init(&argc, argv);
XBT_DEBUG("Still %d arguments on command line", argc); // FIXME: update the lua's arg table to reflect the changes from SimGrid
}
+
+ /* Keep the context mechanism informed of our lua world today */
+ lua_maestro_state = L;
+
+ register_c_functions(L);
+
+ return 1;
+}
+
+/**
+ * Makes the appropriate Simgrid functions available to the Lua world.
+ * @param L a Lua world
+ */
+void register_c_functions(lua_State *L) {
+
/* register the core C functions to lua */
luaL_register(L, "simgrid", simgrid_funcs);
+
/* register the task methods to lua */
- luaL_openlib(L, TASK_MODULE_NAME, Task_methods, 0); //create methods table,add it to the globals
- luaL_newmetatable(L, TASK_MODULE_NAME); //create metatable for Task,add it to the Lua registry
+ luaL_openlib(L, TASK_MODULE_NAME, Task_methods, 0); // create methods table, add it to the globals
+ luaL_newmetatable(L, TASK_MODULE_NAME); // create metatable for Task, add it to the Lua registry
luaL_openlib(L, 0, Task_meta, 0); // fill metatable
lua_pushliteral(L, "__index");
- lua_pushvalue(L, -3); //dup methods table
- lua_rawset(L, -3); //matatable.__index = methods
+ lua_pushvalue(L, -3); // dup methods table
+ lua_rawset(L, -3); // matatable.__index = methods
lua_pushliteral(L, "__metatable");
- lua_pushvalue(L, -3); //dup methods table
- lua_rawset(L, -3); //hide metatable:metatable.__metatable = methods
- lua_pop(L, 1); //drop metatable
+ lua_pushvalue(L, -3); // dup methods table
+ lua_rawset(L, -3); // hide metatable:metatable.__metatable = methods
+ lua_pop(L, 1); // drop metatable
/* register the hosts methods to lua */
luaL_openlib(L, HOST_MODULE_NAME, Host_methods, 0);
luaL_newmetatable(L, AS_MODULE_NAME);
lua_pop(L, 1);
-
-
- /*register the Tracing functions to lua */
+ /* register the Tracing functions to lua */
luaL_openlib(L, TRACE_MODULE_NAME, Trace_methods, 0);
luaL_newmetatable(L, TRACE_MODULE_NAME);
lua_pop(L, 1);
-
- /* Keep the context mechanism informed of our lua world today */
- simgrid_lua_state = L;
- return 1;
}
l_C:1/1:_I:2/2:4/4:4/4:8/4:_P:4/4:4/4:_D:4/4:8/4: #gras_arch=2; gras_size=32; gras_arch_name=little32_4;
l_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/8: #gras_arch=3; gras_size=32; gras_arch_name=little32_8;
l_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/8: #gras_arch=4; gras_size=64; gras_arch_name=little64;
-l_C:1/1:_I:2/2:4/4:4/4:8/8:_P:8/8:8/8:_D:4/4:8/8: #gras_arch=11; gras_size=64; gras_arch_name=little64_2;
-
-B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/8: #gras_arch=5; gras_size=32; gras_arch_name=big32;
-B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/4: #gras_arch=6; gras_size=32; gras_arch_name=big32_8_4;
-B_C:1/1:_I:2/2:4/4:4/4:8/4:_P:4/4:4/4:_D:4/4:8/4: #gras_arch=7; gras_size=32; gras_arch_name=big32_4;
-B_C:1/1:_I:2/2:4/2:4/2:8/2:_P:4/2:4/2:_D:4/2:8/2: #gras_arch=8; gras_size=32; gras_arch_name=big32_2;
-B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/8: #gras_arch=9; gras_size=64; gras_arch_name=big64;
-B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/4: #gras_arch=10;gras_size=64; gras_arch_name=big64_8_4;
+l_C:1/1:_I:2/2:4/4:4/4:8/8:_P:8/8:8/8:_D:4/4:8/8: #gras_arch=5; gras_size=64; gras_arch_name=little64_2;
+
+B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/8: #gras_arch=6; gras_size=32; gras_arch_name=big32_8;
+B_C:1/1:_I:2/2:4/4:4/4:8/8:_P:4/4:4/4:_D:4/4:8/4: #gras_arch=7; gras_size=32; gras_arch_name=big32_8_4;
+B_C:1/1:_I:2/2:4/4:4/4:8/4:_P:4/4:4/4:_D:4/4:8/4: #gras_arch=8; gras_size=32; gras_arch_name=big32_4;
+B_C:1/1:_I:2/2:4/2:4/2:8/2:_P:4/2:4/2:_D:4/2:8/2: #gras_arch=9; gras_size=32; gras_arch_name=big32_2;
+B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/8: #gras_arch=10; gras_size=64; gras_arch_name=big64;
+B_C:1/1:_I:2/2:4/4:8/8:8/8:_P:8/8:8/8:_D:4/4:8/4: #gras_arch=11; gras_size=64; gras_arch_name=big64_8_4;
PLEASE DO NOT MESS WITH THESE HARDCODED VALUES
void gras_msg_listener_awake(void);
void gras_msg_listener_close_socket(int sd);
-#define GRAS_PROTOCOL_VERSION '\1';
+#define GRAS_PROTOCOL_VERSION '\2';
+/* The difference between GRAS_PROTOCOL_VERSION=\1 (in SimGrid 3.6.1) and \2 (afterward) is that
+ the architectures were renumbered (GRAS_THISARCH were shifted by 1) to insert WIN64 near to WIN32.
+ See commit 27cbb00affed384593925fc5af6d5533d0a7ef09 */
#endif /* GRAS_MSG_INTERFACE_H */
/** \ingroup m_task_management
* \brief Cancel a #m_task_t.
- * \param task the taskt to cancel. If it was executed or transfered, it
+ * \param task the task to cancel. If it was executed or transfered, it
stops the process that were working on it.
*/
MSG_error_t MSG_task_cancel(m_task_t task)
if (task->simdata->compute) {
SIMIX_req_host_execution_cancel(task->simdata->compute);
- return MSG_OK;
}
- if (task->simdata->comm) {
+ else if (task->simdata->comm) {
SIMIX_req_comm_cancel(task->simdata->comm);
- return MSG_OK;
}
- THROW_IMPOSSIBLE;
+ else {
+ static int warned = 0;
+ if (!warned) {
+ XBT_WARN("Cannot cancel a non-running task");
+ warned = 1;
+ }
+ }
+ return MSG_OK;
}
/** \ingroup m_task_management
static void parse_process_init(void)
{
- parse_host = xbt_strdup(A_surfxml_process_host);
- xbt_assert(SIMIX_host_get_by_name(parse_host),
- "Host '%s' unknown", parse_host);
+ smx_host_t host = SIMIX_host_get_by_name(A_surfxml_process_host);
+ if (!host)
+ THROWF(arg_error, 0, "Host '%s' unknown", A_surfxml_process_host);
+ parse_host = host->name;
parse_code = SIMIX_get_registered_function(A_surfxml_process_function);
xbt_assert(parse_code, "Function '%s' unknown",
A_surfxml_process_function);
current_property_set);
/* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
if (!process) {
- xbt_free(parse_host);
return;
}
if (kill_time > SIMIX_get_clock()) {
SIMIX_timer_set(start_time, simix_global->kill_process_function, process);
}
}
- xbt_free(parse_host);
}
current_property_set = NULL;
}
char *arg;
/* init process */
- parse_host = xbt_strdup(process_host);
- xbt_assert(SIMIX_host_get_by_name(parse_host),
- "Host '%s' unknown", parse_host);
+ smx_host_t host = SIMIX_host_get_by_name(process_host);
+ if (!host)
+ THROWF(arg_error, 0, "Host '%s' unknown", process_host);
+ parse_host = host->name;
parse_code = SIMIX_get_registered_function(process_function);
xbt_assert(parse_code, "Function '%s' unknown", process_function);
SIMIX_request_post((smx_action_t) action->data);
}
}
+
+ /* Clean processes to destroy */
+ SIMIX_process_empty_trash();
+
} while (time != -1.0);
if (xbt_swag_size(simix_global->process_list) != 0) {
XBT_INFO("%d processes are still running, waiting for something.", nbprocess);
/* List the process and their state */
- XBT_INFO
- ("Legend of the following listing: \"<process> on <host>: <status>.\"");
xbt_swag_foreach(process, simix_global->process_list) {
if (process->waiting_action) {
action_description = "I/O";
break;
}
- XBT_INFO("Waiting for %s action %p to finish", action_description, process->waiting_action);
+ XBT_INFO("Process %ld (%s@%s): waiting for %s action %p to finish", process->pid, process->name, process->smx_host->name,
+ action_description, process->waiting_action);
}
}
}
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_ns3, surf,
"Logging specific to the SURF network NS3 module");
+#define MAX_LENGHT_IPV4 16 //255.255.255.255\0
+
extern routing_global_t global_routing;
+extern xbt_dict_t dict_socket;
+
+static double time_to_next_flow_completion = -1;
+
+static double ns3_share_resources(double min);
+static void ns3_update_actions_state(double now, double delta);
+static void finalize(void);
+static surf_action_t communicate(const char *src_name,
+ const char *dst_name, double size, double rate);
+static void action_suspend(surf_action_t action);
+static void action_resume(surf_action_t action);
+static int action_is_suspended(surf_action_t action);
+static int action_unref(surf_action_t action);
+
+xbt_dynar_t IPV4addr;
static void replace_str(char *str, const char *orig, const char *rep)
{
{
char *temp = xbt_strdup(bdw);
xbt_free(bdw);
- bdw = bprintf("%fbps",atof(temp));
+ bdw = bprintf("%fBps",atof(temp));
xbt_free(temp);
}
ns3_add_host(A_surfxml_host_id)
);
}
+
+static void ns3_free_dynar(void * elmts){
+ if(elmts)
+ free(elmts);
+ return;
+}
+
void parse_ns3_add_link(void)
{
XBT_DEBUG("NS3_ADD_LINK '%s'",A_surfxml_link_id);
+ if(!IPV4addr) IPV4addr = xbt_dynar_new(MAX_LENGHT_IPV4*sizeof(char),ns3_free_dynar);
+
tmgr_trace_t bw_trace;
tmgr_trace_t state_trace;
tmgr_trace_t lat_trace;
}
}
-
-
//Create links
unsigned int cpt;
int elmts;
void parse_ns3_end_platform(void)
{
ns3_end_platform();
-
- xbt_lib_cursor_t cursor = NULL;
- char *name = NULL;
- void **data = NULL;
- XBT_DEBUG("link_lib");
- xbt_lib_foreach(link_lib, cursor, name, data) {
- XBT_DEBUG("\tSee link '%s'\t--> NS3_LEVEL %p",
- name,
- data[NS3_LINK_LEVEL]);
- }
- XBT_DEBUG(" ");
- XBT_DEBUG("host_lib");
- xbt_lib_foreach(host_lib, cursor, name, data) {
- XBT_DEBUG("\tSee host '%s'\t--> NS3_LEVEL %p",
- name,
- data[NS3_HOST_LEVEL]);
- }
- XBT_DEBUG(" ");
- XBT_DEBUG("as_router_lib");
- xbt_lib_foreach(as_router_lib, cursor, name, data) {
- XBT_DEBUG("\tSee ASR '%s'\t--> NS3_LEVEL %p",
- name,
- data[NS3_ASR_LEVEL]);
- }
-
- XBT_DEBUG(" ");
}
/* Create the ns3 topology based on routing strategy */
void create_ns3_topology()
{
- XBT_INFO("Starting topology generation");
+ XBT_DEBUG("Starting topology generation");
+
+ xbt_dynar_shrink(IPV4addr,0);
//get the onelinks from the parsed platform
xbt_dynar_t onelink_routes = global_routing->get_onelink_routes();
if (!onelink_routes)
xbt_die("There is no routes!");
- XBT_INFO("Have get_onelink_routes, found %ld routes",onelink_routes->used);
+ XBT_DEBUG("Have get_onelink_routes, found %ld routes",onelink_routes->used);
//save them in trace file
onelink_t onelink;
unsigned int iter;
void *link = onelink->link_ptr;
if( strcmp(src,dst) && ((surf_ns3_link_t)link)->created){
- XBT_INFO("Route from '%s' to '%s' with link '%s'",src,dst,((surf_ns3_link_t)link)->data->id);
- char * link_bdw = xbt_strdup(((surf_ns3_link_t)link)->data->bdw);
- char * link_lat = xbt_strdup(((surf_ns3_link_t)link)->data->lat);
+ XBT_DEBUG("Route from '%s' to '%s' with link '%s'",src,dst,((surf_ns3_link_t)link)->data->id);
+ char * link_bdw = bprintf("%s",((surf_ns3_link_t)link)->data->bdw);
+ char * link_lat = bprintf("%s",(((surf_ns3_link_t)link)->data->lat));
+ replace_lat_ns3(link_lat);
+ replace_bdw_ns3(link_bdw);
((surf_ns3_link_t)link)->created = 0;
- replace_bdw_ns3(link_bdw);
- replace_lat_ns3(link_lat);
-// XBT_INFO("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id);
- XBT_INFO("\tLink (%s) bdw:%s->%s lat:%s->%s",((surf_ns3_link_t)link)->data->id,
- ((surf_ns3_link_t)link)->data->bdw,link_bdw,
- ((surf_ns3_link_t)link)->data->lat,link_lat
+ // XBT_DEBUG("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id);
+ XBT_DEBUG("\tLink (%s) bdw:%s lat:%s",((surf_ns3_link_t)link)->data->id,
+ link_bdw,
+ link_lat
);
//create link ns3
free(host);
}
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+static int ns3_get_link_latency_limited(surf_action_t action)
+{
+ return 0;
+}
+#endif
+
void surf_network_model_init_NS3(const char *filename)
{
+ if (surf_network_model)
+ return;
+
surf_network_model = surf_model_init();
surf_network_model->name = "network NS3";
surf_network_model->extension.network.get_link_latency = ns3_get_link_latency;
surf_network_model->extension.network.get_link_bandwidth = ns3_get_link_bandwidth;
surf_network_model->extension.network.get_route = ns3_get_route;
+
+ surf_network_model->model_private->share_resources = ns3_share_resources;
+ surf_network_model->model_private->update_actions_state = ns3_update_actions_state;
+ surf_network_model->model_private->finalize = finalize;
+
+ surf_network_model->suspend = action_suspend;
+ surf_network_model->resume = action_resume;
+ surf_network_model->is_suspended = action_is_suspended;
+ surf_network_model->action_unref = action_unref;
+ surf_network_model->extension.network.communicate = communicate;
+
+ /* Added the initialization for NS3 interface */
+ if (ns3_initialize()) {
+ xbt_die("Impossible to initialize NS3 interface");
+ }
+
routing_model_create(sizeof(s_surf_ns3_link_t), NULL, NULL);
define_callbacks_ns3(filename);
NS3_ASR_LEVEL = xbt_lib_add_level(as_router_lib,(void_f_pvoid_t)free_ns3_host);
NS3_LINK_LEVEL = xbt_lib_add_level(link_lib,(void_f_pvoid_t)free_ns3_link);
+ xbt_dynar_push(model_list, &surf_network_model);
update_model_description(surf_network_model_description,
"NS3", surf_network_model);
+
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+ surf_network_model->get_latency_limited = ns3_get_link_latency_limited;
+#endif
+}
+
+static void finalize(void)
+{
+ ns3_finalize();
+ xbt_dynar_free_container(&IPV4addr);
+}
+
+static double ns3_share_resources(double min)
+{
+ XBT_DEBUG("ns3_share_resources");
+
+ xbt_swag_t running_actions =
+ surf_network_model->states.running_action_set;
+
+ //get the first relevant value from the running_actions list
+ if (!xbt_swag_size(running_actions))
+ return -1.0;
+
+ ns3_simulator(min);
+ time_to_next_flow_completion = ns3_time() - surf_get_clock();
+
+// XBT_INFO("min : %f",min);
+// XBT_INFO("ns3 time : %f",ns3_time());
+// XBT_INFO("surf time : %f",surf_get_clock());
+
+ xbt_assert(time_to_next_flow_completion,
+ "Time to next flow completion not initialized!\n");
+
+ XBT_DEBUG("ns3_share_resources return %f",time_to_next_flow_completion);
+ return time_to_next_flow_completion;
+}
+
+static void ns3_update_actions_state(double now, double delta)
+{
+ xbt_dict_cursor_t cursor = NULL;
+ char *key;
+ void *data;
+
+ surf_action_t action = NULL;
+ xbt_swag_t running_actions =
+ surf_network_model->states.running_action_set;
+
+ /* If there are no running flows, just return */
+ if (!xbt_swag_size(running_actions))
+ return;
+
+ xbt_dict_foreach(dict_socket,cursor,key,data){
+ action = (surf_action_t)ns3_get_socket_action(data);
+ action->remains = ns3_get_socket_remains(data);
+ if(ns3_get_socket_is_finished(data) == 1){
+ action->finish = now;
+ surf_action_state_set(action, SURF_ACTION_DONE);
+ }
+ }
+ return;
+}
+
+/* Max durations are not supported */
+static surf_action_t communicate(const char *src_name,
+ const char *dst_name, double size, double rate)
+{
+ surf_action_t action = NULL;
+
+ XBT_DEBUG("Communicate from %s to %s",src_name,dst_name);
+ action = surf_action_new(sizeof(s_surf_action_t), size, surf_network_model, 0);
+
+ ns3_create_flow(src_name, dst_name, surf_get_clock(), size, action);
+
+ return (surf_action_t) action;
+}
+
+/* Suspend a flow() */
+static void action_suspend(surf_action_t action)
+{
+ THROW_UNIMPLEMENTED;
+}
+
+/* Resume a flow() */
+static void action_resume(surf_action_t action)
+{
+ THROW_UNIMPLEMENTED;
+}
+
+/* Test whether a flow is suspended */
+static int action_is_suspended(surf_action_t action)
+{
+ return 0;
+}
+
+static int action_unref(surf_action_t action)
+{
+ action->refcount--;
+ if (!action->refcount) {
+ xbt_swag_remove(action, action->state_set);
+ surf_action_free(&action);
+ return 1;
+ }
+ return 0;
}
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "ns3_interface.h"
+#include "ns3_simulator.h"
+#include "xbt/lib.h"
+#include "xbt/log.h"
+#include "xbt/dynar.h"
+
#include "ns3/core-module.h"
#include "ns3/simulator-module.h"
#include "ns3/node-module.h"
using namespace ns3;
+extern xbt_lib_t host_lib;
+extern int NS3_HOST_LEVEL; //host node for ns3
+extern xbt_dynar_t IPV4addr;
+
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(interface_ns3, surf,
"Logging specific to the SURF network NS3 module");
NodeContainer Cluster_nodes;
Ipv4InterfaceContainer interfaces;
+
+
int number_of_nodes = 0;
int number_of_clusters_nodes = 0;
int number_of_links = 1;
int number_of_networks = 1;
+int port_number = 1025; //Port number is limited from 1025 to 65 000
+
+static NS3Sim* ns3_sim = 0;
+
+void ns3_simulator(double min){
+ ns3_sim->simulator_stop(min);
+ ns3_sim->simulator_start();
+}
+
+void* ns3_get_socket_action(void *socket){
+ return ns3_sim->get_action_from_socket(socket);
+}
+
+double ns3_get_socket_remains(void *socket){
+ return ns3_sim->get_remains_from_socket(socket);
+}
+
+char ns3_get_socket_is_finished(void *socket){
+ return ns3_sim->get_finished(socket);
+}
+
+
+double ns3_time(){
+ return Simulator::Now().GetSeconds();
+}
+
+int ns3_create_flow(const char* a,const char *b,double start,u_int32_t TotalBytes,void * action)
+{
+ ns3_nodes_t node1 = (ns3_nodes_t) xbt_lib_get_or_null(host_lib,a,NS3_HOST_LEVEL);
+ ns3_nodes_t node2 = (ns3_nodes_t) xbt_lib_get_or_null(host_lib,b,NS3_HOST_LEVEL);
+
+ Ptr<Node> src_node = nodes.Get(node1->node_num);
+ Ptr<Node> dst_node = nodes.Get(node2->node_num);
+
+ char* addr = (char*)xbt_dynar_get_ptr(IPV4addr,node2->node_num);
+
+ XBT_DEBUG("ns3_create_flow %d Bytes from %d to %d with Interface %s",TotalBytes, node1->node_num, node2->node_num,addr);
+ ns3_sim->create_flow_NS3(src_node,
+ dst_node,
+ port_number,
+ start,
+ addr,
+ TotalBytes,
+ action);
+
+ port_number++;
+ if(port_number >= 65001 ) xbt_die("Too many connections! Port number is saturated.");
+ return 0;
+}
+
+// clean up
+int ns3_finalize(void){
+ if (!ns3_sim) return -1;
+ delete ns3_sim;
+ ns3_sim = 0;
+ return 0;
+}
+
+// initialize the NS3 interface and environment
+int ns3_initialize(void){
+ xbt_assert(!ns3_sim, "ns3 already initialized");
+ ns3_sim = new NS3Sim();
+ return 0;
+}
void * ns3_add_host(char * id)
{
ns3_nodes_t host = xbt_new0(s_ns3_nodes_t,1);
- XBT_INFO("Interface ns3 add host[%d] '%s'",number_of_nodes,id);
+ XBT_DEBUG("Interface ns3 add host[%d] '%s'",number_of_nodes,id);
Ptr<Node> node = CreateObject<Node> (0);
stack.Install(node);
nodes.Add(node);
host->node_num = number_of_nodes;
host->type = NS3_NETWORK_ELEMENT_HOST;
- host->data = node;
+ host->data = GetPointer(node);
number_of_nodes++;
return host;
}
void * ns3_add_host_cluster(char * id)
{
ns3_nodes_t host = xbt_new0(s_ns3_nodes_t,1);
- XBT_INFO("Interface ns3 add host[%d] '%s'",number_of_nodes,id);
+ XBT_DEBUG("Interface ns3 add host[%d] '%s'",number_of_nodes,id);
Ptr<Node> node = CreateObject<Node> (0);
stack.Install(node);
Cluster_nodes.Add(node);
void * ns3_add_router(char * id)
{
ns3_nodes_t router = xbt_new0(s_ns3_nodes_t,1);
- XBT_INFO("Interface ns3 add router[%d] '%s'",number_of_nodes,id);
+ XBT_DEBUG("Interface ns3 add router[%d] '%s'",number_of_nodes,id);
Ptr<Node> node = CreateObject<Node> (0);
stack.Install(node);
nodes.Add(node);
number_of_links++;
}
XBT_DEBUG("Number of nodes in Cluster_nodes: %d",Cluster_nodes.GetN());
-
}
void * ns3_add_AS(char * id)
{
- XBT_INFO("Interface ns3 add AS '%s'",id);
+ XBT_DEBUG("Interface ns3 add AS '%s'",id);
return NULL;
}
+static char* transformIpv4Address (Ipv4Address from){
+ std::stringstream sstream;
+ sstream << from ;
+ std::string s = sstream.str();
+ size_t size = s.size() + 1;
+ char* IPaddr = bprintf("%s",s.c_str());
+ return IPaddr;
+}
+
void * ns3_add_link(int src,int dst,char * bw,char * lat)
{
if(number_of_links == 1 ) {
char * adr = bprintf("%d.%d.0.0",number_of_networks,number_of_links);
address.SetBase (adr, "255.255.0.0");
XBT_DEBUG("\tInterface stack '%s'",adr);
+ free(adr);
interfaces.Add(address.Assign (netA));
- XBT_DEBUG(" ");
+ XBT_DEBUG("Have write '%s' for Node '%d'",transformIpv4Address(interfaces.GetAddress(interfaces.GetN()-2)),src);
+ xbt_dynar_set(IPV4addr,src,
+ transformIpv4Address(interfaces.GetAddress(interfaces.GetN()-2)));
+
+ XBT_DEBUG("Have write '%s' for Node '%d'",transformIpv4Address(interfaces.GetAddress(interfaces.GetN()-1)),dst);
+ xbt_dynar_set(IPV4addr,dst,
+ transformIpv4Address(interfaces.GetAddress(interfaces.GetN()-1)));
+
if(number_of_links == 255){
if(number_of_networks == 255)
xbt_die("Number of links and networks exceed 255*255");
void * ns3_end_platform(void)
{
- XBT_INFO("InitializeRoutes");
+ XBT_DEBUG("InitializeRoutes");
GlobalRouteManager::BuildGlobalRoutingDatabase();
GlobalRouteManager::InitializeRoutes();
-
- //TODO REMOVE ;)
- Ptr<Node> a = nodes.Get(0);
- Ptr<Node> b = nodes.Get(1);
- Ptr<Node> c = nodes.Get(2);
- Ptr<Node> d = nodes.Get(3);
-
- UdpEchoServerHelper echoServer (9);
-
- ApplicationContainer serverApps = echoServer.Install (a);
- serverApps.Start (Seconds (1.0));
- serverApps.Stop (Seconds (20.0));
-
- UdpEchoClientHelper echoClient (interfaces.GetAddress (0), 9);
- echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
- echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
- ApplicationContainer clientApps_b = echoClient.Install (b);
- clientApps_b.Start (Seconds (2.0));
- clientApps_b.Stop (Seconds (10.0));
-
- UdpEchoClientHelper echoClient2 (interfaces.GetAddress (0), 9);
- echoClient2.SetAttribute ("MaxPackets", UintegerValue (1));
- echoClient2.SetAttribute ("Interval", TimeValue (Seconds (1.)));
- echoClient2.SetAttribute ("PacketSize", UintegerValue (512));
- ApplicationContainer clientApps_c = echoClient2.Install (c);
- clientApps_c.Start (Seconds (3.0));
- clientApps_c.Stop (Seconds (10.0));
-
- UdpEchoClientHelper echoClient3 (interfaces.GetAddress (0), 9);
- echoClient3.SetAttribute ("MaxPackets", UintegerValue (1));
- echoClient3.SetAttribute ("Interval", TimeValue (Seconds (1.)));
- echoClient3.SetAttribute ("PacketSize", UintegerValue (256));
- ApplicationContainer clientApps_d = echoClient3.Install (d);
- clientApps_d.Start (Seconds (4.0));
- clientApps_d.Stop (Seconds (10.0));
-
- Simulator::Run ();
- Simulator::Destroy ();
-
- //HEEEEEEE
}
extern "C" {
#endif
+XBT_PUBLIC(int) ns3_finalize(void);
+XBT_PUBLIC(int) ns3_initialize(void);
+XBT_PUBLIC(int) ns3_create_flow(const char* a,const char *b,double start,u_int32_t TotalBytes,void * action);
+XBT_PUBLIC(void) ns3_simulator(double min);
+XBT_PUBLIC(double) ns3_time(void);
+XBT_PUBLIC(void*) ns3_get_socket_action(void *socket);
+XBT_PUBLIC(double) ns3_get_socket_remains(void *socket);
+XBT_PUBLIC(char) ns3_get_socket_is_finished(void *socket);
XBT_PUBLIC(void *) ns3_add_host(char * id);
XBT_PUBLIC(void *) ns3_add_host_cluster(char * id);
XBT_PUBLIC(void *) ns3_add_router(char * id);
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf/ns3/ns3_simulator.h"
+#include "xbt/dict.h"
+#include "xbt/log.h"
+
+using namespace ns3;
+using namespace std;
+
+static const uint32_t writeSize = 1024; // limit the amout of data to write
+uint8_t data[writeSize];
+xbt_dict_t dict_socket = NULL;
+
+NS3Sim SimulatorNS3;
+
+static void receive_callback(Ptr<Socket> localSocket);
+static void send_callback(Ptr<Socket> localSocket, uint32_t txSpace);
+static void StartFlow(Ptr<Socket> sock,
+ const char *to,
+ uint16_t port_number);
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simulator_ns3, surf,
+ "Logging specific to the SURF network NS3 module");
// Constructor.
NS3Sim::NS3Sim(){
//Destructor.
NS3Sim::~NS3Sim(){
}
+
+/*
+ * This function create a flow from src to dst
+ *
+ * Parameters
+ * src: node source
+ * dst: node destination
+ * port_number: The port number to use
+ * start: the time the communication start
+ * addr: ip address
+ * TotalBytes: number of bytes to transmit
+ */
+void NS3Sim::create_flow_NS3(
+ Ptr<Node> src,
+ Ptr<Node> dst,
+ uint16_t port_number,
+ double start,
+ const char *addr,
+ uint32_t TotalBytes,
+ void * action)
+{
+ if(!dict_socket) dict_socket = xbt_dict_new();
+ PacketSinkHelper sink ("ns3::TcpSocketFactory", InetSocketAddress (Ipv4Address::GetAny(), port_number));
+ sink.Install (dst);
+ Ptr<Socket> sock = Socket::CreateSocket (src, TypeId::LookupByName ("ns3::TcpSocketFactory"));
+ MySocket *mysocket = new MySocket();
+ mysocket->TotalBytes = TotalBytes;
+ mysocket->remaining = TotalBytes;
+ mysocket->sentBytes = 0;
+ mysocket->finished = 0;
+ mysocket->action = action;
+ xbt_dict_set(dict_socket,(const char*)&sock, mysocket,NULL);
+ sock->Bind(InetSocketAddress(port_number));
+ Simulator::Schedule (Seconds(start),&StartFlow, sock, addr, port_number);
+}
+
+void* NS3Sim::get_action_from_socket(void *socket){
+ return ((MySocket *)socket)->action;
+}
+
+char NS3Sim::get_finished(void *socket){
+ return ((MySocket *)socket)->finished;
+}
+
+double NS3Sim::get_remains_from_socket(void *socket){
+ return ((MySocket *)socket)->remaining;
+}
+
+void NS3Sim::simulator_stop(double min){
+ if(min > 0.0)
+ Simulator::Stop(Seconds(min));
+ else
+ Simulator::Stop();
+}
+
+void NS3Sim::simulator_start(void){
+ XBT_DEBUG("Start simulator");
+ Simulator::Run ();
+}
+
+static void receive_callback(Ptr<Socket> localSocket){
+ Address addr;
+ localSocket->GetSockName (addr);
+ InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr);
+ MySocket* mysocket = (MySocket*)xbt_dict_get_or_null(dict_socket,(char*)&localSocket);
+ mysocket->finished = 1;
+
+ //cout << "[" << Simulator::Now ().GetSeconds() << "] " << "Received [" << mysocket->TotalBytes << "bytes], from: " << iaddr.GetIpv4 () << " port: " << iaddr.GetPort () << endl;
+ std::stringstream sstream;
+ sstream << Simulator::Now ().GetSeconds();
+ std::string s = sstream.str();
+ size_t size = s.size() + 1;
+ char * time_sec = new char[ size ];
+ strncpy( time_sec, s.c_str(), size );
+ XBT_DEBUG("Stop simulator at %s seconds",time_sec);
+ Simulator::Stop();
+}
+
+static void send_callback(Ptr<Socket> localSocket, uint32_t txSpace){
+
+ Address addr;
+ localSocket->GetSockName (addr);
+ InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr);
+ MySocket* mysocket = (MySocket*)xbt_dict_get_or_null(dict_socket,(char*)&localSocket);
+ uint32_t totalBytes = mysocket->TotalBytes;
+ while ((mysocket->sentBytes) < totalBytes && localSocket->GetTxAvailable () > 0){
+ uint32_t toWrite = min ((mysocket->remaining), writeSize);
+ toWrite = min (toWrite, localSocket->GetTxAvailable ());
+ int amountSent = localSocket->Send (&data[0], toWrite, 0);
+
+ if(amountSent < 0)
+ return;
+ (mysocket->sentBytes) += amountSent;
+ (mysocket->remaining) -= amountSent;
+ //cout << "[" << Simulator::Now ().GetSeconds() << "] " << "Send one packet, remaining "<< mysocket->remaining << " bytes!" << endl;
+ }
+ if ((mysocket->sentBytes) >= totalBytes){
+ localSocket->Close();
+ }
+
+}
+
+static void StartFlow(Ptr<Socket> sock,
+ const char *to,
+ uint16_t port_number)
+{
+ InetSocketAddress serverAddr (to, port_number);
+
+ //cout << "[" << Simulator::Now().GetSeconds() << "] Starting flow to " << to << " using port " << port_number << endl;
+
+ sock->Connect(serverAddr);
+ sock->SetSendCallback (MakeCallback (&send_callback));
+ sock->SetRecvCallback (MakeCallback (&receive_callback));
+}
#ifdef __cplusplus
+#include "ns3/core-module.h"
+#include "ns3/helper-module.h"
+#include "ns3/simulator-module.h"
+#include "ns3/node-module.h"
+#include "ns3/helper-module.h"
+#include "ns3/global-routing-module.h"
+#include "ns3/tcp-socket-factory.h"
+
+using namespace ns3;
+using namespace std;
+
+struct MySocket{
+ uint32_t sentBytes;
+ uint32_t remaining;
+ uint32_t TotalBytes;
+ char finished;
+ void* action;
+};
+
//Simulator s;
class NS3Sim {
- NS3Sim();
- ~NS3Sim();
private:
public:
-
+ NS3Sim();
+ ~NS3Sim();
+ void create_flow_NS3(Ptr<Node> src,
+ Ptr<Node> dst,
+ uint16_t port_number,
+ double start,
+ const char *addr,
+ uint32_t TotalBytes,
+ void * action);
+ void simulator_stop(double min);
+ void simulator_start(void);
+ void* get_action_from_socket(void *socket);
+ double get_remains_from_socket(void *socket);
+ char get_finished(void *socket);
};
#endif /* __cplusplus */
if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
- if (!AX_surfxml_cluster_bb_bw) FAIL("Required attribute `bb_bw' not set for `cluster' element.");
- if (!AX_surfxml_cluster_bb_lat) FAIL("Required attribute `bb_lat' not set for `cluster' element.");
LEAVE; STag_surfxml_cluster();surfxml_pcdata_ix = 0; ENTER(E_surfxml_cluster);
}
"/>" {
if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
- if (!AX_surfxml_cluster_bb_bw) FAIL("Required attribute `bb_bw' not set for `cluster' element.");
- if (!AX_surfxml_cluster_bb_lat) FAIL("Required attribute `bb_lat' not set for `cluster' element.");
LEAVE; STag_surfxml_cluster(); surfxml_pcdata_ix = 0; ETag_surfxml_cluster(); popbuffer(); /* attribute */
switch (YY_START) {
case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
XBT_DEBUG("Looking for next action end");
xbt_dynar_foreach(model_list, iter, model) {
- XBT_DEBUG("Running for Resource [%s]", model->name);
- model_next_action_end = model->model_private->share_resources(NOW);
- XBT_DEBUG("Resource [%s] : next action end = %f",
- model->name, model_next_action_end);
- if (((min < 0.0) || (model_next_action_end < min))
- && (model_next_action_end >= 0.0))
- min = model_next_action_end;
+
+ if(strcmp(model->name,"network NS3") ){
+ XBT_DEBUG("Running for Resource [%s]", model->name);
+ model_next_action_end = model->model_private->share_resources(NOW);
+ XBT_DEBUG("Resource [%s] : next action end = %f",
+ model->name, model_next_action_end);
+ if (((min < 0.0) || (model_next_action_end < min))
+ && (model_next_action_end >= 0.0))
+ min = model_next_action_end;
+ }
}
+
+ XBT_DEBUG("Min for other resources : %f", min);
+
+
+ if(surf_network_model->name && !strcmp(surf_network_model->name,"network NS3")){
+ // run until min or next flow
+ model_next_action_end = surf_network_model->model_private->share_resources(min);
+ XBT_DEBUG("Min for NS3 : %f", model_next_action_end);
+ if ( ((min < 0.0) || (model_next_action_end < min)) && ( model_next_action_end >= 0.0 ))
+ min = model_next_action_end;
+ }
+
+
XBT_DEBUG("Next action end : %f", min);
XBT_DEBUG("Looking for next event");
char *cluster_availability_file = A_surfxml_cluster_availability_file;
char *cluster_state_file = A_surfxml_cluster_state_file;
char *host_id, *groups, *link_id = NULL;
- char *router_id, *link_backbone;
+ char *router_id;
char *availability_file = xbt_strdup(cluster_availability_file);
char *state_file = xbt_strdup(cluster_state_file);
SURFXML_END_TAG(router);
if(strcmp(cluster_bb_bw,"") && strcmp(cluster_bb_lat,"")){
- link_backbone = bprintf("%s_backbone", cluster_id);
+ char *link_backbone = bprintf("%s_backbone", cluster_id);
XBT_DEBUG("<link\tid=\"%s\" bw=\"%s\" lat=\"%s\"/>", link_backbone,cluster_bb_bw, cluster_bb_lat);
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
SURFXML_BUFFER_SET(link_state_file, "");
SURFXML_START_TAG(link);
SURFXML_END_TAG(link);
+ free(link_backbone);
}
XBT_DEBUG(" ");
#endif
free(router_id);
- if(strcmp(cluster_bb_bw,"") && strcmp(cluster_bb_lat,""))
- free(link_backbone);
xbt_dict_free(&patterns);
free(availability_file);
free(state_file);
maps_name = bprintf("/proc/%d/maps", (int) getpid());
maps = fopen(maps_name, "r");
- sscanf(addrs[i], "%lx", &addr);
- sprintf(maps_buff, "%#lx", addr);
-
- if (strcmp(addrs[i], maps_buff)) {
+ addr = strtol(addrs[i], &p, 16);
+ if (*p != '\0') {
XBT_CRITICAL("Cannot parse backtrace address '%s' (addr=%#lx)",
addrs[i], addr);
}
}
va_end(ev->ap);
va_end(ev->ap_copy);
-
-#ifdef _XBT_WIN32
- free(ev->buffer);
-#endif
}
/* NOTE:
*/ \r
\r
#include "win32_ucontext.h"\r
+\r
int getcontext(ucontext_t * ucp) \r
{\r
int ret;\r
int i;\r
va_list ap;\r
char *sp;\r
- \r
- /* Stack grows down */ \r
+\r
+ /* Stack grows down */\r
sp = (char *) (size_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size;\r
\r
/* Reserve stack space for the arguments (maximum possible: argc*(8 bytes per argument)) */ \r
- sp -= argc * 8;\r
+ sp -= argc * sizeof(void*);\r
if (sp < (char *) ucp->uc_stack.ss_sp) {\r
\r
/* errno = ENOMEM; */ \r
return -1;\r
}\r
\r
- /* Set the instruction and the stack pointer */ \r
- ucp->uc_mcontext.Eip = (unsigned long) func;\r
- ucp->uc_mcontext.Esp = (unsigned long) sp - 4;\r
- \r
+ /* Set the instruction and the stack pointer */\r
+ #ifdef I_X86_\r
+ ucp->uc_mcontext.Eip = (DWORD) func;\r
+ ucp->uc_mcontext.Esp = (DWORD) sp - sizeof(void*);\r
+ #endif\r
+ #ifdef _IA64_\r
+ # error "_IA64_"\r
+ #endif\r
+ #ifdef _AMD64_\r
+ ucp->uc_mcontext.Rip = (DWORD64) func;\r
+ ucp->uc_mcontext.Rsp = (DWORD64) sp - sizeof(void*);\r
+ #endif\r
+\r
/* Save/Restore the full machine context */ \r
ucp->uc_mcontext.ContextFlags = CONTEXT_FULL;\r
\r
/* Copy the arguments */ \r
va_start(ap, argc);\r
for (i = 0; i < argc; i++) {\r
- memcpy(sp, ap, 8);\r
- ap += 8;\r
- sp += 8;\r
+ memcpy(sp, ap, sizeof(void*));\r
+ ap += sizeof(void*);\r
+ sp += sizeof(void*);\r
}\r
va_end(ap);\r
return 0;\r
static void xbt_preinit(void)
{
-#ifdef HAVE_MMAP
+#ifdef MMALLOC_WANT_OVERIDE_LEGACY
mmalloc_preinit();
#endif
xbt_log_preinit();
xbt_os_thread_mod_postexit();
free(xbt_binary_name);
-#ifdef HAVE_MMAP
+#ifdef MMALLOC_WANT_OVERIDE_LEGACY
mmalloc_postexit();
#endif
}
return res;
}
-#ifdef SIMGRID_TEST
-#include "xbt/str.h"
-
-#define mytest(name, input, expected) \
- xbt_test_add(name); \
- d=xbt_str_split_quoted(input); \
- s=xbt_str_join(d,"XXX"); \
- xbt_test_assert(!strcmp(s,expected),\
- "Input (%s) leads to (%s) instead of (%s)", \
- input,s,expected);\
- free(s); \
- xbt_dynar_free(&d);
-
-XBT_TEST_SUITE("xbt_str", "String Handling");
-XBT_TEST_UNIT("xbt_str_split_quoted", test_split_quoted, "test the function xbt_str_split_quoted")
-{
- xbt_dynar_t d;
- char *s;
-
- mytest("Empty", "", "");
- mytest("Basic test", "toto tutu", "totoXXXtutu");
- mytest("Useless backslashes", "\\t\\o\\t\\o \\t\\u\\t\\u",
- "totoXXXtutu");
- mytest("Protected space", "toto\\ tutu", "toto tutu");
- mytest("Several spaces", "toto tutu", "totoXXXtutu");
- mytest("LTriming", " toto tatu", "totoXXXtatu");
- mytest("Triming", " toto tutu ", "totoXXXtutu");
- mytest("Single quotes", "'toto tutu' tata", "toto tutuXXXtata");
- mytest("Double quotes", "\"toto tutu\" tata", "toto tutuXXXtata");
- mytest("Mixed quotes", "\"toto' 'tutu\" tata", "toto' 'tutuXXXtata");
- mytest("Backslashed quotes", "\\'toto tutu\\' tata",
- "'totoXXXtutu'XXXtata");
- mytest("Backslashed quotes + quotes", "'toto \\'tutu' tata",
- "toto 'tutuXXXtata");
-
-}
-
-#define mytest_str(name, input, separator, expected) \
- xbt_test_add(name); \
- d=xbt_str_split_str(input, separator); \
- s=xbt_str_join(d,"XXX"); \
- xbt_test_assert(!strcmp(s,expected),\
- "Input (%s) leads to (%s) instead of (%s)", \
- input,s,expected);\
- free(s); \
- xbt_dynar_free(&d);
-
-XBT_TEST_UNIT("xbt_str_split_str", test_split_str, "test the function xbt_str_split_str")
-{
- xbt_dynar_t d;
- char *s;
-
- mytest_str("Empty string and separator", "", "", "");
- mytest_str("Empty string", "", "##", "");
- mytest_str("Empty separator", "toto", "", "toto");
- mytest_str("String with no separator in it", "toto", "##", "toto");
- mytest_str("Basic test", "toto##tutu", "##", "totoXXXtutu");
-}
-#endif /* SIMGRID_TEST */
-
/** @brief Join a set of strings as a single string */
char *xbt_str_join(xbt_dynar_t dyn, const char *sep)
{
/*
* Diff related functions
*/
+static XBT_INLINE int diff_get(xbt_matrix_t C, int i, int j)
+{
+ return (i == -1 || j == -1) ? 0 : xbt_matrix_get_as(C, i, j, int);
+}
+
static xbt_matrix_t diff_build_LCS(xbt_dynar_t da, xbt_dynar_t db)
{
xbt_matrix_t C =
xbt_matrix_new(xbt_dynar_length(da), xbt_dynar_length(db),
sizeof(int), NULL);
- unsigned long i, j;
+ int i, j;
/* Compute the LCS */
/*
- C = array(0..m, 0..n)
- for i := 0..m
- C[i,0] = 0
- for j := 1..n
- C[0,j] = 0
- for i := 1..m
- for j := 1..n
- if X[i] = Y[j]
- C[i,j] := C[i-1,j-1] + 1
- else:
- C[i,j] := max(C[i,j-1], C[i-1,j])
- return C[m,n]
+ function LCSLength(X[1..m], Y[1..n])
+ C = array(0..m, 0..n)
+ for i := 0..m
+ C[i,0] = 0
+ for j := 1..n
+ C[0,j] = 0
+ for i := 1..m
+ for j := 1..n
+ if X[i] = Y[j]
+ C[i,j] := C[i-1,j-1] + 1
+ else:
+ C[i,j] := max(C[i,j-1], C[i-1,j])
+ return C[m,n]
*/
- if (xbt_dynar_length(db) != 0)
- for (i = 0; i < xbt_dynar_length(da); i++)
- *((int *) xbt_matrix_get_ptr(C, i, 0)) = 0;
-
- if (xbt_dynar_length(da) != 0)
- for (j = 0; j < xbt_dynar_length(db); j++)
- *((int *) xbt_matrix_get_ptr(C, 0, j)) = 0;
-
- for (i = 1; i < xbt_dynar_length(da); i++)
- for (j = 1; j < xbt_dynar_length(db); j++) {
-
- if (!strcmp
- (xbt_dynar_get_as(da, i, char *),
- xbt_dynar_get_as(db, j, char *)))
- *((int *) xbt_matrix_get_ptr(C, i, j)) =
- xbt_matrix_get_as(C, i - 1, j - 1, int) + 1;
+ for (i = 0; i < (int)xbt_dynar_length(da); i++)
+ for (j = 0; j < (int)xbt_dynar_length(db); j++) {
+
+ if (!strcmp(xbt_dynar_get_as(da, i, char *),
+ xbt_dynar_get_as(db, j, char *)))
+ *((int *) xbt_matrix_get_ptr(C, i, j)) = diff_get(C, i - 1, j - 1) + 1;
else
- *((int *) xbt_matrix_get_ptr(C, i, j)) =
- max(xbt_matrix_get_as(C, i, j - 1, int),
- xbt_matrix_get_as(C, i - 1, j, int));
+ *((int *) xbt_matrix_get_ptr(C, i, j)) = max(diff_get(C, i, j - 1),
+ diff_get(C, i - 1, j));
}
return C;
}
char *topush;
/* Construct the diff
function printDiff(C[0..m,0..n], X[1..m], Y[1..n], i, j)
- if i > 0 and j > 0 and X[i] = Y[j]
- printDiff(C, X, Y, i-1, j-1)
- print " " + X[i]
- else
- if j > 0 and (i = 0 or C[i,j-1] >= C[i-1,j])
- printDiff(C, X, Y, i, j-1)
- print "+ " + Y[j]
- else if i > 0 and (j = 0 or C[i,j-1] < C[i-1,j])
- printDiff(C, X, Y, i-1, j)
- print "- " + X[i]
+ if i > 0 and j > 0 and X[i] = Y[j]
+ printDiff(C, X, Y, i-1, j-1)
+ print " " + X[i]
+ else
+ if j > 0 and (i = 0 or C[i,j-1] >= C[i-1,j])
+ printDiff(C, X, Y, i, j-1)
+ print "+ " + Y[j]
+ else if i > 0 and (j = 0 or C[i,j-1] < C[i-1,j])
+ printDiff(C, X, Y, i-1, j)
+ print "- " + X[i]
*/
if (i >= 0 && j >= 0 && !strcmp(xbt_dynar_get_as(da, i, char *),
topush = bprintf(" %s", xbt_dynar_get_as(da, i, char *));
xbt_dynar_push(res, &topush);
} else if (j >= 0 &&
- (i <= 0 || j == 0
- || xbt_matrix_get_as(C, i, j - 1,
- int) >= xbt_matrix_get_as(C, i - 1, j,
- int))) {
+ (i == -1 || diff_get(C, i, j - 1) >= diff_get(C, i - 1, j))) {
diff_build_diff(res, C, da, db, i, j - 1);
topush = bprintf("+ %s", xbt_dynar_get_as(db, j, char *));
xbt_dynar_push(res, &topush);
} else if (i >= 0 &&
- (j <= 0
- || xbt_matrix_get_as(C, i, j - 1, int) < xbt_matrix_get_as(C,
- i
- -
- 1,
- j,
- int)))
- {
+ (j == -1 || diff_get(C, i, j - 1) < diff_get(C, i - 1, j))) {
diff_build_diff(res, C, da, db, i - 1, j);
topush = bprintf("- %s", xbt_dynar_get_as(da, i, char *));
xbt_dynar_push(res, &topush);
- } else if (i <= 0 && j <= 0) {
- return;
- } else {
- THROWF(arg_error, 0, "Invalid values: i=%d, j=%d", i, j);
}
-
}
/** @brief Compute the unified diff of two strings */
-char *xbt_str_diff(char *a, char *b)
+char *xbt_str_diff(const char *a, const char *b)
{
xbt_dynar_t da = xbt_str_split(a, "\n");
xbt_dynar_t db = xbt_str_split(b, "\n");
+ xbt_matrix_t C;
+ xbt_dynar_t diff;
+ char *res;
+ size_t len;
- xbt_matrix_t C = diff_build_LCS(da, db);
- xbt_dynar_t diff = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
- char *res = NULL;
+ /* Clean empty lines at the end of da and db */
+ len = strlen(a);
+ if (len > 0 && a[len - 1] == '\n') {
+ char *str;
+ xbt_dynar_pop(da, &str);
+ free(str);
+ }
+ len = strlen(b);
+ if (len > 0 && b[len - 1] == '\n') {
+ char *str;
+ xbt_dynar_pop(db, &str);
+ free(str);
+ }
+
+ C = diff_build_LCS(da, db);
+ diff = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
diff_build_diff(diff, C, da, db, xbt_dynar_length(da) - 1,
xbt_dynar_length(db) - 1);
- /* Clean empty lines at the end */
- while (xbt_dynar_length(diff) > 0) {
- char *str;
- xbt_dynar_pop(diff, &str);
- if (str[0] == '\0' || !strcmp(str, " ")) {
- free(str);
- } else {
- xbt_dynar_push(diff, &str);
- break;
- }
- }
res = xbt_str_join(diff, "\n");
xbt_dynar_free(&da);
xbt_strbuff_free_container(buff);
return res;
}
+
+#ifdef SIMGRID_TEST
+#include "xbt/str.h"
+
+#define mytest(name, input, expected) \
+ xbt_test_add(name); \
+ d=xbt_str_split_quoted(input); \
+ s=xbt_str_join(d,"XXX"); \
+ xbt_test_assert(!strcmp(s,expected),\
+ "Input (%s) leads to (%s) instead of (%s)", \
+ input,s,expected);\
+ free(s); \
+ xbt_dynar_free(&d);
+
+XBT_TEST_SUITE("xbt_str", "String Handling");
+XBT_TEST_UNIT("xbt_str_split_quoted", test_split_quoted, "test the function xbt_str_split_quoted")
+{
+ xbt_dynar_t d;
+ char *s;
+
+ mytest("Empty", "", "");
+ mytest("Basic test", "toto tutu", "totoXXXtutu");
+ mytest("Useless backslashes", "\\t\\o\\t\\o \\t\\u\\t\\u",
+ "totoXXXtutu");
+ mytest("Protected space", "toto\\ tutu", "toto tutu");
+ mytest("Several spaces", "toto tutu", "totoXXXtutu");
+ mytest("LTriming", " toto tatu", "totoXXXtatu");
+ mytest("Triming", " toto tutu ", "totoXXXtutu");
+ mytest("Single quotes", "'toto tutu' tata", "toto tutuXXXtata");
+ mytest("Double quotes", "\"toto tutu\" tata", "toto tutuXXXtata");
+ mytest("Mixed quotes", "\"toto' 'tutu\" tata", "toto' 'tutuXXXtata");
+ mytest("Backslashed quotes", "\\'toto tutu\\' tata",
+ "'totoXXXtutu'XXXtata");
+ mytest("Backslashed quotes + quotes", "'toto \\'tutu' tata",
+ "toto 'tutuXXXtata");
+
+}
+
+#define mytest_str(name, input, separator, expected) \
+ xbt_test_add(name); \
+ d=xbt_str_split_str(input, separator); \
+ s=xbt_str_join(d,"XXX"); \
+ xbt_test_assert(!strcmp(s,expected),\
+ "Input (%s) leads to (%s) instead of (%s)", \
+ input,s,expected);\
+ free(s); \
+ xbt_dynar_free(&d);
+
+XBT_TEST_UNIT("xbt_str_split_str", test_split_str, "test the function xbt_str_split_str")
+{
+ xbt_dynar_t d;
+ char *s;
+
+ mytest_str("Empty string and separator", "", "", "");
+ mytest_str("Empty string", "", "##", "");
+ mytest_str("Empty separator", "toto", "", "toto");
+ mytest_str("String with no separator in it", "toto", "##", "toto");
+ mytest_str("Basic test", "toto##tutu", "##", "totoXXXtutu");
+}
+
+/* Last args are format string and parameters for xbt_test_add */
+#define mytest_diff(s1, s2, diff, ...) \
+ do { \
+ char *mytest_diff_res; \
+ xbt_test_add(__VA_ARGS__); \
+ mytest_diff_res = xbt_str_diff(s1, s2); \
+ xbt_test_assert(!strcmp(mytest_diff_res, diff), \
+ "Wrong output:\n--- got:\n%s\n--- expected:\n%s\n---", \
+ mytest_diff_res, diff); \
+ free(mytest_diff_res); \
+ } while (0)
+
+XBT_TEST_UNIT("xbt_str_diff", test_diff, "test the function xbt_str_diff")
+{
+ unsigned i;
+
+ /* Trivial cases */
+ mytest_diff("a", "a", " a", "1 word, no difference");
+ mytest_diff("a", "A", "- a\n+ A", "1 word, different");
+ mytest_diff("a\n", "a\n", " a", "1 line, no difference");
+ mytest_diff("a\n", "A\n", "- a\n+ A", "1 line, different");
+
+ /* Empty strings */
+ mytest_diff("", "", "", "empty strings");
+ mytest_diff("", "a", "+ a", "1 word, added");
+ mytest_diff("a", "", "- a", "1 word, removed");
+ mytest_diff("", "a\n", "+ a", "1 line, added");
+ mytest_diff("a\n", "", "- a", "1 line, removed");
+ mytest_diff("", "a\nb\nc\n", "+ a\n+ b\n+ c", "4 lines, all added");
+ mytest_diff("a\nb\nc\n", "", "- a\n- b\n- c", "4 lines, all removed");
+
+ /* Empty lines */
+ mytest_diff("\n", "\n", " ", "empty lines");
+ mytest_diff("", "\n", "+ ", "empty line, added");
+ mytest_diff("\n", "", "- ", "empty line, removed");
+
+ mytest_diff("a", "\na", "+ \n a", "empty line added before word");
+ mytest_diff("a", "a\n\n", " a\n+ ", "empty line added after word");
+ mytest_diff("\na", "a", "- \n a", "empty line removed before word");
+ mytest_diff("a\n\n", "a", " a\n- ", "empty line removed after word");
+
+ mytest_diff("a\n", "\na\n", "+ \n a", "empty line added before line");
+ mytest_diff("a\n", "a\n\n", " a\n+ ", "empty line added after line");
+ mytest_diff("\na\n", "a\n", "- \n a", "empty line removed before line");
+ mytest_diff("a\n\n", "a\n", " a\n- ", "empty line removed after line");
+
+ mytest_diff("a\nb\nc\nd\n", "\na\nb\nc\nd\n", "+ \n a\n b\n c\n d",
+ "empty line added before 4 lines");
+ mytest_diff("a\nb\nc\nd\n", "a\nb\nc\nd\n\n", " a\n b\n c\n d\n+ ",
+ "empty line added after 4 lines");
+ mytest_diff("\na\nb\nc\nd\n", "a\nb\nc\nd\n", "- \n a\n b\n c\n d",
+ "empty line removed before 4 lines");
+ mytest_diff("a\nb\nc\nd\n\n", "a\nb\nc\nd\n", " a\n b\n c\n d\n- ",
+ "empty line removed after 4 lines");
+
+ /* Missing newline at the end of one of the strings */
+ mytest_diff("a\n", "a", " a", "1 line, 1 word, no difference");
+ mytest_diff("a", "a\n", " a", "1 word, 1 line, no difference");
+ mytest_diff("a\n", "A", "- a\n+ A", "1 line, 1 word, different");
+ mytest_diff("a", "A\n", "- a\n+ A", "1 word, 1 line, different");
+
+ mytest_diff("a\nb\nc\nd", "a\nb\nc\nd\n", " a\n b\n c\n d",
+ "4 lines, no newline on first");
+ mytest_diff("a\nb\nc\nd\n", "a\nb\nc\nd", " a\n b\n c\n d",
+ "4 lines, no newline on second");
+
+ /* Four lines, all combinations of differences */
+ for (i = 0 ; i < (1U << 4) ; i++) {
+ char d2[4 + 1];
+ char s2[4 * 2 + 1];
+ char res[4 * 8 + 1];
+ char *pd = d2;
+ char *ps = s2;
+ char *pr = res;
+ unsigned j = 0;
+ while (j < 4) {
+ unsigned k;
+ for (/* j */ ; j < 4 && !(i & (1U << j)) ; j++) {
+ *pd++ = "abcd"[j];
+ ps += sprintf(ps, "%c\n", "abcd"[j]);
+ pr += sprintf(pr, " %c\n", "abcd"[j]);
+ }
+ for (k = j ; k < 4 && (i & (1U << k)) ; k++) {
+ *pd++ = "ABCD"[k];
+ ps += sprintf(ps, "%c\n", "ABCD"[k]);
+ pr += sprintf(pr, "- %c\n", "abcd"[k]);
+ }
+ for (/* j */ ; j < k ; j++) {
+ pr += sprintf(pr, "+ %c\n", "ABCD"[j]);
+ }
+ }
+ *pd = '\0';
+ *--pr = '\0'; /* strip last '\n' from expected result */
+ mytest_diff("a\nb\nc\nd\n", s2, res,
+ "compare (abcd) with changed (%s)", d2);
+ }
+
+ /* Subsets of four lines, do not test for empty subset */
+ for (i = 1 ; i < (1U << 4) ; i++) {
+ char d2[4 + 1];
+ char s2[4 * 2 + 1];
+ char res[4 * 8 + 1];
+ char *pd = d2;
+ char *ps = s2;
+ char *pr = res;
+ unsigned j = 0;
+ while (j < 4) {
+ for (/* j */ ; j < 4 && (i & (1U << j)) ; j++) {
+ *pd++ = "abcd"[j];
+ ps += sprintf(ps, "%c\n", "abcd"[j]);
+ pr += sprintf(pr, " %c\n", "abcd"[j]);
+ }
+ for (/* j */; j < 4 && !(i & (1U << j)) ; j++) {
+ pr += sprintf(pr, "- %c\n", "abcd"[j]);
+ }
+ }
+ *pd = '\0';
+ *--pr = '\0'; /* strip last '\n' from expected result */
+ mytest_diff("a\nb\nc\nd\n", s2, res,
+ "compare (abcd) with subset (%s)", d2);
+
+ for (pr = res ; *pr != '\0' ; pr++)
+ if (*pr == '-')
+ *pr = '+';
+ mytest_diff(s2, "a\nb\nc\nd\n", res,
+ "compare subset (%s) with (abcd)", d2);
+ }
+}
+
+#endif /* SIMGRID_TEST */
return;
}
/* Start all workers */
- XBT_INFO("Dopar for %ld elements", xbt_dynar_length(datas));
+ XBT_DEBUG("Dopar for %ld elements", xbt_dynar_length(datas));
xbt_dynar_foreach(datas, cursor, data) {
worker_data_t w = xbt_new0(s_worker_data_t, 1);
w->data = datas;
> ---- Test on string (ref to dynamic array) ----
> ---- Test on dynar containing integers ----
> ---- Test on empty dynar of integers ----
-> ---- Test on all possible struct having 3 fields (49 structs) ----
+> ---- Test on all possible struct having 4 fields (49 structs) ----
> ---- Test on homogeneous structure ----
> ---- Test on heterogeneous structure ----
> ---- Test on nested structures ----
p Check the marshaling facilities (trying to read the result of AIX)
-$ gras/datadesc/datadesc_usage --read ${srcdir:=.}/gras/datadesc/datadesc.big32_8_4 "--log=root.fmt:%m%n"
+$ gras/datadesc/datadesc_usage --read ${srcdir:=.}/gras/datadesc/datadesc.big32_8_4 --log=test.thres:verbose --log=structs.thres:info "--log=root.fmt:%m%n"
> Read from file datadesc.big32_8_4
+> This file was generated on big32_8_4 (7)
> ---- Test on integer ----
> ---- Test on float ----
> ---- Test on double ----
> ---- Test on string (ref to dynamic array) ----
> ---- Test on dynar containing integers ----
> ---- Test on empty dynar of integers ----
-> ---- Test on all possible struct having 3 fields (49 structs) ----
+> ---- Test on all possible struct having 4 fields (49 structs) ----
> ---- Test on homogeneous structure ----
> ---- Test on heterogeneous structure ----
> ---- Test on nested structures ----
p Check the marshaling facilities (trying to read the result of linux/x86)
-$ gras/datadesc/datadesc_usage --read ${srcdir:=.}/gras/datadesc/datadesc.little32_4 "--log=root.fmt:%m%n"
+$ gras/datadesc/datadesc_usage --read ${srcdir:=.}/gras/datadesc/datadesc.little32_4 --log=test.thres:verbose --log=structs.thres:info "--log=root.fmt:%m%n"
> Read from file datadesc.little32_4
+> This file was generated on little32_4 (2)
> ---- Test on integer ----
> ---- Test on float ----
> ---- Test on double ----
> ---- Test on string (ref to dynamic array) ----
> ---- Test on dynar containing integers ----
> ---- Test on empty dynar of integers ----
-> ---- Test on all possible struct having 3 fields (49 structs) ----
+> ---- Test on all possible struct having 4 fields (49 structs) ----
> ---- Test on homogeneous structure ----
> ---- Test on heterogeneous structure ----
> ---- Test on nested structures ----
p Check the marshaling facilities (trying to read the result of linux/amd64)
-$ $SG_TEST_EXENV gras/datadesc/datadesc_usage --read ${srcdir:=.}/gras/datadesc/datadesc.little64 "--log=root.fmt:%m%n" $ARGS
+$ $SG_TEST_EXENV gras/datadesc/datadesc_usage --read ${srcdir:=.}/gras/datadesc/datadesc.little64 --log=test.thres:verbose --log=structs.thres:info "--log=root.fmt:%m%n" $ARGS
> Read from file datadesc.little64
+> This file was generated on little64 (4)
> ---- Test on integer ----
> ---- Test on float ----
> ---- Test on double ----
> ---- Test on string (ref to dynamic array) ----
> ---- Test on dynar containing integers ----
> ---- Test on empty dynar of integers ----
-> ---- Test on all possible struct having 3 fields (49 structs) ----
+> ---- Test on all possible struct having 4 fields (49 structs) ----
> ---- Test on homogeneous structure ----
> ---- Test on heterogeneous structure ----
> ---- Test on nested structures ----
> ---- Test on string (ref to dynamic array) ----
> ---- Test on dynar containing integers ----
> ---- Test on empty dynar of integers ----
-> ---- Test on all possible struct having 3 fields (49 structs) ----
+> ---- Test on all possible struct having 4 fields (49 structs) ----
> ---- Test on homogeneous structure ----
> ---- Test on heterogeneous structure ----
> ---- Test on nested structures ----
> ---- Test on string (ref to dynamic array) ----
> ---- Test on dynar containing integers ----
> ---- Test on empty dynar of integers ----
-> ---- Test on all possible struct having 3 fields (49 structs) ----
+> ---- Test on all possible struct having 4 fields (49 structs) ----
> ---- Test on homogeneous structure ----
> ---- Test on heterogeneous structure ----
> ---- Test on nested structures ----
{ 1424420.11331 + (double) 1, 'w' + (char) 2,
1424420.11331 + (double) 3, 'w' + (char) 4 }, my_dcdc2;
XBT_INFO
- ("---- Test on all possible struct having 3 fields (49 structs) ----");
+ ("---- Test on all possible struct having 4 fields (49 structs) ----");
write_read("cccc", &my_cccc, &my_cccc2, sock, direction);
if (direction == READ || direction == RW) {
int failed = 0;
.$val[$l]."+(".$types[$l].")4}, my_${struct}2;\n";
}}}}
-print " XBT_INFO(\"---- Test on all possible struct having 3 fields (".(($max_i+1)*($max_j+1)*($max_k+1)*($max_l+1))." structs) ----\");\n";
+print " XBT_INFO(\"---- Test on all possible struct having 4 fields (".(($max_i+1)*($max_j+1)*($max_k+1)*($max_l+1))." structs) ----\");\n";
for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l) {
my $struct=$abrev[$i].$abrev[$j].$abrev[$k].$abrev[$l];
print " write_read(\"$struct\", &my_$struct, &my_${struct}2, sock,direction);\n";
add_executable(basic_parsing_test basic_parsing_test.c)
add_executable(is_router_test is_router_test.c)
add_executable(flatifier flatifier.c)
+if(NOT WIN32 AND NOT APPLE)
add_executable(evaluate_parse_time Evaluate_parse_time.c)
add_executable(evaluate_get_route_time Evaluate_get_route_time.c)
+endif(NOT WIN32 AND NOT APPLE)
### Add definitions for compile
-if(NOT WIN32)
+if(NOT WIN32 AND NOT APPLE)
target_link_libraries(evaluate_get_route_time simgrid m)
target_link_libraries(evaluate_parse_time simgrid m)
target_link_libraries(basic_parsing_test simgrid m)
target_link_libraries(is_router_test simgrid m)
target_link_libraries(flatifier simgrid m)
-else(NOT WIN32)
-target_link_libraries(evaluate_get_route_time simgrid)
-target_link_libraries(evaluate_parse_time simgrid)
+else(NOT WIN32 AND NOT APPLE)
target_link_libraries(basic_parsing_test simgrid)
target_link_libraries(is_router_test simgrid)
target_link_libraries(flatifier simgrid)
-endif(NOT WIN32)
-
+endif(NOT WIN32 AND NOT APPLE)
\ No newline at end of file