memo / ofxMSATensorFlow

C++ openframeworks addon and examples integrating Google's TensorFlow numerical computation and machine learning library
Apache License 2.0
456 stars 87 forks source link

The program has unexpectedly finished? #19

Closed hsab closed 7 years ago

hsab commented 7 years ago

Hi memo. First I wanna thank you for such a wonderful contribution. Second I wanted to see if you could help me out with my issue. I'm able to successfully create a project with ProjectGenerator with ofxOpenCv addon and run it with a blank screen in Qt. However when I add the ofxMSATensorflow as an addon I'm able to build successfully but the program doesn't even start. I get "The program has unexpectedly finished.".

I'm new to Qt and Linux in general and the only reason why I'm using this IDE/arch is to test your addon. I have successfully installed Cuda 8.0, cudnn 5.1 and followed your guide. I did not install tensorflow since your addon uses its own header and lib. I would highly appreciate the help if you could point me in the right direction.

For your info:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial
$ ldconfig -p | grep libtensor
libtensorflow_cc.so (libc6,x86-64) => /usr/lib/libtensorflow_cc.so
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
$ nvidia-smi
Tue May 23 16:36:19 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.39                 Driver Version: 375.39                    |
$ ls /usr/local/cuda/include | grep cudnn
cudnn.h
$ ls /usr/local/cuda/lib64 | grep cudnn
libcudnn.so
libcudnn.so.5
libcudnn.so.5.1.10
libcudnn_static.a
$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 216:39:03
#define CUDNN_MAJOR      5
#define CUDNN_MINOR      1
#define CUDNN_PATCHLEVEL 10
--
#define CUDNN_VERSION    (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include "driver_types.h"
hsab commented 7 years ago

I managed to solve the problem by using you TF1.0 binaries instead of 1.1. In debug mode lib_TF1.0_linux64_NOPT_CUDA8.0_CUDNN5.1_2017_02_22 works perfectly and examples run. Time to play around!

memo commented 7 years ago

Hi, glad to hear that the problem was sorted. However if you are using the latest version of the code, you should be using the TF1.1 binary.

If you are getting a crash at startup it could be linked to the first problem in the FAQ https://github.com/memo/ofxMSATensorFlow/wiki/Troubleshooting-&-FAQ

hsab commented 7 years ago

@memo Unfortunately that did not solve the issue. The output of the terminal is : libstdc++6 is already the newest version (5.4.0-6ubuntu1~16.04.4).

Furthermore:

$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20 <---- 
GLIBCXX_3.4.21
GLIBCXX_DEBUG_MESSAGE_LENGTH