- 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;
+/* XP setups */
+const int buf_size = 0;
+const int msg_size = 50 * 1024;
+const int msg_amount = 2;
+const int sat_size = 1024 * 1024 * 10;
+const double min_duration = 1;
+
+static double XP(const char *bw1, const char *bw2,
+ const char *sat1, const char *sat2)
+{
+
+ double sec, bw, sec_sat, bw_sat;
+
+ gras_os_sleep(5.0); /* wait for the sensors to show up */
+ /* Test BW without saturation */
+ amok_bw_request(bw1, 4000, bw2, 4000,
+ buf_size, msg_size, msg_amount, min_duration, &sec, &bw);
+ XBT_INFO("BW(%s,%s) => %f sec, achieving %f Mb/s",
+ bw1, bw2, sec, (bw / 1024.0 / 1024.0));
+
+
+ /* Test BW with saturation */
+ amok_bw_saturate_start(sat1, 4000, sat2, 4000, sat_size, 60);
+ gras_os_sleep(1.0); /* let it start */
+
+ amok_bw_request(bw1, 4000, bw2, 4000,
+ buf_size, msg_size, msg_amount, min_duration, &sec_sat,
+ &bw_sat);
+ XBT_INFO("BW(%s,%s//%s,%s) => %f sec, achieving %f Mb/s", bw1, bw2, sat1,
+ sat2, sec, bw / 1024.0 / 1024.0);
+
+ amok_bw_saturate_stop(sat1, 4000, NULL, NULL);
+
+ if (bw_sat / bw < 0.7) {
+ XBT_INFO("THERE IS SOME INTERFERENCE !!!");