frenetic-lang / frenetic

The Frenetic Programming Language and Runtime System
http://www.frenetic-lang.org/
Other
223 stars 51 forks source link

run.sh file in examples/virtual/diamond folder is outdated. #451

Closed ranjanvittal closed 8 years ago

ranjanvittal commented 8 years ago

The run.sh file does not include the command line switches. When the command line switches(--vrel, --vtopo, etc) are added, Updated run.sh is as follows.

!/bin/bash

../../../frenetic.native virtual_cmd\ --vpolicy vpol.kat\ --vrel vrel.kat\ --vtopo vtopo.kat\ --ving-pol vingpol.kat\ --ving ving.kat\ --veg veg.kat\ --ptopo ptopo.kat\ --ping ping.kat\ --peg peg.kat

for arg in "g_fabric" "g_pruned" "pg" "vg" "g_raw" do echo $arg arg1="${arg}.dot" arg2="${arg}.png" dot -Tpng $arg1 > $arg2 done

I get the following error on running ./run.sh : Uncaught exception: (Failure "continuation present, but no program counter field provided!") after getting some partial output.

mcanini commented 8 years ago

@smolkaj Steffen, can you please check this issue?

smolkaj commented 8 years ago

Some refactoring must have messed this up. I cleaned things up a little in bcb477b. Should work now. Let me know.

ranjanvittal commented 8 years ago

@mcanini @smolkaj We are now able to run it using ./run.sh. After giving a certain output it is waiting which we expect is waiting for openflow switches to join it. We set the --openflow-port to 6633 and ran it with a sample topology with --controller=remote.. However that still shows that it cannot find a controller at port 6633. Any specific directives to help us in running it?

smolkaj commented 8 years ago

I'm clueless about how the controller stuff works. Maybe @jnfoster or @arjunguha can help.

craig-riecke commented 8 years ago

If I can jump in. Currently the global and virtual compilers (virtual_cmd server) do not actually run an OpenFlow controller. They only compile flow tables from the given files and output the result to stdout (similar to the --compile-server, but just from the command line).

At some point, we'll connect the two but that part needs to be designed, implemented, etc. Should that be sooner-rather-than-later?

ranjanvittal commented 8 years ago

Okay, then the script is still not giving the output as expected.

jnfoster commented 8 years ago

@ranjanvittal: can you provide some more detail? It's much easier for someone to jump in and help if they have a precise description of what you are running (just run.sh?) and the description of what you expect versus what you are seeing.

Thanks, N

craig-riecke commented 8 years ago

@ranjanvittal: I did fix the parameters in run.sh - that was my fault, so thanks for the tip. However, if the script examples/virtual/diamond/run.sh seems to be hanging, I am seeing the same behavior on my machine. (I waited for five minutes to complete and it hadn't, so it may just be taking a long time to run. It does seem complex).

smolkaj commented 8 years ago

Do we know where it hangs? It might be the virtual compiler. I have noticed in the past that one of its components scales very poorly once the virtual network reaches a certain size. If that's the issue here, it shouldn't be hard to fix. I can take a look.

ranjanvittal commented 8 years ago

@craig-riecke yes i experienced the same issue. If I run ./run.sh, After printing mfin and mfout information, the script hangs. It doesnot give any further output even after it is run for about 15 minutes, I guess it might not be a performance issue. Further the big-switch example, raises the following exception : Uncaught exception: Loc.Exclocated(, _)

Raised at file "camlp4/Camlp4/Struct/Loc.ml", line 306, characters 16-35. 1,2 examples raise the following exception : Uncaught exception:

"Assert_failure lib/Frenetic_NetKAT_Virtual_Compiler.ml:339:19"

Raised at file "lib/Frenetic_NetKAT_Virtual_Compiler.ml", line 339, characters 19-31.

smolkaj commented 8 years ago

I will take a look.

smolkaj commented 8 years ago

@ranjanvittal: Everything should work now.

ranjanvittal commented 8 years ago

Thanks! will check it out soon !