hust-diangroup / ns3-ai

Enable the interaction between ns-3 and popular frameworks using Python, which mean you can train and test your AI algorithms in ns-3 without changing any frameworks you are using now!
GNU General Public License v2.0
240 stars 85 forks source link

rl-tcp example ran once only #38

Closed sanjayjaiman closed 3 years ago

sanjayjaiman commented 3 years ago

I ran the "rl-tcp" example once by following the instructions - Window 1: ./waf --run "rl-tcp" Window 2: python testtcp.py (in the "contrib/example/rl-tcp" dir)

First time it seemed to run fine to completion. I tried it again and "python testtcp.py" script exits without any I/O on either window. I saw there were quite a few processes with me as owner running (possibly due to previous ns-3 runs). I killed them all and still the same problem. "netstat -an | grep 5000" does not yield anything

Mauriyin commented 3 years ago

Could you check whether the shared memory successfully released? You can run free.sh to release the memory. Then you can try to re-run the example.

Also, you can run this new script to directly test the rl-tcp, no need to run it in two separate windows.

sanjayjaiman commented 3 years ago

Thanks Mauriyin, Here was my experience: With the system in the same state as before -

  1. I ran "run_rl_tcp.py" and that behaved same as "testtcp.py" - it simply exited
  2. I ran "./freeshm.sh " in the "ns3-ai" dir. That seemed to free up memory.
  3. After that "rl-tcp" and "testtcp.py" ran fine.
  4. Running it again, I ran into the same issue again. After freeing up shared memory, it ran fine.
  5. Seems like I have to run "./freeshm.sh" after every run. Is this another issue I should open or this one is good enough?

Thanks, Sanjay

Mauriyin commented 3 years ago

Yes. It's fine you can free the memory before each running. We are looking at these issues. Thanks.