MXNet model parallelism on CPUs

Hi,
I’m trying to run different models each one in its own process (I’m using py multiprocess package).

Even with 1 single process I’m unable to make it working

with Pool(processes=1) as pool:
    args = [(x.copy(), y.copy(), model) for model in self.models]
    pool.starmap(self.run_model, args)

It fails with the following stack trace

Segmentation fault: 11

Stack trace returned 10 entries:
[bt] (0) 0   libmxnet.so                         0x0000000108449390 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, mxnet::NDArrayFunctionReg*>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, mxnet::NDArrayFunctionReg*>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, mxnet::NDArrayFunctionReg*> > >::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, mxnet::NDArrayFunctionReg*>, void*>*) + 2736
[bt] (1) 1   libmxnet.so                         0x000000010a0dd796 mxnet::Storage::Get() + 4374
[bt] (2) 2   libsystem_platform.dylib            0x00007fff6b4e1f5a _sigtramp + 26
[bt] (3) 3   ???                                 0x0000000000000000 0x0 + 0
[bt] (4) 4   libBLAS.dylib                       0x00007fff3fdae386 APL_sgemvTrans_FMA + 561
[bt] (5) 5   libBLAS.dylib                       0x00007fff3fcb16a7 cblas_sgemv + 582
[bt] (6) 6   libBLAS.dylib                       0x00007fff3fce55f7 cblas_sgemm + 1239
[bt] (7) 7   libmxnet.so                         0x0000000108767137 mxnet::op::FullyConnectedComputeExCPU(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::__1::vector<mxnet::NDArray, std::__1::allocator<mxnet::NDArray> > const&, std::__1::vector<mxnet::OpReqType, std::__1::allocator<mxnet::OpReqType> > const&, std::__1::vector<mxnet::NDArray, std::__1::allocator<mxnet::NDArray> > const&) + 17559
[bt] (8) 8   libmxnet.so                         0x0000000108763318 mxnet::op::FullyConnectedComputeExCPU(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::__1::vector<mxnet::NDArray, std::__1::allocator<mxnet::NDArray> > const&, std::__1::vector<mxnet::OpReqType, std::__1::allocator<mxnet::OpReqType> > const&, std::__1::vector<mxnet::NDArray, std::__1::allocator<mxnet::NDArray> > const&) + 1656
[bt] (9) 9   libmxnet.so                         0x0000000108763073 mxnet::op::FullyConnectedComputeExCPU(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::__1::vector<mxnet::NDArray, std::__1::allocator<mxnet::NDArray> > const&, std::__1::vector<mxnet::OpReqType, std::__1::allocator<mxnet::OpReqType> > const&, std::__1::vector<mxnet::NDArray, std::__1::allocator<mxnet::NDArray> > const&) + 979
libc++abi.dylib: terminating

Hi @vitob what version of MXNet are you running?

Ref: