You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/05/18 10:12:10 UTC
[GitHub] lispc opened a new issue #10996: Is "Check failed: ctx ==
vcontext[nid]..." an internal assertion?
lispc opened a new issue #10996: Is "Check failed: ctx == vcontext[nid]..." an internal assertion?
URL: https://github.com/apache/incubator-mxnet/issues/10996
## Description
I encountered the exception "Check failed: ctx == vcontext[nid] Trying to save gradient to gpu(3) while its source node "net1_conv0_backward" computes it on gpu(0). Check your ctx in NDArray allocation." during running my model parallel training code. According to the [source code](https://github.com/apache/incubator-mxnet/blob/c5958f0ade579487ecdbd6c1bcb67538f531c62a/src/executor/graph_executor.cc#L429), I guess it may be one assertion for internal use.
So is there any advice on solving the exception? Thanks!
## Environment info (Required)
```
----------Python Info----------
Version : 3.5.2
Compiler : GCC 5.4.0 20160609
Build : ('default', 'Sep 14 2017 22:51:06')
Arch : ('64bit', 'ELF')
------------Pip Info-----------
Version : 9.0.3
Directory : /mnt/ficusjordan/dfyu/Projects/SoftmaxFace/python/python3.5_ubuntu16.04/SoftmaxFace/lib/python3.5/site-packages/pip
----------MXNet Info-----------
Version : 1.1.0
Directory : /mnt/ficusjordan/dfyu/Projects/SoftmaxFace/python/python3.5_ubuntu16.04/SoftmaxFace/lib/python3.5/site-packages/mxnet
Commit Hash : 07a83a0325a3d782513a04f47d711710972cb144
----------System Info----------
Platform : Linux-4.13.0-36-generic-x86_64-with-Ubuntu-16.04-xenial
system : Linux
node : WXRG0117
release : 4.13.0-36-generic
version : #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018
----------Hardware Info----------
machine : x86_64
processor : x86_64
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 56
On-line CPU(s) list: 0-55
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
Stepping: 1
CPU MHz: 2399.942
CPU max MHz: 3300.0000
CPU min MHz: 1200.0000
BogoMIPS: 4799.88
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 35840K
NUMA node0 CPU(s): 0-13,28-41
NUMA node1 CPU(s): 14-27,42-55
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti retpoline intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
----------Network Test----------
Setting timeout: 10
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.1039 sec, LOAD: 0.5640 sec.
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0111 sec, LOAD: 9.9746 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0115 sec, LOAD: 3.6715 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.1729 sec, LOAD: 0.6860 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.1216 sec, LOAD: 1.1635 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0733 sec, LOAD: 1.3180 sec.
```
## Error Message:
```
Traceback (most recent call last):
File "XXX/lib/python3.5/site-packages/mxnet/symbol/symbol.py", line 1512, in simple_bind
ctypes.byref(exe_handle)))
File "XXX/lib/python3.5/site-packages/mxnet/base.py", line 146, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [17:47:57] src/executor/graph_executor.cc:427: Check failed: ctx == vcontext[nid] Trying to save gradient to gpu(3) while its source node "net1_conv0_backward" computes it on gpu(0). Check your ctx in NDArray allocation.
Stack trace returned 10 entries:
[bt] (0) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x2ab998) [0x7fa4f5b99998]
[bt] (1) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x2abda8) [0x7fa4f5b99da8]
[bt] (2) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x246d243) [0x7fa4f7d5b243]
[bt] (3) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x247e64c) [0x7fa4f7d6c64c]
[bt] (4) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x248090e) [0x7fa4f7d6e90e]
[bt] (5) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x2481734) [0x7fa4f7d6f734]
[bt] (6) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(MXExecutorSimpleBind+0x2250) [0x7fa4f7ce2890]
[bt] (7) XXX/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call_unix64+0x4c) [0x7fa5a3038e20]
[bt] (8) XXX/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call+0x2eb) [0x7fa5a303888b]
[bt] (9) XXX/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(_ctypes_callproc+0x49a) [0x7fa5a303301a]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "../../source/training/train.py", line 101, in <module>
graph.bind(data_shapes=train_iter.provide_data, label_shapes=train_iter.provide_label)
File "../../source/training/../training/sequential_module.py", line 316, in bind
force_rebind=force_rebind, shared_module=None, grad_req=local_grad_req)
File "XXX/lib/python3.5/site-packages/mxnet/module/module.py", line 429, in bind
state_names=self._state_names)
File "XXX/lib/python3.5/site-packages/mxnet/module/executor_group.py", line 264, in __init__
self.bind_exec(data_shapes, label_shapes, shared_group)
File "XXX/lib/python3.5/site-packages/mxnet/module/executor_group.py", line 360, in bind_exec
shared_group))
File "XXX/lib/python3.5/site-packages/mxnet/module/executor_group.py", line 638, in _bind_ith_exec
shared_buffer=shared_data_arrays, **input_shapes)
File "XXX/lib/python3.5/site-packages/mxnet/symbol/symbol.py", line 1518, in simple_bind
raise RuntimeError(error_msg)
RuntimeError: simple_bind error. Arguments:
data: (80, 3, 112, 112)
[17:47:57] src/executor/graph_executor.cc:427: Check failed: ctx == vcontext[nid] Trying to save gradient to gpu(3) while its source node "net1_conv0_backward" computes it on gpu(0). Check your ctx in NDArray allocation.
Stack trace returned 10 entries:
[bt] (0) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x2ab998) [0x7fa4f5b99998]
[bt] (1) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x2abda8) [0x7fa4f5b99da8]
[bt] (2) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x246d243) [0x7fa4f7d5b243]
[bt] (3) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x247e64c) [0x7fa4f7d6c64c]
[bt] (4) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x248090e) [0x7fa4f7d6e90e]
[bt] (5) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x2481734) [0x7fa4f7d6f734]
[bt] (6) XXX/lib/python3.5/site-packages/mxnet/libmxnet.so(MXExecutorSimpleBind+0x2250) [0x7fa4f7ce2890]
[bt] (7) XXX/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call_unix64+0x4c) [0x7fa5a3038e20]
[bt] (8) XXX/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call+0x2eb) [0x7fa5a303888b]
[bt] (9) XXX/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(_ctypes_callproc+0x49a) [0x7fa5a303301a]
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services