Download - Glomosim Simulator
![Page 1: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/1.jpg)
1
Network Simulation Using GlomoSim
Presented ByAkarapon Kunpisut
![Page 2: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/2.jpg)
2
Outline
Introduction to GlomosimGlomosim StructureEditing the codeInstallationConclusion
![Page 3: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/3.jpg)
3
Introduction
3 methods to analysis network protocolMathematical AnalysisNetwork Simulator (NS, GloMoSim, …)Test bed
![Page 4: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/4.jpg)
4
Network Simulator (GloMoSim)
Requires 2 components GloMoSim (Global Mobile Information
Systems Simulation Library)Network Simulation Environment
Parsec (Parallel Simulation Environment for Complex Systems)C-Base Simulation Language
![Page 5: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/5.jpg)
5
GloMoSim (Scalable Mobile Network Simulator )
a scalable simulation environmentsupports Wire & Wireless network layered approachStandard APIsparallel discrete-event simulation
![Page 6: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/6.jpg)
6
Parsec
C-based simulation language sequential and parallel execution discrete-event simulation modelscan be used as a parallel
programming language. developed by the Parallel Computing
Laboratory at UCLA
![Page 7: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/7.jpg)
7
GloMoSim Simulation Layers
RTP, TCP, UTP
RSVP
IP, Mobile IP
Wireless Network Layer
Clustering (optional)
Data LinkMAC
Radio ModelPropagation Model/Mobility Model
Application Traffic Generator
VC Connection ManagementCall Acceptance Control,
Rate Control
Packet Store / ForwardCongestion Control,
Rate Control
Multicast Routing
--------------QoS
Routing
![Page 8: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/8.jpg)
8
Models Currently Available in GloMoSim Application: TCPLIB (telnet, ftp) , CBR (Constant Bit
Rate traffic), Replicated file system, HTTP Transport: TCP (Free BSD), UDP, NS TCP (Tahoe) and
others Unicast Routing: AODV, Bellman-Ford, DSR, Fisheye,
Flooding, LAR (Scheme 1), NS DSDV, OSPF, WRP MAC Layer: CSMA, FAMA, MACA, IEEE 802.11 Radio: Radio with and without capture capacity Propagation: Free Space, Rayleigh, Ricean, SIRCIM Mobility: Random Waypoint, Random Drunken, ECRV,
Group Mobility
![Page 9: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/9.jpg)
9
collection of network nodeseach node has it’s own protocol stack
parameters and statistics
GloMoSim Layered Architecture
struct glomo_node_str{ double position_x; GlomoMac macData[xxx]; GlomoNetwork NetworkData;
… } GlomoNode;
Include\api.h
![Page 10: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/10.jpg)
10
Data Structure for a Layer
each layer has its own data structurebase on protocol in the layer
struct glomo_mac_str { MAC_PROTOCOL macProtocol; int interfaceIndex; BOOL macStats; …
void *macVar;} GlomoMac; mac\mac.h
![Page 11: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/11.jpg)
11
Layer Interaction with Events
Packets & Message going through layers are annotated with information that simulate inter-layer parameter passing
![Page 12: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/12.jpg)
12
Scheduling Events
Two types of Message Non-Packet Messages
Inter-layer event messages Self scheduled (timer) events
Packets/ Cell Messages Inter-node packets Inter-layer packets
![Page 13: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/13.jpg)
13
MAC
Radio RadioAccnoiseLayer()
GLOMO_MacReceiveRadioStatusChangeNotification()
Inter-layer event messages
Mac802_11StartTimer()
GLOMO_MacLayer()
Non-packet Message
Self scheduled (timer) events
MSG_MAC_TimerExpiredtypedef enum { RADIO_IDLE, RADIO_SENSING, RADIO_RECEIVING, RADIO_TRANSMITTING} RadioStatusType;
![Page 14: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/14.jpg)
14
MAC
Radio Layer
Packet/cell MessageNetwork
NetworkIpSendPacketToMacLayer()
GLOMO_MacNetworkLayerHasPacketToSend()
Mac802_11TransmitDataFrame()
Inter-layer packets
GLOMO_RadioStartTransmittingPacket()
Add Header
Inter-layer packets
Radio Layer
Network
MACGLOMO_MacReceivePacketFromRadio ()
RadioAccnoiseLayer ()
Inter-layer packets
NetworkIpReceivePacketFromMacLayer()
Mac802_11ProcessFrame()Remove Header
Inter-layer packets
Inter-Node Packet
![Page 15: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/15.jpg)
15
Network
MACGLOMO_MacReceivePacketFromRadio ()
RadioAccnoiseLayer ()
Inter-layer packets
NetworkIpReceivePacketFromMacLayer()
Mac802_11ProcessFrame()Remove Header
Inter-layer packets
Radio Layer
MAC
Radio Layer
Packet/cell MessageNetwork
NetworkIpSendPacketToMacLayer()
GLOMO_MacNetworkLayerHasPacketToSend()
Mac802_11TransmitDataFrame()
Inter-layer packets
GLOMO_RadioStartTransmittingPacket() RadioAccnoiseLayer ()
Add Header
Inter-layer packets
(Network Layer Packet)
(MAC Header Frame) +(Network Layer Packet)
Inter-Node Packet
/* Data frames. */ Header + Datatypedef struct M802_mac_frame{ M802_11FrameHdr hdr;
char payload[ MAX_NW_PKT_SIZE];
} M802_11_MacFrame;
typedef struct _Mac802_11FrameHdr{unsigned short frameType; char Padding1[2]; int duration; NODE_ADDR destAddr; NODE_ADDR sourceAddr; … } M802_11FrameHdr;
![Page 16: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/16.jpg)
16
Data Structure for Layer Interaction Enumerate event type
enum { /* for Channel layer */ MSG_CHANNEL_FromChannel, MSG_CHANNEL_FromRadio, /* Message Types for MAC layer */ MSG_MAC_FromNetwork, MSG_MAC_TimerExpired, … /* Default Message */ MSG_DEFAULT}; include\structmsg.h
![Page 17: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/17.jpg)
17
Data Structure for Layer Interaction Message Structure (general information)
struct message_str { short layerType; // Layer will received message short protocolType; short eventType; char* packet; char* payLoad; …} message; include\message.h
![Page 18: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/18.jpg)
18
Data Structure for Layer Interaction Message header (for packet)
typedef struct _Mac802_11LCtrlFrame{ unsigned short frameType; char Padding[2]; int duration; NODE_ADDR destAddr; NODE_ADDR sourceAddr; char FCS[4]; } M802_11LongControlFrame; \mac\802_11.h
![Page 19: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/19.jpg)
19
Message Parameters Message Destination:
Node ID Layer in that node Protocol in that layer (optional) Instance (Interface) optional
Message Event Type Event Specific Parameters called info
Both packets and non-packet messages Packet payload Current header position
![Page 20: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/20.jpg)
20
Scheduling an Event Allocate the GloMoSim Message:
Message* msg = GLOMO_MsgAlloc(node, MyID, MyLayer, MyProtocol, MSG_LAYER_PROTO_MY_EVENT);
Set the Event Specific Information: MyEventInfoType* MyEventInfo; GLOMO_MsgInfoAlloc(node, msg,
sizeof(MyEventInfoType)); MyEventInfo-> MyFirstParameter =1; …
Schedule the Event: GLOMO_MsgSend(node, message, MyChosenDelay);
![Page 21: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/21.jpg)
21
void Mac802_11StartTimer( GlomoNode *node, GlomoMac802_11 *M802, clocktype timerDelay){ Message *newMsg; M802->timerSequenceNumber++;
newMsg = GLOMO_MsgAlloc(node, GLOMO_MAC_LAYER, MAC_PROTOCOL_802_11, MSG_MAC_TimerExpired);
GLOMO_MsgSetInstanceId(newMsg, M802->myGlomoMac->interfaceIndex);
GLOMO_MsgInfoAlloc(node, newMsg, sizeof(M802->timerSequenceNumber));
*((int*)(newMsg->info)) = M802->timerSequenceNumber; GLOMO_MsgSend(node, newMsg, timerDelay); }
Scheduling an Event (Example)Allocate the GloMoSim Message
Set the Event Specific InformationSchedule the Event
Destination Layer
![Page 22: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/22.jpg)
22
Message SchedulingGLOMO_MsgSend(node, *msg, delay)
GLOMO_CallLayer(node, msg)
GLOMO_RADIO_LAYER: GLOMO_RadioLayer(node, msg)
GLOMO_MAC_LAYER: GLOMO_MacLayer(node, msg);
…GLOMO_APP_LAYER: GLOMO_AppLayer(node, msg);
if delay == 0
(msg)->layerType
![Page 23: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/23.jpg)
23
Processing Message Eventsvoid Mac802_11Layer(GlomoNode *node, int
interfaceIndex, Message *msg){ switch (msg->eventType) { case MSG_MAC_TimerExpired) Mac802_11HandleTimeout(node, M802); case MSG_MAC_TimerExpired_PCF)
Mac802_11HandleTimeout_PCF(node, M802); … }
GLOMO_MsgFree(node, msg);}
![Page 24: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/24.jpg)
24
Transmitting Packet Allocate Message
Message* pktToRadio = GLOMO_MsgAlloc(node, 0, 0, 0);
Set Header Information hdr.frameType = M802_11_DATA; hdr.sourceAddr = node->nodeAddr; hdr.destAddr = destAddr; …
Allocate Packet & Set information GLOMO_MsgPacketAlloc(node, pktToRadio, topPacket-
>packetSize); memcpy(pktToRadio->packet, topPacket->packet,
topPacket->packetSize);
![Page 25: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/25.jpg)
25
Transmitting Packet (cont’d) Add Header & Set information
GLOMO_MsgAddHeader(node, pktToRadio, sizeof(M802_11FrameHdr) );
memcpy(pktToRadio->packet, &hdr, sizeof(M802_11FrameHdr));
Transmit Packet StartTransmittingPacket(node, M802, pktToRadio,
M802_11_DIFS);
![Page 26: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/26.jpg)
26
Processing Packet
Mac802_11ReceivePacketFromRadio(){ if (hdr->destAddr == node->nodeAddr) { switch (hdr->frameType) { case M802_11_RTS: … case M802_11_DATA: } else if (hdr->destAddr == ANY_DEST){ switch (hdr->frameType) { case M802_11_DATA: Mac802_11ProcessFrame(node, M802, msg); … }
![Page 27: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/27.jpg)
27
Message Function GLOMO_MsgAlloc(node, destId, layer, protocol,
enent_type);
Functions to retrieve and set parameters individually. GLOMO_MsgInfoAlloc(node, msg, info_size);
GLOMO_MsgPacketAlloc(node, msg, packet_size); GLOMO_MsgAddHeader(node, msg, header_size); GLOMO_MsgRemoveHeader(node, msg, header_size);
GLOMO_MsgSend(node, msg, delay); GLOMO_MsgFree(node, msg); GLOMO_MsgCopy(node, msg);
![Page 28: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/28.jpg)
28
Editing your codeEditing your code
![Page 29: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/29.jpg)
29
Basic Structure/doc contains the documentation/scenarios contains directories of various
sample configuration topologies /main contains the basic framework
design/bin for executable and input/output files/include contains common include files
![Page 30: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/30.jpg)
30
Basic Structure (cont’d)
/application contains code for the application layer
/transport contains the code for the transport layer
/network contains the code for the network layer
/mac contains the code for the mac laye/radio contains the code for the physical
layer
![Page 31: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/31.jpg)
31
Configuration file (\bin\ Config.in)
General Simulation ParameterScenario Topology & MobilityRadio & Propagation ModelMAC ProtocolRouting ProtocolTransport ProtocolApplication (Traffic Generators)Statistical & GUI options
![Page 32: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/32.jpg)
32
Configuration file (Example) [config.in]NUMBER-OF-NODES 3NODE-PLACEMENT FILENODE-PLACEMENT-FILE ./nodes.input#NODE-PLACEMENT UNIFORMMAC-PROTOCOL 802.11NETWORK-PROTOCOL IPROUTING-PROTOCOL BELLMANFORDAPP-CONFIG-FILE ./app.confRADIO-TYPE RADIO-ACCNOISE
[nodes.input]0 0 (20.2, 0.9, 0.11)1 0 (80.4, 90.8, 0.17)2 0 (60.7, 30.4, 0.10)
[app.conf]#CBR <src_node> <dest_node># <items> <item_size> <interval_time># <start_time> <end_time>
CBR 0 1 10 512 1S 0S 0S
![Page 33: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/33.jpg)
33
In the directory
Application
MAC
Radio
Transport
…
mac.pc
802_11.h
802_11.pc
cama.h csma.pc
(.h)Basic Definition of functions and
data objects
(.pc)Actual Functions
(Layer.pc)Layer Interface
![Page 34: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/34.jpg)
34
Adding a model or protocol to a layer
Initialization Function
Finalization Function
Simulation Event Handling Function
GLOMOPartition()
Upper Layer
Lower Layer
Needs 3 functionsNeeds 3 functions
![Page 35: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/35.jpg)
35
Data structure in specific layer
typedef struct glomo_mac_802_11_str { GlomoMac* myGlomoMac; int state; /* Statistics collection variables. */ long pktsSentUnicast; … } GlomoMac802_11;
![Page 36: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/36.jpg)
36
Initialization Functionvoid Mac802_11Init (GlomoNode *node, int interfaceIndex,
const GlomoNodeInput *nodeInput){ GlomoMac802_11 *M802 = (GlomoMac802_11*)
checked_pc_malloc(sizeof(GlomoMac802_11));
M802->myGlomoMac = node->macData[interfaceIndex];
M802->myGlomoMac->macVar = (void *)M802;
// Init Data here M802->pktsSentUnicast = 0;}
![Page 37: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/37.jpg)
37
Event Handling Functionvoid Mac802_11Layer (GlomoNode *node, int
interfaceIndex, Message *msg){ int timerSequenceNumber = *(int*)(msg->info); // handle simulation “message” Mac802_11HandleTimeout(node, M802); GLOMO_MsgFree(node, msg);
}
![Page 38: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/38.jpg)
38
Finalization Functionvoid Mac802_11Finalize (GlomoNode *node, int interfaceIndex){ GlomoMac802_11 *M802 = (GlomoMac802_11*)node->macData[interfaceIndex]->macVar; if (M802->myGlomoMac->macStats == TRUE) { Mac802_11PrintStats(node, M802); } sprintf(buf, "UCAST (non-frag) pkts sent " "to chanl: %ld", M802->pktsSentUnicast); GLOMO_PrintStat(node, "802.11", buf);}
![Page 39: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/39.jpg)
39
Obtaining the information
Select what layer you want the statistics for
APPLICATION-STATISTICS YESTCP-STATISTICS NONETWORK-LAYER-STATISTICS YESMAC-LAYER-STATISTICS YESRADIO-LAYER-STATISTICS NO CHANNEL-LAYER-STATISTICS NO MOBILITY-STATISTICS NO
config.in
![Page 40: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/40.jpg)
40
Sifting through the Data
Sample Output from 1 node: Glomo.stat
Node: 0, Layer: 802.11, pkts from network: 0Node: 0, Layer: 802.11, BCAST pkts sent to chanl: 69Node: 0, Layer: NetworkIp, Number of Packets Routed For Another Node: 0Node: 0, Layer: NetworkIp, Number of Packets Delivered To this Node: 4549Node: 1, Layer: 802.11, pkts from network: 0Node: 1, Layer: 802.11, UCAST (non-frag) pkts sent to chanl: 2499Node: 1, Layer: 802.11, BCAST pkts sent to chanl: 67 …
![Page 41: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/41.jpg)
41
Sifting through the Data
Stats Printed for Each Node
You’ll Probably need to add Statistics
![Page 42: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/42.jpg)
42
Adding Stats
Go through Header and add for Statistic Variables
typedef struct glomo_mac_802_11_str { GlomoMac* myGlomoMac; int state; /* Statistics collection variables. */ long pktsSentUnicast; … <---------- Add Stat here !!! } GlomoMac802_11;
802_11.h
![Page 43: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/43.jpg)
43
Adding Stats
Initialize your extra stat to zero in the initialize function
void Mac802_11Init(){ M802->myGlomoMac = node->macData[interfaceIndex]; M802->state = M802_11_S_IDLE;
/* initial Statistic Variable to zero */ M802->pktsSentUnicast = 0; M802->pktsSentBroadcast = 0; M802->pktsGotUnicast = 0; … }
![Page 44: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/44.jpg)
44
Adding Stats
Add code to increment your countervoid Mac802_11ProcessFrame(){ hdr = (M802_11FrameHdr *)frame ->packet; if (hdr->destAddr == ANY_DEST) { M802->pktsGotBroadcast++; } else{ M802->pktsGotUnicast++; … GLOMO_MsgFree(node, frame);}
![Page 45: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/45.jpg)
45
Adding Stats
Add a print statement in “Finalize” functionvoid Mac802_11Finalize(){ M802 = node->macData[interfaceIndex]->macVar; sprintf(buf, "UCAST (non-frag) pkts sent " "to chanl: %ld", M802->pktsSentUnicast); GLOMO_PrintStat(node, "802.11", buf); sprintf(buf, "BCAST pkts sent to chanl: “, "%ld", M802->pktsSentBroadcast); GLOMO_PrintStat(node, "802.11", buf); … }
![Page 46: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/46.jpg)
46
Obtaining Glomosim/Parsec
Web site: http://pcl.cs.ucla.edu/projects/parsec http://pcl.cs.ucla.edu/projects/glomosim
Questions: PARSEC: [email protected] GloMoSim: [email protected]
Scalable Mobile Network Simulator
![Page 47: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/47.jpg)
47
Inside the Source Program
glomosim-2.0
\glomosim \parsec
![Page 48: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/48.jpg)
48
Installing Parseccopy correct directory to be parsec in …
Linux
Windows
/usr/local/parsec
C:\Parsec
\glomosim-2.0\parsec\
![Page 49: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/49.jpg)
49
Installing Parsec
Windows (Set Environment Variable)
path %path%;c:\devstudio\vc\bin; c:\devstudio\sharedide\bin
set INCLUDE=c:\devstudio\vc\include set LIB=c:\devstudio\vc\lib
![Page 50: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/50.jpg)
50
Installing GloMoSim
UNIX (go to /glomosim/main) Run "make depend" to create list of
depndencies in the Makefile. Make sure that the right path for the Parsec
compiler is specified in the Makefile for the "PAR" variable.
Run "make" to create the executableWindows (go to c:\glomosim\main
Run “makent” to create the executable
![Page 51: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/51.jpg)
51
Compiling GloMoSim (optional)
compiles only specific layer by “make _layerName” or “makent _layerName” for example prompt> makent MAC
![Page 52: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/52.jpg)
52
Runnig Program
Go to directory glomosim/bin -> type: “glomosim config.in“
![Page 53: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/53.jpg)
53
For gcc v.2.96 and higher
setenv (or set or export, depending on your shell) the environment variable
PCC_PP_OPTIONS"-D__builtin_va_list=void* -D__STRICT_ANSI__ -E -U__GNUC__ -I."
![Page 54: Glomosim Simulator](https://reader035.vdocuments.us/reader035/viewer/2022081412/545fbe65af79593a708b4fde/html5/thumbnails/54.jpg)
54
End