Menu

Cluster with Python: cannot connect node

Help
Giacomo
2015-11-02
2015-11-03
  • Giacomo

    Giacomo - 2015-11-02

    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

     
  • Giridhar Pemmasani

    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
  • Giacomo

    Giacomo - 2015-11-02

    Thanks for your reply.

    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.

    My final program:

    import dispy

    cluster = 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
  • Giridhar Pemmasani

    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
  • Giacomo

    Giacomo - 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

Log in to post a comment.