caffe.set_mode_gpu() crashes on windows workstation

41 views
Skip to first unread message

braulio barahona

unread,
Oct 16, 2019, 7:43:51 AM10/16/19
to Caffe Users
We have a caffe installation in a Windows workstation we access it via its python interface. It is possible to import caffe to a python interpreter

```
import caffe
```

However, it is not possible to instantiate a model since as far as I understand, the first thing to do is to set mode and gpu

```
caffe.set_mode_gpu();
caffe.set_device(gpu_id);
```


caffe immediately crashes after either of those commands:

```
> glog.dll!00007ffd45e1b1f2() Unknown No symbols loaded.
  glog.dll!00007ffd45e1b1bb() Unknown No symbols loaded.
  glog.dll!00007ffd45e1b9a4() Unknown No symbols loaded.
  glog.dll!00007ffd45e1bbf7() Unknown No symbols loaded.
  glog.dll!00007ffd45e185e1() Unknown No symbols loaded.
  caffe.dll!00007ffd36b60995() Unknown No symbols loaded.
  _caffe.pyd!00007ffd4352b54f() Unknown No symbols loaded.
  boost_python36-vc140-mt-x64-1_67.dll!00007ffd4317dc12() Unknown No symbols loaded.
  boost_python36-vc140-mt-x64-1_67.dll!00007ffd4317e06a() Unknown No symbols loaded.
  boost_python36-vc140-mt-x64-1_67.dll!00007ffd43184b52() Unknown No symbols loaded.
  boost_python36-vc140-mt-x64-1_67.dll!00007ffd4317c12e() Unknown No symbols loaded.
  [Inline Frame] python36.dll!_PyObject_FastCallDict(_object *) Line 2331 C Symbols loaded.
  [Inline Frame] python36.dll!_PyObject_FastCallKeywords(_object *) Line 2496 C Symbols loaded.
  python36.dll!call_function(_object * * * pp_stack, __int64 oparg, _object * kwnames) Line 4848 C Symbols loaded.
  python36.dll!_PyEval_EvalFrameDefault(_frame * f, int throwflag) Line 3324 C Symbols loaded.
  [Inline Frame] python36.dll!PyEval_EvalFrameEx(_frame *) Line 753 C Symbols loaded.
  python36.dll!_PyEval_EvalCodeWithName(_object * _co, _object * globals, _object * locals, _object * * args, __int64 argcount, _object * * kwnames, _object * * kwargs, __int64 kwcount, int kwstep, _object * * defs, __int64 defcount, _object * kwdefs, _object * closure, _object * name, _object * qualname) Line 4153 C Symbols loaded.
  python36.dll!PyEval_EvalCodeEx(_object * _co, _object * globals, _object * locals, _object * * args, int argcount, _object * * kws, int kwcount, _object * * defs, int defcount, _object * kwdefs, _object * closure) Line 4181 C Symbols loaded.
  python36.dll!PyEval_EvalCode(_object * co, _object * globals, _object * locals) Line 736 C Symbols loaded.
  python36.dll!run_mod(_mod * mod, _object * filename, _object * globals, _object * locals, PyCompilerFlags * flags, _arena * arena) Line 1026 C Symbols loaded.
  python36.dll!PyRun_InteractiveOneObjectEx(_iobuf * fp, _object * filename, PyCompilerFlags * flags) Line 247 C Symbols loaded.
  python36.dll!PyRun_InteractiveLoopFlags(_iobuf * fp, const char * filename_str, PyCompilerFlags * flags) Line 114 C Symbols loaded.
  python36.dll!PyRun_AnyFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 75 C Symbols loaded.
  python36.dll!run_file(_iobuf * fp, const wchar_t * filename, PyCompilerFlags * p_cf) Line 340 C Symbols loaded.
  python36.dll!Py_Main(int argc, wchar_t * * argv) Line 811 C Symbols loaded.
  [External Code] Annotated Frame

```

Any hints as to how to solve it? Anyone with a similar problem? -- As far as I gather the installation of caffe went wrong. I did not do this myself (not that I know how to :/) but in anycase I do not have admin rights to the workstation. 

We are trying to run the Fast(er)-R-CNN models:


Thanks!
Braulio

LB

unread,
Nov 12, 2019, 10:12:08 PM11/12/19
to Caffe Users
Looks like you're missing some python dependencies, perhaps? glog and boost are libraries used with caffe, but might have been located somewhere else when your installation was done. Any chance you've deleted or moved a file folder (a big ask to remember, I know), or updated your version of python/ uninstalled reinstalled a conda distribution recently? 

It might be easier to do a clean install rather than troubleshoot this if you don't know the person who installed it on your system. Tracking down dependencies in windows (especially without C experience) can be a huge pain. This repo helped me a ton doing my windows install. 
Reply all
Reply to author
Forward
0 new messages