我正在尝试实现一个基本的 pp 示例,如下所示(SCRIPT1)。
import pp
ppservers = ("*",) # autodiscovery mode on!
# create the job server
job_server = pp.Server(ppservers=ppservers)
for computer, cpu_count in job_server.get_active_nodes().iteritems():
print "Found {} with CPU count {}!".format(computer, cpu_count)
环境详细信息
操作系统:windows10
python版本:2.7(在机器1和机器2上)机器1
IP:192.168.1.4机器2
IP:192.168.56.1
到现在为止的步骤:
- machine1 和 machine2 使用 wifi 连接在同一个网络中
- SCRIPT1放置在 machine1 上(machine1 是作业服务器)
在 machine2(工作节点)中安装 pp 并使用 machine2(端口 60000)启动服务器
python ppserver.py -a
在 machine1 上触发SCRIPT1,machine 1 输出如下图
Found local with CPU count 8!
但是在第 4 步的输出预计也会检测到机器 2 并将输出显示为
Found 192.168.56.1:60000 with CPU count 2!
Found local with CPU count 4!
并行计算的新手,我该如何调试?对此表示赞赏。