Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Lakshmi_U_Intel
Employee
1,350 Views

Failed to load the native TensorFlow runtime

Hello, I am getting an error when I want to run TensorFlow in the compute node of AI DevCloud.

[u19741@c009-n031 ~]$ python

Python 3.6.3 |Intel Corporation| (default, Feb 12 2018, 06:37:09)

[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux

Type "help", "copyright", "credits" or "license" for more information.

Intel(R) Distribution for Python is brought to you by Intel Corporation.

Please check out: https://software.intel.com/en-us/python-distribution https://software.intel.com/en-us/python-distribution

>>> import tensorflow as tf

Traceback (most recent call last):

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in

_pywrap_tensorflow_internal = swig_import_helper()

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper

_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

File "/glob/intel-python/python3/lib/python3.6/imp.py", line 243, in load_module

return load_dynamic(name, filename, file)

File "/glob/intel-python/python3/lib/python3.6/imp.py", line 343, in load_dynamic

return _load(spec)

ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 1, in

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in

from tensorflow.python import * # pylint: disable=redefined-builtin

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in

from tensorflow.python import pywrap_tensorflow

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in

raise ImportError(msg)

ImportError: Traceback (most recent call last):

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in

_pywrap_tensorflow_internal = swig_import_helper()

File "/home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper

_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

File "/glob/intel-python/python3/lib/python3.6/imp.py", line 243, in load_module

return load_dynamic(name, filename, file)

File "/glob/intel-python/python3/lib/python3.6/imp.py", line 343, in load_dynamic

return _load(spec)

ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/u19741/.local/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources%23common_installation_problems https://www.tensorflow.org/install/install_sources# common_installation_problems

for some common reasons and solutions. Include the entire stack trace

above this error message when asking for help.

0 Kudos
1 Reply
Lakshmi_U_Intel
Employee
1,350 Views

Answer:

Here the problem is with gcc version. Please use gcc 6.4.0 for the installation of tensorflow.

Below are the steps to install Intel optimized tensorflow in conda environment.

conda create -n tf_1.10 -c intel python=3.6
 
source activate tf_1.10

Make sure the following lines are there in the bash_profile and source it.

export CC=/glob/development-tools/versions/gcc-6.4.0/bin/gcc
 

export LD_LIBRARY_PATH=/glob/development-tools/versions/gcc-6.4.0/lib64/:$LD_LIBRARY_PATH
 

export PATH=/glob/development-tools/versions/gcc-6.4.0/bin/:$PATH
 

If the path setting was successful, you should be able to see the gcc version 6.4.0 on typing gcc --version

If you get the error ImportError: /lib64/libm.so.6: version `GLIBC_2.23' not found, please follow the steps below:

mkdir ~/lib
 
cd ~/lib
 
ln -s /glob/supplementary-software/versions/glibc/glibc_2_28/lib/libm.so.6

Then export the LD_LIBRARY_PATH for it:

export LD_LIBRARY_PATH=~/lib:$LD_LIBRARY_PATH

Then, install tensorflow 1.10 using: pip install https://storage.googleapis.com/intel-optimized-tensorflow/tensorflow-1.10.0-cp36-cp36m-linux_x86_64.whl

Reply