Re: Tutorial 3 problem

Henri DF <[email protected]> Wed, 19 Jan 2005 15:39:45 +0100 (CET)
Newsgroups gmane.network.simulator.epfl
Message-ID <[email protected]>
> Whats the best way to compile my code into Network in A Box?
> I dont particularly want to 'make' the whole of NAB everytime I want to try and
> compile my code into the simulator since no doubt it won't compile first time!

you can certainly first compile manually just your new files alone if you 
want (look at the ocamlc commands that are issued when you 'make nab' and do 
stg similar for your files )

but i'm not sure i understand the question.. what 
difference does it make whether or not you compile the whole of NAB? ocaml 
compilation is very fast (on any reasonable hw) anyway.

> 
> Also I have updated the following files with information that seems necessary to
> add in my implementation into the simulator:
> scripts_utils.ml
> l3pkt.ml
> I just wanted to check that I wasn't missing anything else that might need
> changing?

not missing anything that i can see for a first-pass implementation. 

henri


> 
> Thanks
> Robin
> 
> Quoting Henri DF <[email protected]>:
> 
> > sorry, some of the API calls changed and the 0.7 that i sent you did not
> > yet contain the updated tutorial scripts..
> >
> > i've appended a new tarball which contains the new tutorials.
> >
> > i don't have a full 'lesson' type script for AODV, but in
> > proto/scripts/aodv (in the new tarball), there are some scripts which
> > might be even more useful ;).
> >
> > these are test scripts that i wrote to check basic functionality. you
> > could start with the test_3_nodes.ml script (instructions on how to run it
> > are at the top of the file), then maybe look at the others which have
> > less trivial topologies.
> >
> >
> > hope this helps! and let me know if you have any further problems..
> >
> > henri
> >
> > > Hey,
> > > Sorry i've got another small problem!
> > > When i try and create a world object like in the tutorial I run into the
> > > following problem that didn't happen on 0.6:
> > >
> > > # #use "/home/s0199103/.ocamlinit";;
> > > # open Params;;
> > > # Param.get nodes;;
> > > - : int = 500
> > > # Param.set nodes 800;;
> > > - : unit = ()
> > > # Param.set radiorange 12.;
> > >   ;;
> > > - : unit = ()
> > > # let size = Script_utils.size ~rrange:12.0 ~nodes:800 ~avg_degree:8 ();;
> > > val size : float = 212.640541760032193
> > > # Param.set x_size size;;
> > > - : unit = ()
> > > # Param.set y_size size;;
> > > - : unit = ()
> > > # Script_utils.init_lazy_world();;
> > > Unbound value Script_utils.init_lazy_world
> > >
> > > My .ocamlinit contains #directory
> > "/home/s0199103/4thyearproject/nab/scripts";;
> > > which points to the directory that scripts_util.ml is in....
> > > Any ideas?
> > > Also do you have a script file that you used to initialise a simulation of
> > AODV,
> > > like in lesson3.ml?
> > >
> > > Thanks
> > > Robin
> > >
> > > Quoting Henri DF <[email protected]>:
> > >
> > > > ah, that explains it.
> > > > i'm guilty of still using 3.07.2 ..
> > > >
> > > > i had tried it a couple months back with 3.08, and it compiled fine.
> > > > BUT, i didn't compile the aodv code under 3.08, so the dynarray code
> > > > didn't get compiled, which explains why i missed problem ;)
> > > >
> > > > i think things should work fine if you change the following lines
> > > > (in lib/contrib/dynarray.ml) from:
> > > > --
> > > > external idup : 'a intern -> 'a intern = "obj_dup"
> > > > external imake : int -> int -> 'a intern = "obj_block"
> > > > --
> > > >
> > > > to:
> > > >
> > > > --
> > > > external idup : 'a intern -> 'a intern = "caml_obj_dup"
> > > > external imake : int -> int -> 'a intern = "caml_obj_block"
> > > > --
> > > >
> > > >
> > > > let me know if you still have problems!
> > > >
> > > > henri
> > > >
> > > > > version 3.08.0
> > > > >
> > > > > Quoting henri dubois-ferriere <[email protected]>:
> > > > >
> > > > > > Quoting RG Lyles <[email protected]>:
> > > > > >
> > > > > > can you tell me which version of ocaml you are using?
> > > > > > henri
> > > > > >
> > > > > >
> > > > > > > Hi again,
> > > > > > > I thought I would try and run NAB-0.7 to test out running AODV to
> > give
> > > > me
> > > > > > an
> > > > > > > idea how to run my DSR implementation (since I presume AODV works
> > and
> > > > mine
> > > > > > > wont!) but when I try and run the make file it gets quite far and
> > then
> > > > > > gives
> > > > > > > me
> > > > > > > this error:
> > > > > > >
> > > > > > > Error while linking lib/contrib/dynArray.cmo:
> > > > > > > The external function `obj_block' is not available
> > > > > > > make: *** [bin/nab] Error 2
> > > > > > >
> > > > > > > Any ideas?
> > > > > > >
> > > > > > > Thanks
> > > > > > > Robin
> > > > > > >
> > > > > > > Quoting Henri DF <[email protected]>:
> > > > > > >
> > > > > > > > > I still have to do the Maintenance side of the protocol -
> > dealing
> > > > with
> > > > > > > > route
> > > > > > > > > errors but most of the other stuff is in place. I just hope i
> > can
> > > > get
> > > > > > it
> > > > > > > >
> > > > > > > > excellent.
> > > > > > > >
> > > > > > > > > working properly in NAB! :) Did you ever finish writing a
> > tutorial
> > > > on
> > > > > > > the
> > > > > > > > AODV
> > > > > > > > > implementation you did?
> > > > > > > >
> > > > > > > > sorry, unfortunately not..
> > > > > > > > but if you have any questions on any particular aspects of it,
> > don't
> > > > > > > > hesitate to ask
> > > > > > > >
> > > > > > > > henri
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Robin
> > > > > > > > > Quoting Henri DF <[email protected]>:
> > > > > > > > >
> > > > > > > > > > Great to hear that your DSR implementation is coming along!
> > > > > > > > > >
> > > > > > > > > > henri
> > > > > > > > > > > Hi Henri,
> > > > > > > > > > > I'm just about at the stage where I can test some of the
> > DSR
> > > > > > > protocol
> > > > > > > > that
> > > > > > > > > > I am
> > > > > > > > > > > doing in NAB. I was looking over the 3rd tutorial again
> > after
> > > > > > > > installing
> > > > > > > > > > > Lablgtk etc successfully but I get to the very last line of
> > > > code in
> > > > > > > the
> > > > > > > > > > > tutorial and it doesn't like it! -
> > > > > > > > > > >
> > > > > > > > > > > # Gui_gtk.init();;
> > > > > > > > > > > - : unit = ()
> > > > > > > > > > > # Gui_ler.setup_easeviz_app();;
> > > > > > > > > > > - : unit = ()
> > > > > > > > > > > # Main.main();;
> > > > > > > > > > > Unbound value Main.main
> > > > > > > > > > >
> > > > > > > > > > > Do you have any idea why this is happening? is it me or was
> > it
> > > > a
> > > > > > > typo
> > > > > > > > in
> > > > > > > > > > the
> > > > > > > > > > > tutorial?
> > > > > > > > > > > Thanks
> > > > > > > > > > > Robin
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> 
> 
>