MCPcopy Create free account
hub / github.com/dmlc/parameter_server / init

Method init

src/system/van.cc:20–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18DECLARE_int32(num_servers);
19
20void Van::init() {
21
22 scheduler_ = parseNode(FLAGS_scheduler);
23 if (FLAGS_my_rank < 0) {
24 my_node_ = parseNode(FLAGS_my_node);
25 } else {
26 my_node_ = assembleMyNode();
27 }
28
29 if (FLAGS_print_van) {
30 debug_out_.open("van_"+my_node_.id());
31 // LI << "I am [" << my_node_.ShortDebugString() << "]; pid:" << getpid();
32 }
33
34 context_ = zmq_ctx_new();
35 // TODO the following does not work...
36 // zmq_ctx_set(context_, ZMQ_MAX_SOCKETS, 1000000);
37 // zmq_ctx_set(context_, ZMQ_IO_THREADS, 4);
38 // LL << "ZMQ_MAX_SOCKETS: " << zmq_ctx_get(context_, ZMQ_MAX_SOCKETS);
39
40 CHECK(context_ != NULL) << "create 0mq context failed";
41 bind();
42 connect(my_node_);
43 connect(scheduler_);
44
45}
46
47void Van::destroy() {
48 for (auto& it : senders_) zmq_close (it.second);

Callers 3

startMethod · 0.45
setReaderMethod · 0.45
loadDataMethod · 0.45

Calls 2

openMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected