Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
GRAS_rl does not depends on MSG anymore.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 26 Feb 2005 18:19:37 +0000 (18:19 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 26 Feb 2005 18:19:37 +0000 (18:19 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1077 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras/chrono/Makefile.am
src/Makefile.am
src/gras/Virtu/rl_chrono.c [new file with mode: 0644]
src/gras/Virtu/sg_chrono.c [moved from src/gras/chrono.c with 96% similarity]
src/gras/gras.c

index 973e7ef..0cf0a9c 100644 (file)
@@ -1,6 +1,6 @@
 INCLUDES= -I$(top_srcdir)/include
 AM_CFLAGS=-g
-#TESTS= test_rl test_sg
+TESTS= test_rl test_sg
 EXTRA_DIST=chrono_deployment.xml
 
 # AUTOMAKE variable definition
index 5ce0c12..a088abf 100644 (file)
@@ -126,6 +126,7 @@ COMMON_SRC=\
 RL_SRC= \
   gras/Transport/rl_transport.c  gras/Transport/transport_plugin_tcp.c  gras/Transport/transport_plugin_file.c  \
   \
+  gras/Virtu/rl_chrono.c \
   gras/Virtu/rl_process.c        gras/Virtu/rl_time.c                   gras/Virtu/rl_conditional.c
 
 SG_SRC=  \
@@ -143,10 +144,9 @@ SG_SRC=  \
   msg/task.c msg/host.c msg/m_process.c msg/gos.c \
   msg/global.c msg/environment.c msg/deployment.c  \
   \
-  gras/chrono.c \
-  \
   gras/Transport/sg_transport.c  gras/Transport/transport_plugin_sg.c             \
   \
+  gras/Virtu/sg_chrono.c \
   gras/Virtu/sg_process.c        gras/Virtu/sg_time.c                 gras/Virtu/sg_conditional.c 
 
 gras/DataDesc/ddt_parse.yy.c: gras/DataDesc/ddt_parse.yy.l
diff --git a/src/gras/Virtu/rl_chrono.c b/src/gras/Virtu/rl_chrono.c
new file mode 100644 (file)
index 0000000..2fd4640
--- /dev/null
@@ -0,0 +1,41 @@
+/*     $Id$     */
+
+/* rl_chrono.c - code benchmarking for emulation (fake for real life)       */
+
+/* Copyright (c) 2005 Martin Quinson, Arnaud Legrand. 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 "xbt/sysdep.h"
+#include "xbt/dict.h"
+#include "gras/chrono.h"
+#include "msg/msg.h"
+#include "portable.h"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(chrono,gras,"Benchmarking used code");
+
+
+int gras_bench_always_begin(const char *location, int line)
+{
+  return 0;
+}
+
+int gras_bench_always_end(void)
+{
+  return 0;
+}
+
+int gras_bench_once_begin(const char *location, int line)
+{
+  return 0;
+}
+
+int gras_bench_once_end(void)
+{
+  return 0;
+}
+
+void gras_chrono_init(void)
+{
+}
similarity index 96%
rename from src/gras/chrono.c
rename to src/gras/Virtu/sg_chrono.c
index e0c46c0..7add5bb 100644 (file)
@@ -1,6 +1,6 @@
 /*     $Id$     */
 
-/* chrono.c - code benchmarking for emulation                               */
+/* sg_chrono.c - code benchmarking for emulation                            */
 
 /* Copyright (c) 2005 Martin Quinson, Arnaud Legrand. All rights reserved.  */
 
@@ -32,7 +32,7 @@ static double sys_time(void) {
 static double timer = 0.0;
 static int benchmarking = 0;
 static xbt_dict_t benchmark_set = NULL;
-static double reference = .01019;
+static double reference = .00523066250047108838;
 static double duration = 0.0;
 static const char* __location__ = NULL;
 
index 0a7ef53..03af67b 100644 (file)
@@ -29,7 +29,7 @@ void gras_init(int *argc,char **argv, const char *defaultlog) {
   /* First initialize the XBT */
   xbt_init_defaultlog(argc,argv,defaultlog);
    
-  /*gras_chrono_init(); * FIXME: Arnaud, WTF?? It depends on MSG!! */
+  gras_chrono_init();
   /* module registrations: 
    *    - declare process specific data we need (without creating them) 
    */