You have created the cluster, but dispy may not have had the chance to setup rpi before stats are printed. Either issue a job, or put time.sleep before calling 'stats'.
Note that the computation, in this case "/bin/ls" from client is sent to each node to execute. This will work only if the binary program on client can run on each node.
Last edit: Giridhar Pemmasani 2015-11-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've added a time.sleep(10) before calling cluster.stats() but nothing changed.
I've also tried to submit job, than wait() and than print stats, but nothing: it locks after submit() I think because it can't reach the node.
Which version are you using? If not using latest (4.6.0), please try that.
Also make sure that both rpi and your pc are running same version of dispy. In fact, this may likely be the issue - incorrect nodes are simply ignored.
Try with debug enabled; i.e., start dispynode with dispynode.py -d and pass loglevel=logging.DEBUG to JobCluster.
Last edit: Giridhar Pemmasani 2015-11-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to connect my pc (master) to a node (raspberry) using dispy. I've wrote a question on stackoverflow, but no one replyed.
The question is here. If someone can help it will be appreciated. Thanks
Giacomo
You have created the cluster, but dispy may not have had the chance to setup rpi before stats are printed. Either issue a job, or put time.sleep before calling 'stats'.
Note that the computation, in this case "/bin/ls" from client is sent to each node to execute. This will work only if the binary program on client can run on each node.
Last edit: Giridhar Pemmasani 2015-11-02
Thanks for your reply.
I've added a
time.sleep(10)before callingcluster.stats()but nothing changed.I've also tried to submit job, than
wait()and than print stats, but nothing: it locks aftersubmit()I think because it can't reach the node.My final program:
import dispycluster = dispy.JobCluster("/bin/ls",nodes=["192.168.1.105"],ip_addr="192.168.1.106")cluster.submit()cluster.wait()cluster.stats()Thanks,
Giacomo
Last edit: Giacomo 2015-11-02
Which version are you using? If not using latest (4.6.0), please try that.
Also make sure that both rpi and your pc are running same version of dispy. In fact, this may likely be the issue - incorrect nodes are simply ignored.
Try with debug enabled; i.e., start dispynode with
dispynode.py -dand passloglevel=logging.DEBUGtoJobCluster.Last edit: Giridhar Pemmasani 2015-11-03
Yeah, the problem was the not update version of dispy in both my pc and my raspberry.
Really thank you!
Giacomo
Last edit: Giacomo 2015-11-03