ipyparallel,如何设置节点的进程号

时间:2016-03-05 05:14:56

标签: python ipython ipython-parallel

我知道我可以public class Organisations extends SuperModel implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ManyToOne @JoinColumn(name = "parent_id", nullable = true) private Organisations parent; @OneToMany(mappedBy = "parent") private List<Organisations> childs = new ArrayList<Organisations>(); } public class Permissions extends SuperModel implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @NotNull @ManyToOne(optional = false, fetch = FetchType.LAZY) @JoinColumn(name = "user_id", nullable = false) private Users user; @NotNull @ManyToOne(optional = false, fetch = FetchType.LAZY) @JoinColumn(name = "organisation_id", nullable = false) private Organisations organisation; } public class Roles extends SuperModel implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @NotNull @ManyToOne(optional = false, fetch = FetchType.LAZY) @JoinColumn(name = "organisation_id", nullable = false) private Organisations organisation; @NotNull @Size(min = 3, max = 20) @Column(name = "role", unique = true, nullable = false) private String role; @ManyToMany(cascade = CascadeType.ALL) @JoinTable(name="role_permissions", joinColumns=@JoinColumn(name="role_id"), inverseJoinColumns=@JoinColumn(name="permission_id")) private List<Permissions> permissions = new ArrayList<Permissions>(); } public class Users extends SuperModel implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @NotNull @ManyToOne(optional = false, fetch = FetchType.EAGER) @JoinColumn(name = "organisation_id", nullable = false) private Organisations organisation; @NotNull @ManyToOne(optional = false) @OneToOne(optional = false, fetch = FetchType.EAGER) @JoinColumn(name = "role_id", nullable = false) private Roles role; } 启动引擎。还有ipengine --profile=/path/to/ipcontroller-engine.json个进程。

但是,如何设置每个远程节点上运行的进程数?似乎len(c.ids)只是在远程计算机上启动一个进程。

1 个答案:

答案 0 :(得分:0)

ipengine启动一个引擎(进程)。如果您需要多个引擎,则需要多次调用ipengine。一个捷径是ipcluster engines命令:

ipcluster engines -n 4

将启动4个引擎。