How to run "sendAndRecv.py" example in a distributed way

21 views
Skip to first unread message

Sarah

unread,
Apr 28, 2017, 7:49:36 AM4/28/17
to spade-users
Dear all,

I'm a newbie with spade. I want to run the "sendAndRecv.py" example in a distributed way. To do that, i think that i can affect each agent (sender and receiver) to one core since i'm working in local machine.

How can i do this ? is it possible to affect or run an agent to a core ? which library i have to use in python ?

I found that there exist the multiprocessing package that can be used to run computation tasks in parallel on a multi-core machine. But, i don't know if i can apply this package in my case.

Thank you for your help,
I would be grateful


sendAndRecv.py

Javi Palanca

unread,
Apr 28, 2017, 8:11:08 AM4/28/17
to spade...@googlegroups.com
Hi Sarah.

SPADE is a heavily threaded application where each agent runs a lot of threads. However I guess that you can run each agent inside a process of course. You may use multiprocessing or a different script for each agent as you prefer.
SPADE is not designed to profit from different cores sorry. The only possible option (and I’m not sure that it profits from multicore) is, as you’ve said, multiprocessing.

Sincerely,
Javi


--
You received this message because you are subscribed to the Google Groups "spade-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spade-users...@googlegroups.com.
To post to this group, send email to spade...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<sendAndRecv.py>

Sarah

unread,
Apr 28, 2017, 11:29:19 AM4/28/17
to spade-users
Thank you for your rapid answer,
I will see if i can use multiprocessing package.
Reply all
Reply to author
Forward
0 new messages