tornadomeet opened a new issue #4659: gpu memory allocate will be error when 
using multiprocessing.Process
URL: https://github.com/apache/incubator-mxnet/issues/4659
 
 
   reproduce code
   ```python
   import numpy as np
   import mxnet as mx
   from multiprocessing import Process, current_process
   
   def test():
       print("process id is {:s}".format(current_process().name))
       a = mx.nd.array(np.zeros((100, 100, 100, 100)), mx.gpu(0))
       a.asnumpy()
   
   if __name__ == '__main__':
       runs = [Process(target=test) for i in range(1)]  # 1 or 2 or N process 
is the same error
       for p in runs:
         p.start()
       for p in runs:
         p.join()
       print("done!")
   ```
   
   Os: linux, centos 7 + cuda7.5 + cuDNN 5.1
   
   log:
   ```
   [14:32:58] 
/home/work/wuwei/project/dmlc/mxnet/dmlc-core/include/dmlc/./logging.h:300: 
[14:32:58] src/storage/storage.cc:38: Check failed: e == cudaSuccess || e == 
cudaErrorCudartUnloading CUDA: initialization error
   
   Stack trace returned 40 entries:
   [bt] (0) 
/home/work/wuwei/tools/mxnet/lib64/python2.7/site-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x29)
 [0x7f32b9501039]
   [bt] (1) 
/home/work/wuwei/tools/mxnet/lib64/python2.7/site-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(_ZN5mxnet11StorageImpl14ActivateDeviceENS_7ContextE+0x2a6)
 [0x7f32b9fb4de6]
   [bt] (2) 
/home/work/wuwei/tools/mxnet/lib64/python2.7/site-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(_ZN5mxnet11StorageImpl5AllocEmNS_7ContextE+0x4a)
 [0x7f32b9fb263a]
   [bt] (3) 
/home/work/wuwei/tools/mxnet/lib64/python2.7/site-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(MXNDArrayCreateEx+0x595)
 [0x7f32b9fe6685]
   [bt] (4) /lib64/libffi.so.6(ffi_call_unix64+0x4c) [0x7f32c24f9dac]
   [bt] (5) /lib64/libffi.so.6(ffi_call+0x1f5) [0x7f32c24f96d5]
   [bt] (6) /usr/lib64/python2.7/lib-dynload/_ctypes.so(_ctypes_callproc+0x30b) 
[0x7f32c270cc8b]
   [bt] (7) /usr/lib64/python2.7/lib-dynload/_ctypes.so(+0xaa85) 
[0x7f32c2706a85]
   [bt] (8) /lib64/libpython2.7.so.1.0(PyObject_Call+0x43) [0x7f32cd97c0b3]
   [bt] (9) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x1d4c) 
[0x7f32cda1025c]
   [bt] (10) /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed) 
[0x7f32cda140bd]
   [bt] (11) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f) 
[0x7f32cda1276f]
   [bt] (12) /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed) 
[0x7f32cda140bd]
   [bt] (13) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f) 
[0x7f32cda1276f]
   [bt] (14) /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed) 
[0x7f32cda140bd]
   [bt] (15) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f) 
[0x7f32cda1276f]
   [bt] (16) /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed) 
[0x7f32cda140bd]
   [bt] (17) /lib64/libpython2.7.so.1.0(+0x6f05d) [0x7f32cd9a105d]
   [bt] (18) /lib64/libpython2.7.so.1.0(PyObject_Call+0x43) [0x7f32cd97c0b3]
   [bt] (19) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xde7) 
[0x7f32cda0f2f7]
   [bt] (20) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4350) 
[0x7f32cda12860]
   [bt] (21) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4350) 
[0x7f32cda12860]
   [bt] (22) /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed) 
[0x7f32cda140bd]
   [bt] (23) /lib64/libpython2.7.so.1.0(+0x6ef68) [0x7f32cd9a0f68]
   [bt] (24) /lib64/libpython2.7.so.1.0(PyObject_Call+0x43) [0x7f32cd97c0b3]
   [bt] (25) /lib64/libpython2.7.so.1.0(+0x590a5) [0x7f32cd98b0a5]
   [bt] (26) /lib64/libpython2.7.so.1.0(PyObject_Call+0x43) [0x7f32cd97c0b3]
   [bt] (27) /lib64/libpython2.7.so.1.0(+0xa1057) [0x7f32cd9d3057]
   [bt] (28) /lib64/libpython2.7.so.1.0(+0x9fd6f) [0x7f32cd9d1d6f]
   [bt] (29) /lib64/libpython2.7.so.1.0(PyObject_Call+0x43) [0x7f32cd97c0b3]
   [bt] (30) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x1d4c) 
[0x7f32cda1025c]
   [bt] (31) /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4350) 
[0x7f32cda12860]
   [bt] (32) /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed) 
[0x7f32cda140bd]
   [bt] (33) /lib64/libpython2.7.so.1.0(PyEval_EvalCode+0x32) [0x7f32cda141c2]
   [bt] (34) /lib64/libpython2.7.so.1.0(+0xfb5ff) [0x7f32cda2d5ff]
   [bt] (35) /lib64/libpython2.7.so.1.0(PyRun_FileExFlags+0x7e) [0x7f32cda2e7be]
   [bt] (36) /lib64/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xe9) 
[0x7f32cda2fa49]
   [bt] (37) /lib64/libpython2.7.so.1.0(Py_Main+0xc9f) [0x7f32cda40b9f]
   [bt] (38) /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f32ccc6cb15]
   [bt] (39) python() [0x400721]
   
   [14:32:58] 
/home/work/wuwei/project/dmlc/mxnet/dmlc-core/include/dmlc/./logging.h:300: 
[14:32:58] src/storage/storage.cc:38: Check failed: e == cudaSuccess || e == 
cudaErrorCudartUnloading CUDA: initialization error
   ......
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to