Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 257912
Collapse All | Expand All

(-)vast-c++.orig/include/typedef.h (-2 / +3 lines)
Lines 23-28 Link Here
23
#define TYPEDEF_H
23
#define TYPEDEF_H
24
24
25
#include <string.h> // memcpy
25
#include <string.h> // memcpy
26
#include <stdlib.h>
26
#include <math.h>
27
#include <math.h>
27
#include "config.h"
28
#include "config.h"
28
29
Lines 47-53 Link Here
47
} vec3_t;
48
} vec3_t;
48
49
49
// common message types
50
// common message types
50
typedef enum VAST_Message
51
enum VAST_Message
51
{
52
{
52
    DISCONNECT = 0,         // disconnection without action: leaving overlay or no longer overlapped
53
    DISCONNECT = 0,         // disconnection without action: leaving overlay or no longer overlapped
53
    ID,                     // id for the host
54
    ID,                     // id for the host
Lines 55-61 Link Here
55
};
56
};
56
57
57
// bandwidth type define
58
// bandwidth type define
58
typedef enum bandwidth_type_t
59
enum bandwidth_type_t
59
{
60
{
60
    BW_UNKNOWN = 0,
61
    BW_UNKNOWN = 0,
61
    BW_UPLOAD, 
62
    BW_UPLOAD, 
(-)vast-c++.orig/include/vastutil.h (-1 / +1 lines)
Lines 30-36 Link Here
30
#define _VAST_UTIL_H
30
#define _VAST_UTIL_H
31
31
32
#include "config.h"
32
#include "config.h"
33
33
#include <string.h> //memcpy
34
#include <string>
34
#include <string>
35
#include <map>
35
#include <map>
36
#include <vector>
36
#include <vector>
(-)vast-c++.orig/sim/VASTsim/statistics.h (-12 / +12 lines)
Lines 261-267 Link Here
261
        //
261
        //
262
        fprintf (_fp, "Data Structure Sizes (in bytes)\n");
262
        fprintf (_fp, "Data Structure Sizes (in bytes)\n");
263
        fprintf (_fp, "-------------------------------\n");
263
        fprintf (_fp, "-------------------------------\n");
264
        fprintf (_fp, "id_t:%d aoi_t:%d msgtype_t:%d timestamp_t:%d Point:%d Node:%d Addr:%d\n\n\n", sizeof(VAST::id_t), sizeof(aoi_t), sizeof(msgtype_t), sizeof(timestamp_t), sizeof(Position), sizeof(Node), sizeof(Addr));
264
        fprintf (_fp, "id_t:%ld aoi_t:%ld msgtype_t:%ld timestamp_t:%ld Point:%ld Node:%ld Addr:%ld\n\n\n", sizeof(VAST::id_t), sizeof(aoi_t), sizeof(msgtype_t), sizeof(timestamp_t), sizeof(Position), sizeof(Node), sizeof(Addr));
265
        
265
        
266
        fprintf (_fp, "Simulation Parameters\n");
266
        fprintf (_fp, "Simulation Parameters\n");
267
        fprintf (_fp, "---------------------\n");
267
        fprintf (_fp, "---------------------\n");
Lines 391-412 Link Here
391
        fprintf (_fp, "%3.4f%%\t", (float)consistency * 100);
391
        fprintf (_fp, "%3.4f%%\t", (float)consistency * 100);
392
392
393
        // Send / Recv
393
        // Send / Recv
394
        fprintf (_fp, "%6d %-6d  ", total_send/num_nodes, max_send_per_sec);
394
        fprintf (_fp, "%6d %-6ld  ", total_send/num_nodes, max_send_per_sec);
395
        fprintf (_fp, "%6d %-6d  ", total_recv/num_nodes, max_recv_per_sec);
395
        fprintf (_fp, "%6d %-6ld  ", total_recv/num_nodes, max_recv_per_sec);
396
396
397
		// added by yuli ====================================================
397
		// added by yuli ====================================================
398
398
399
		// Defalted Send / Recv
399
		// Defalted Send / Recv
400
        if (_para.VAST_MODEL == VAST_MODEL_MULTICAST)
400
        if (_para.VAST_MODEL == VAST_MODEL_MULTICAST)
401
        {
401
        {
402
            fprintf (_fp, "%8d %-8d  ", total_def_send/num_nodes, max_def_send_per_sec);
402
            fprintf (_fp, "%8ld %-8ld  ", total_def_send/num_nodes, max_def_send_per_sec);
403
            fprintf (_fp, "%8d %-8d  ", total_def_recv/num_nodes, max_def_recv_per_sec);
403
            fprintf (_fp, "%8ld %-8ld  ", total_def_recv/num_nodes, max_def_recv_per_sec);
404
        }
404
        }
405
405
406
		// ==================================================================
406
		// ==================================================================
407
407
408
		// RS
408
		// RS
409
        fprintf (_fp, "%3.3f %-3d  ", (_recovery_count > 0 ? (double)_recovery_steps/(double)_recovery_count : 0), _max_RS);
409
        fprintf (_fp, "%3.3f %-3ld  ", (_recovery_count > 0 ? (double)_recovery_steps/(double)_recovery_count : 0), _max_RS);
410
        
410
        
411
        // drift distance
411
        // drift distance
412
        fprintf (_fp, "%3.3f %-3d  ", (double)_total_drift / (double)_drift_nodes, (int)_max_drift);        
412
        fprintf (_fp, "%3.3f %-3d  ", (double)_total_drift / (double)_drift_nodes, (int)_max_drift);        
Lines 418-430 Link Here
418
        fprintf (_fp, "%3.3f %-3d  ", (double)total_CN/(double)num_nodes, max_CN);
418
        fprintf (_fp, "%3.3f %-3d  ", (double)total_CN/(double)num_nodes, max_CN);
419
419
420
        // AN
420
        // AN
421
        fprintf (_fp, "%3.3f %-3d  ", (double)_total_AN_visible/(double)num_samples, _max_AN);
421
        fprintf (_fp, "%3.3f %-3ld  ", (double)_total_AN_visible/(double)num_samples, _max_AN);
422
        
422
        
423
        // RC
423
        // RC
424
        fprintf (_fp, "%3d %3d %3.2f%%  ", _recovery_count, _inconsistent_count, (_inconsistent_count > 0 ? ((double)_recovery_count/(double)_inconsistent_count*100): 0));
424
        fprintf (_fp, "%3ld %3ld %3.2f%%  ", _recovery_count, _inconsistent_count, (_inconsistent_count > 0 ? ((double)_recovery_count/(double)_inconsistent_count*100): 0));
425
                             
425
                             
426
        // TC actual data
426
        // TC actual data
427
        fprintf (_fp, " %7d %7d\n", _total_AN_visible, _total_AN_actual);
427
        fprintf (_fp, " %7ld %7ld\n", _total_AN_visible, _total_AN_actual);
428
428
429
        // store accumulated data
429
        // store accumulated data
430
        _AN_visible_accumulated += _total_AN_visible;
430
        _AN_visible_accumulated += _total_AN_visible;
Lines 478-484 Link Here
478
        double consistency = (double)_AN_visible_accumulated / (double)_AN_actual_accumulated;
478
        double consistency = (double)_AN_visible_accumulated / (double)_AN_actual_accumulated;
479
479
480
        fprintf (_fp, "\n\nSummary\n-------\n");        
480
        fprintf (_fp, "\n\nSummary\n-------\n");        
481
        fprintf (_fp, "Total elapsed time (seconds): %d  stablized_steps: %d  run_steps: %d\n", (int)(time (NULL)-_starttime), _steps_stablized, _steps);        
481
        fprintf (_fp, "Total elapsed time (seconds): %d  stablized_steps: %ld  run_steps: %ld\n", (int)(time (NULL)-_starttime), _steps_stablized, _steps);        
482
        fprintf (_fp, "Topology Consistency (overall):         %3.4f%%\n", consistency * 100);
482
        fprintf (_fp, "Topology Consistency (overall):         %3.4f%%\n", consistency * 100);
483
        consistency = (double)(_AN_visible_accumulated-_AN_visible_first_interval) / (double)(_AN_actual_accumulated - _AN_actual_first_interval);
483
        consistency = (double)(_AN_visible_accumulated-_AN_visible_first_interval) / (double)(_AN_actual_accumulated - _AN_actual_first_interval);
484
        fprintf (_fp, "Topology Consistency (after stablized): %3.4f%%\n\n", consistency * 100);
484
        fprintf (_fp, "Topology Consistency (after stablized): %3.4f%%\n\n", consistency * 100);
Lines 490-496 Link Here
490
        // transmission size stat
490
        // transmission size stat
491
        //
491
        //
492
        
492
        
493
        fprintf (_fp, "\ntransmission size (total # of bytes over %d steps)\n\n", _steps);
493
        fprintf (_fp, "\ntransmission size (total # of bytes over %ld steps)\n\n", _steps);
494
		if (_para.VAST_MODEL == VAST_MODEL_DIRECT)
494
		if (_para.VAST_MODEL == VAST_MODEL_DIRECT)
495
			fprintf (_fp, "             send       recv   DISCONNCT       ID    QUERY    HELLO       EN     MOVE   MOVE_B     NODE  OVERCAP  PAYLOAD\n");
495
			fprintf (_fp, "             send       recv   DISCONNCT       ID    QUERY    HELLO       EN     MOVE   MOVE_B     NODE  OVERCAP  PAYLOAD\n");
496
		else if (_para.VAST_MODEL == VAST_MODEL_MULTICAST)
496
		else if (_para.VAST_MODEL == VAST_MODEL_MULTICAST)
Lines 499-505 Link Here
499
		for (i=0; i<(int)_simnodes.size (); i++)
499
		for (i=0; i<(int)_simnodes.size (); i++)
500
        {
500
        {
501
            SimNode *node = _simnodes[i];
501
            SimNode *node = _simnodes[i];
502
            fprintf (_fp, "[%4d] %10d %10d\t%s\n", (int)node->get_id (), node->accumulated_send (), node->accumulated_recv (), node->vnode->getstat ());
502
            fprintf (_fp, "[%4d] %10ld %10ld\t%s\n", (int)node->get_id (), node->accumulated_send (), node->accumulated_recv (), node->vnode->getstat ());
503
        }
503
        }
504
504
505
        //
505
        //
(-)vast-c++.orig/sim/VASTsim_console/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
.PHONY: all noace
4
.PHONY: all noace
5
5
6
LIBS_COMMON = -lvastsim -lvast -lvastutil -lz
6
LIBS_COMMON = -lvastsim -lvast -lvastutil -lz -lpthread
7
LIBS_ACE    = -lACE
7
LIBS_ACE    = -lACE
8
ifeq ($(TARGET),noace)
8
ifeq ($(TARGET),noace)
9
    LIBS = $(LIBS_COMMON) 
9
    LIBS = $(LIBS_COMMON) 
(-)vast-c++.orig/VAST/net_ace_acceptor.h (-1 / +1 lines)
Lines 69-75 Link Here
69
     
69
     
70
        // handle can be used to differentiate if the same handler
70
        // handle can be used to differentiate if the same handler
71
        // is used for handling multiple connections, not used here
71
        // is used for handling multiple connections, not used here
72
        ACE_UNUSED_ARG (handle);
72
        //ACE_UNUSED_ARG (handle);
73
        
73
        
74
        // create new handler
74
        // create new handler
75
        net_ace_handler *handler;
75
        net_ace_handler *handler;
(-)vast-c++.orig/VAST/vast_dc.h (-1 / +1 lines)
Lines 53-59 Link Here
53
#define STATE_OVERLAPPED            (0x01)
53
#define STATE_OVERLAPPED            (0x01)
54
#define STATE_ENCLOSED              (0x02)
54
#define STATE_ENCLOSED              (0x02)
55
55
56
    typedef enum VAST_DC_Message
56
    enum VAST_DC_Message
57
    {
57
    {
58
        DC_QUERY = 10,          // find out host to contact for initial neighbor list
58
        DC_QUERY = 10,          // find out host to contact for initial neighbor list
59
        DC_HELLO,              // initial connection request
59
        DC_HELLO,              // initial connection request
(-)vast-c++.orig/VAST/vast_mc.h (-1 / +1 lines)
Lines 16-22 Link Here
16
#define MAX_DROP_COUNT			4	// # of time-steps to disconnect a non-overlapped neighbor
16
#define MAX_DROP_COUNT			4	// # of time-steps to disconnect a non-overlapped neighbor
17
#define MAX_HOP_COUNT_BUF		2
17
#define MAX_HOP_COUNT_BUF		2
18
18
19
	typedef enum VAST_MC_Message
19
	enum VAST_MC_Message
20
    {
20
    {
21
        MC_QUERY = 30,			// find out host to contact for initial neighbor list
21
        MC_QUERY = 30,			// find out host to contact for initial neighbor list
22
		MC_INITLIST,			// get initial neighbor list
22
		MC_INITLIST,			// get initial neighbor list

Return to bug 257912