ns3gym is so slow, and something wrong with zmq

29 views
Skip to first unread message

Zoe Jiang

unread,
Sep 13, 2024, 3:00:33 AM9/13/24
to ns-3-users
Hello,
I've been researching how to use ns3 in routing optimization recently, but I have found that ns3gym is so slow, even though I have used GPU. Besides, the code will suddenly stop at step 20  with the following error information:

Traceback (most recent call last):
File "./test20.py", line 559, in <module>
obs, reward, done, info = env.step(action)
File "/root/.local/lib/python3.8/site-packages/ns3gym/ns3env.py", line 401, in step
response = self.ns3ZmqBridge.step(action)
File "/root/.local/lib/python3.8/site-packages/ns3gym/ns3env.py", line 229, in step
self.send_actions(actions)
File "/root/.local/lib/python3.8/site-packages/ns3gym/ns3env.py", line 223, in send_actions
self.socket.send(replyMsg)
File "/root/miniconda3/lib/python3.8/site-packages/zmq/sugar/socket.py", line 688, in send
return super().send(data, flags=flags, copy=copy, track=track)
File "zmq/backend/cython/socket.pyx", line 742, in zmq.backend.cython.socket.Socket.send
File "zmq/backend/cython/socket.pyx", line 789, in zmq.backend.cython.socket.Socket.send
File "zmq/backend/cython/socket.pyx", line 255, in zmq.backend.cython.socket._send_copy
File "zmq/backend/cython/socket.pyx", line 250, in zmq.backend.cython.socket._send_copy
File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Operation cannot be accomplished in current state


I have adjusted the simulation and steptime  both in ns3 and python to keep them the same, but it still doesn't work well, has anyone ever met the same trouble? I really need your help, thanks a lot.
Reply all
Reply to author
Forward
0 new messages