From adf2267be6a79da9c072ba8e0bd45092593518eb Mon Sep 17 00:00:00 2001 From: mquinson Date: Mon, 29 May 2006 09:25:17 +0000 Subject: [PATCH] kill old cruft moved since a looooong time to a better place git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2303 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/saturate/.cvsignore | 2 - examples/saturate/Makefile.am | 25 --- examples/saturate/deploy_old.txt | 34 --- examples/saturate/saturate.c | 258 ---------------------- examples/saturate/saturate_deployment.txt | 5 - examples/saturate/test_rl | 3 - examples/saturate/test_sg.in | 5 - 7 files changed, 332 deletions(-) delete mode 100644 examples/saturate/.cvsignore delete mode 100644 examples/saturate/Makefile.am delete mode 100644 examples/saturate/deploy_old.txt delete mode 100644 examples/saturate/saturate.c delete mode 100644 examples/saturate/saturate_deployment.txt delete mode 100755 examples/saturate/test_rl delete mode 100755 examples/saturate/test_sg.in diff --git a/examples/saturate/.cvsignore b/examples/saturate/.cvsignore deleted file mode 100644 index 8d9dbb09bd..0000000000 --- a/examples/saturate/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.deps .libs Makefile Makefile.in _*.c saturate_sensor saturate_maestro saturate_simulator -test_sg diff --git a/examples/saturate/Makefile.am b/examples/saturate/Makefile.am deleted file mode 100644 index 0ade8928e3..0000000000 --- a/examples/saturate/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -INCLUDES= -I$(top_srcdir)/include -AM_CFLAGS=-g - -TESTS=test_rl test_sg -EXTRA_DIST=saturate_deployment.txt $(TESTS) - -check_PROGRAMS=saturate_simulator saturate_sensor saturate_maestro - -saturate_simulator_SOURCES=_saturate_simulator.c saturate.c -saturate_simulator_LDADD= $(top_builddir)/src/libsimgrid.la - -saturate_sensor_SOURCES= _saturate_sensor.c saturate.c -saturate_maestro_SOURCES= _saturate_maestro.c saturate.c - -saturate_sensor_LDADD= $(top_srcdir)/src/libgras.la # $(top_srcdir)/src/modules/libgrasmodules.a -saturate_maestro_LDADD= $(top_srcdir)/src/libgras.la # $(top_srcdir)/src/modules/libgrasmodules.a - -# Take care of generatated sources -NAME=saturate -PROCESSES=sensor maestro -include $(top_srcdir)/examples/temps-gras-stub.mk - - - - diff --git a/examples/saturate/deploy_old.txt b/examples/saturate/deploy_old.txt deleted file mode 100644 index 88a1b07a61..0000000000 --- a/examples/saturate/deploy_old.txt +++ /dev/null @@ -1,34 +0,0 @@ -61 sensor -62 sensor -63 sensor -69 sensor -70 sensor -77 sensor -81 sensor -83 sensor -85 sensor -87 sensor -88 sensor -95 sensor -98 sensor -107 sensor -109 sensor -111 sensor -112 sensor -121 sensor -124 sensor -125 sensor -131 sensor -145 sensor -150 sensor -156 sensor -157 sensor -162 sensor -165 sensor -168 sensor -169 sensor -170 sensor -175 sensor -177 sensor -178 sensor -109 maestro 95 4000 112 4000 125 4000 87 4000 diff --git a/examples/saturate/saturate.c b/examples/saturate/saturate.c deleted file mode 100644 index e19549f716..0000000000 --- a/examples/saturate/saturate.c +++ /dev/null @@ -1,258 +0,0 @@ -/* $Id$ */ - -/* saturate - link saturation demo of GRAS features */ - -/* Copyright (c) 2003 Martin Quinson. 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 -#include -#include -#include - -#include - -XBT_LOG_NEW_DEFAULT_CATEGORY(saturate,"Messages specific to this example"); - -/* ********************************************************************** - * Sensor code - * **********************************************************************/ - -/* Global private data */ -typedef struct { - gras_socket_t *sock; -} sensor_data_t; - -/* Function prototypes */ -int sensor (int argc,char *argv[]); - -int sensor (int argc,char *argv[]) { - xbt_error_t errcode; - sensor_data_t *g=gras_userdata_new(sensor_data_t); - - if ((errcode=gras_socket_server(4000,&(g->sock)))) { - CRITICAL1("Sensor: Error %s encountered while opening the server socket",xbt_error_name(errcode)); - return 1; - } - - if (grasbw_register_messages()) { - gras_socket_close(g->sock); - return 1; - } - - while (1) { - if ((errcode=gras_msg_handle(60.0)) && errcode != timeout_error) { - CRITICAL1("Sensor: Error '%s' while handling message", - xbt_error_name(errcode)); - } - } - - gras_os_sleep(5,0); - gras_socket_close(g->sock); - - return 0; -} - -/* ********************************************************************** - * Maestro code - * **********************************************************************/ - -/* Global private data */ -typedef struct { - gras_socket_t *sock; -} maestro_data_t; - -/* Function prototypes */ -int maestro (int argc,char *argv[]); -double XP(const char *bw1, const char *bw2, const char *sat1, const char *sat2); - -double XP(const char *bw1, const char *bw2, const char *sat1, const char *sat2) { - xbt_error_t errcode; - int bufSize=32 * 1024; - int expSize=64 * 1024; - int msgSize=64 * 1024; - int satSize=msgSize * 10; - double sec, bw, sec_sat,bw_sat; - - if ((errcode=grasbw_request(bw1,4000,bw2,4000,bufSize,expSize,msgSize,&sec,&bw))) { - fprintf(stderr,"MAESTRO: Error %s encountered while doing the test\n",xbt_error_name(errcode)); - return -1; - } - - fprintf(stderr,"MAESTRO: BW(%s,%s) => %f sec, achieving %f Mb/s\n",bw1,bw2,sec,bw); - - if ((errcode=grasbw_saturate_start(sat1,4000,sat2,4000,satSize,60))) { - fprintf(stderr,"MAESTRO: Error %s encountered while starting saturation\n", - xbt_error_name(errcode)); - return -1; - } - gras_os_sleep(1,0); - if ((errcode=grasbw_request(bw1,4000,bw2,4000,bufSize,expSize,msgSize,&sec_sat,&bw_sat))) { - fprintf(stderr,"MAESTRO: Error %s encountered while doing the test\n",xbt_error_name(errcode)); - return -1; - } - - fprintf(stderr,"MAESTRO: BW(%s,%s//%s,%s) => %f sec, achieving %f Mb/s\n", - bw1,bw2,sat1,sat2,sec_sat,bw_sat); - - if ((errcode=grasbw_saturate_stop(sat1,4000,sat2,4000))) { - fprintf(stderr,"MAESTRO: Error %s encountered while stopping saturation\n", - xbt_error_name(errcode)); - return -1; - } - - if (bw_sat/bw < 0.7) { - fprintf(stderr,"MAESTRO: THERE IS SOME INTERFERENCE !!!\n"); - } - if (bw/bw_sat < 0.7) { - fprintf(stderr,"MAESTRO: THERE IS SOME INTERFERENCE (and Im a cretin) !!!\n"); - } - return bw_sat/bw; - -} - -//#define MAXHOSTS 33 -#define MAXHOSTS 4 - -int maestro(int argc,char *argv[]) { - int bufSize=32 * 1024; - int expSize= 1024 * 1024; - int msgSize=expSize; - int satSize=msgSize * 100; - double dummy,beginSim; - xbt_error_t errcode; - maestro_data_t *g=gras_userdata_new(maestro_data_t); - // const char *hosts[MAXHOSTS] = { "61", "62", "63", "69", "70", "77", "81", "83", "85", "87", "88", "95", "98", "107", "109", "111", "112", "121", "124", "125", "131", "145", "150", "156", "157", "162", "165", "168", "169", "170", "175", "177", "178" }; - const char *hosts[MAXHOSTS] = { "A", "B", "C", "D" }; - - double bw[MAXHOSTS][MAXHOSTS]; - double bw_sat[MAXHOSTS][MAXHOSTS]; - - int a,b,c,d,begin; - - if ((errcode=gras_socket_server(4000,&(g->sock)))) { - fprintf(stderr,"MAESTRO: Error %s encountered while opening the server socket\n",xbt_error_name(errcode)); - return 1; - } - - if (grasbw_register_messages()) { - gras_socket_close(g->sock); - return 1; - } - - begin=time(NULL); - beginSim=gras_os_time(); - for (a=0; a %f (%f vs %f)%s\n", - gras_os_time(), - hosts[c],hosts[d],hosts[a],hosts[b], - bw_sat[c][d]/bw[c][d],bw[c][d],bw_sat[c][d], - - (bw_sat[c][d]/bw[c][d] < 0.7) ? " THERE IS SOME INTERFERENCE !!!": - ((bw[c][d]/bw_sat[c][d] < 0.7) ? " THERE IS SOME INTERFERENCE (and Im a cretin) !!!": - "")); - } - } - - if ((errcode=grasbw_saturate_stop(hosts[a],4000,hosts[b],4000))) { - fprintf(stderr,"MAESTRO: Error %s encountered while stopping saturation\n", - xbt_error_name(errcode)); - return -1; - } - fprintf(stderr,"Did an iteration on saturation pair in %ld sec (%.2f simulated sec)\n", - time(NULL)-begin, gras_os_time()-beginSim); - } - } - - gras_os_sleep(5,0); - exit(0); -#if 0 - return 0; - /* start saturation */ - fprintf(stderr,"MAESTRO: Start saturation with size %d\n",msgSize); - if ((errcode=grasbw_saturate_start(argv[5],atoi(argv[6]),argv[7],atoi(argv[8]),msgSize*10,60))) { - fprintf(stderr,"MAESTRO: Error %s encountered while starting saturation\n", - xbt_error_name(errcode)); - return 1; - } - fprintf(stderr,"MAESTRO: Saturation started\n"); - gras_os_sleep(5,0); - - /* test with saturation */ - if ((errcode=grasbw_request(argv[1],atoi(argv[2]),argv[3],atoi(argv[4]), - bufSize,expSize,msgSize,&sec,&bw))) { - fprintf(stderr,"MAESTRO: Error %s encountered while doing the test\n",xbt_error_name(errcode)); - return 1; - } - - fprintf(stderr,"MAESTRO: Experience3 (%d ko in msgs of %d ko with saturation) took %f sec, achieving %f Mb/s\n", - expSize/1024,msgSize/1024, - sec,bw); - - /* stop saturation */ - if ((errcode=grasbw_saturate_stop(argv[5],atoi(argv[6]),argv[7],atoi(argv[8])))) { - fprintf(stderr,"MAESTRO: Error %s encountered while stopping saturation\n", - xbt_error_name(errcode)); - return 1; - } - - /* test without saturation */ - if ((errcode=grasbw_request(argv[1],atoi(argv[2]),argv[3],atoi(argv[4]), - bufSize,expSize,msgSize,&sec,&bw))) { - fprintf(stderr,"MAESTRO: Error %s encountered while doing the test\n",xbt_error_name(errcode)); - return 1; - } - - fprintf(stderr,"MAESTRO: Experience4 (%d ko in msgs of %d ko, without saturation) took %f sec, achieving %f Mb/s\n", - expSize/1024,msgSize/1024, - sec,bw); - - gras_os_sleep(5,0); -#endif - gras_socket_close(g->sock); - - return 0; -} diff --git a/examples/saturate/saturate_deployment.txt b/examples/saturate/saturate_deployment.txt deleted file mode 100644 index 678c4e5188..0000000000 --- a/examples/saturate/saturate_deployment.txt +++ /dev/null @@ -1,5 +0,0 @@ -A sensor -B sensor -C sensor -D sensor -Master maestro diff --git a/examples/saturate/test_rl b/examples/saturate/test_rl deleted file mode 100755 index 14cecb71f8..0000000000 --- a/examples/saturate/test_rl +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh -./saturate_server 4000 $@& -./saturate_client 127.0.0.1 4000 $@ diff --git a/examples/saturate/test_sg.in b/examples/saturate/test_sg.in deleted file mode 100755 index b80ebfd5da..0000000000 --- a/examples/saturate/test_sg.in +++ /dev/null @@ -1,5 +0,0 @@ -#! @BASH@ -if test -x ./saturate_simulator ; then - exec ./saturate_simulator @srcdir@/../WAN_3.platform.txt @srcdir@/saturate_deployment.txt -fi -exit 77 -- 2.20.1