Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid context string gpu(0) #60

Open
melo19890618 opened this issue Sep 20, 2019 · 1 comment
Open

Invalid context string gpu(0) #60

melo19890618 opened this issue Sep 20, 2019 · 1 comment

Comments

@melo19890618
Copy link

when i run the demo,the mistakse is:
Traceback (most recent call last):
File "demo.py", line 257, in
main()
File "demo.py", line 156, in main
arg_params=arg_params, aux_params=aux_params)
File "/home/huawei/fgfa1/Flow-Guided-Feature-Aggregation/fgfa_rfcn/core/tester.py", line 37, in init
self._mod.bind(provide_data, provide_label, for_training=False)
File "/home/huawei/fgfa1/Flow-Guided-Feature-Aggregation/fgfa_rfcn/core/module.py", line 844, in bind
for_training, inputs_need_grad, force_rebind=False, shared_module=None)
File "/home/huawei/fgfa1/Flow-Guided-Feature-Aggregation/fgfa_rfcn/core/module.py", line 401, in bind
state_names=self._state_names)
File "/home/huawei/fgfa1/Flow-Guided-Feature-Aggregation/fgfa_rfcn/core/DataParallelExecutorGroup.py", line 191, in init
self.bind_exec(data_shapes, label_shapes, shared_group)
File "/home/huawei/fgfa1/Flow-Guided-Feature-Aggregation/fgfa_rfcn/core/DataParallelExecutorGroup.py", line 277, in bind_exec
shared_group))
File "/home/huawei/fgfa1/Flow-Guided-Feature-Aggregation/fgfa_rfcn/core/DataParallelExecutorGroup.py", line 550, in _bind_ith_exec
context, self.logger)
File "/home/huawei/fgfa1/Flow-Guided-Feature-Aggregation/fgfa_rfcn/core/DataParallelExecutorGroup.py", line 528, in _get_or_reshape
arg_arr = nd.zeros(arg_shape, context, dtype=arg_type)
File "/usr/local/lib/python2.7/dist-packages/mxnet-1.6.0-py2.7.egg/mxnet/ndarray/utils.py", line 67, in zeros
return _zeros_ndarray(shape, ctx, dtype, kwargs)
File "/usr/local/lib/python2.7/dist-packages/mxnet-1.6.0-py2.7.egg/mxnet/ndarray/ndarray.py", line 4610, in zeros
return _internal._zeros(shape=shape, ctx=ctx, dtype=dtype, kwargs)
File "", line 36, in _zeros
File "/usr/local/lib/python2.7/dist-packages/mxnet-1.6.0-py2.7.egg/mxnet/_ctypes/ndarray.py", line 107, in _imperative_invoke
ctypes.byref(out_stypes)))
File "/usr/local/lib/python2.7/dist-packages/mxnet-1.6.0-py2.7.egg/mxnet/base.py", line 254, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [15:54:33] include/mxnet/./base.h:526: Invalid context string gpu(0)

Stack trace:
[bt] (0) /home/huawei/fgfa1/incubator-mxnet/lib/libmxnet.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x32) [0x7fae2c1d4da2]
[bt] (1) /home/huawei/fgfa1/incubator-mxnet/lib/libmxnet.so(mxnet::Context::FromString(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)+0x4f7) [0x7fae2ee1f777]
[bt] (2) /home/huawei/fgfa1/incubator-mxnet/lib/libmxnet.so(mxnet::imperative::GetContext(nnvm::NodeAttrs const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, mxnet::Context const&)+0x1dd) [0x7fae2ee3bb8d]
[bt] (3) /home/huawei/fgfa1/incubator-mxnet/lib/libmxnet.so(mxnet::Imperative::Invoke(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&, std::vector<mxnet::NDArray*, std::allocatormxnet::NDArray* > const&)+0x332) [0x7fae2ee28d62]
[bt] (4) /home/huawei/fgfa1/incubator-mxnet/lib/libmxnet.so(MXImperativeInvokeImpl(void*, int, void**, int*, void***, int, char const**, char const**)+0xb33) [0x7fae2f6474b3]
[bt] (5) /home/huawei/fgfa1/incubator-mxnet/lib/libmxnet.so(MXImperativeInvokeEx+0x534) [0x7fae2f649024]
[bt] (6) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fae5fe74e40]
[bt] (7) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x2eb) [0x7fae5fe748ab]
[bt] (8) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48f) [0x7fae600843df]

@Juuustin
Copy link

Same error here, did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants