大服务器配置tensorflow环境

大服务器配置tensorflow环境

 

创建环境

(base) bim@bim-PowerEdge-R730:~$ conda create -n mask_rcnn_tf2 python==3.7
Solving environment: done

## Package Plan ##

  environment location: /home/bim/anaconda3/envs/mask_rcnn_tf2

  added / updated specs: 
    - python==3.7


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    readline-7.0               |       h7b6447c_5         392 KB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    openssl-1.0.2u             |       h7b6447c_0         3.1 MB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    libedit-3.1.20210910       |       h7f8727e_0         191 KB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    python-3.7.0               |       h6e4f718_3        30.6 MB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    sqlite-3.33.0              |       h62c20be_0         2.0 MB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    ------------------------------------------------------------
                                           Total:        36.3 MB

The following NEW packages will be INSTALLED:

    _libgcc_mutex:   0.1-main                 http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    ca-certificates: 2022.4.26-h06a4308_0     http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    certifi:         2021.10.8-py37h06a4308_2 http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    libedit:         3.1.20210910-h7f8727e_0  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    libffi:          3.2.1-1                  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
    libgcc-ng:       9.1.0-hdf63c60_0         http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    libstdcxx-ng:    9.1.0-hdf63c60_0         http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    ncurses:         6.3-h7f8727e_2           http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    openssl:         1.0.2u-h7b6447c_0        http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    pip:             21.2.2-py37h06a4308_0    http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    python:          3.7.0-h6e4f718_3         http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    readline:        7.0-h7b6447c_5           http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    setuptools:      61.2.0-py37h06a4308_0    http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    sqlite:          3.33.0-h62c20be_0        http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    tk:              8.6.11-h1ccaba5_0        http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    wheel:           0.37.1-pyhd3eb1b0_0      http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    xz:              5.2.5-h7f8727e_1         http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    zlib:            1.2.11-0                 http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

Proceed ([y]/n)? y


Downloading and Extracting Packages
readline-7.0         | 392 KB    | ###################################################################################################################################################################################################### | 100% 
openssl-1.0.2u       | 3.1 MB    | ###################################################################################################################################################################################################### | 100% 
libedit-3.1.20210910 | 191 KB    | ###################################################################################################################################################################################################### | 100% 
python-3.7.0         | 30.6 MB   | ###################################################################################################################################################################################################### | 100% 
sqlite-3.33.0        | 2.0 MB    | ###################################################################################################################################################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate mask_rcnn_tf2
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) bim@bim-PowerEdge-R730:~$ 
(base) bim@bim-PowerEdge-R730:~$ 
(base) bim@bim-PowerEdge-R730:~$ 
(base) bim@bim-PowerEdge-R730:~$ 
(base) bim@bim-PowerEdge-R730:~$ 
(base) bim@bim-PowerEdge-R730:~$ uname -a
Linux bim-PowerEdge-R730 5.13.0-30-generic #33~20.04.1-Ubuntu SMP Mon Feb 7 14:25:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
(base) bim@bim-PowerEdge-R730:~$ 
(base) bim@bim-PowerEdge-R730:~$ 
(base) bim@bim-PowerEdge-R730:~$ 

 

 

激活环境

conda activate mask_rcnn_tf2

 

安装tensorflow-gpu

(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ 
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ 
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ 
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ pip install tensorflow-gpu==2.3.0
Collecting tensorflow-gpu==2.3.0
  Downloading tensorflow_gpu-2.3.0-cp37-cp37m-manylinux2010_x86_64.whl (320.4 MB)
     |████████████████████████████████| 320.4 MB 57 kB/s 
Collecting h5py<2.11.0,>=2.10.0
  Using cached h5py-2.10.0-cp37-cp37m-manylinux1_x86_64.whl (2.9 MB)
Collecting absl-py>=0.7.0
  Using cached absl_py-1.0.0-py3-none-any.whl (126 kB)
Collecting tensorflow-estimator<2.4.0,>=2.3.0
  Downloading tensorflow_estimator-2.3.0-py2.py3-none-any.whl (459 kB)
     |████████████████████████████████| 459 kB 4.7 MB/s 
Collecting google-pasta>=0.1.8
  Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Collecting opt-einsum>=2.3.2
  Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting tensorboard<3,>=2.3.0
  Using cached tensorboard-2.9.0-py3-none-any.whl (5.8 MB)
Collecting scipy==1.4.1
  Downloading scipy-1.4.1-cp37-cp37m-manylinux1_x86_64.whl (26.1 MB)
     |████████████████████████████████| 26.1 MB 4.1 MB/s 
Collecting numpy<1.19.0,>=1.16.0
  Downloading numpy-1.18.5-cp37-cp37m-manylinux1_x86_64.whl (20.1 MB)
     |████████████████████████████████| 20.1 MB 6.4 MB/s 
Collecting six>=1.12.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting keras-preprocessing<1.2,>=1.1.1
  Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: wheel>=0.26 in ./anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages (from tensorflow-gpu==2.3.0) (0.37.1)
Collecting wrapt>=1.11.1
  Using cached wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (75 kB)
Collecting termcolor>=1.1.0
  Using cached termcolor-1.1.0-py3-none-any.whl
Collecting gast==0.3.3
  Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting protobuf>=3.9.2
  Using cached protobuf-3.20.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB)
Collecting grpcio>=1.8.6
  Using cached grpcio-1.46.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB)
Collecting astunparse==1.6.3
  Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting werkzeug>=1.0.1
  Using cached Werkzeug-2.1.2-py3-none-any.whl (224 kB)
Collecting google-auth<3,>=1.6.3
  Using cached google_auth-2.6.6-py2.py3-none-any.whl (156 kB)
Collecting tensorboard-plugin-wit>=1.6.0
  Using cached tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
Requirement already satisfied: setuptools>=41.0.0 in ./anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow-gpu==2.3.0) (61.2.0)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
  Using cached tensorboard_data_server-0.6.1-py3-none-manylinux2010_x86_64.whl (4.9 MB)
Collecting requests<3,>=2.21.0
  Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Using cached google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting markdown>=2.6.8
  Using cached Markdown-3.3.7-py3-none-any.whl (97 kB)
Collecting rsa<5,>=3.1.4
  Using cached rsa-4.8-py3-none-any.whl (39 kB)
Collecting cachetools<6.0,>=2.0.0
  Using cached cachetools-5.1.0-py3-none-any.whl (9.2 kB)
Collecting pyasn1-modules>=0.2.1
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting requests-oauthlib>=0.7.0
  Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting importlib-metadata>=4.4
  Using cached importlib_metadata-4.11.3-py3-none-any.whl (18 kB)
Collecting typing-extensions>=3.6.4
  Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Collecting zipp>=0.5
  Using cached zipp-3.8.0-py3-none-any.whl (5.4 kB)
Collecting pyasn1<0.5.0,>=0.4.6
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Requirement already satisfied: certifi>=2017.4.17 in ./anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow-gpu==2.3.0) (2021.10.8)
Collecting oauthlib>=3.0.0
  Using cached oauthlib-3.2.0-py3-none-any.whl (151 kB)
Installing collected packages: urllib3, pyasn1, idna, charset-normalizer, zipp, typing-extensions, six, rsa, requests, pyasn1-modules, oauthlib, cachetools, requests-oauthlib, importlib-metadata, google-auth, werkzeug, tensorboard-plugin-wit, tensorboard-data-server, protobuf, numpy, markdown, grpcio, google-auth-oauthlib, absl-py, wrapt, termcolor, tensorflow-estimator, tensorboard, scipy, opt-einsum, keras-preprocessing, h5py, google-pasta, gast, astunparse, tensorflow-gpu
Successfully installed absl-py-1.0.0 astunparse-1.6.3 cachetools-5.1.0 charset-normalizer-2.0.12 gast-0.3.3 google-auth-2.6.6 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.46.1 h5py-2.10.0 idna-3.3 importlib-metadata-4.11.3 keras-preprocessing-1.1.2 markdown-3.3.7 numpy-1.18.5 oauthlib-3.2.0 opt-einsum-3.3.0 protobuf-3.20.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.27.1 requests-oauthlib-1.3.1 rsa-4.8 scipy-1.4.1 six-1.16.0 tensorboard-2.9.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-estimator-2.3.0 tensorflow-gpu-2.3.0 termcolor-1.1.0 typing-extensions-4.2.0 urllib3-1.26.9 werkzeug-2.1.2 wrapt-1.14.1 zipp-3.8.0
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ 
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ 
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ 
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ 
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ 

 

 

 查看gpu是否可用

print(tf.test.is_gpu_available())

 

(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ python
Python 3.7.0 (default, Oct  9 2018, 10:31:47) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> 
>>> 
>>> import tensorflow as tf
2022-05-17 20:51:25.689564: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
>>> 
>>> 
>>> 
>>> 
>>> 
>>> tf.__version__
'2.3.0'
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> print(tf.test.is_gpu_available())
WARNING:tensorflow:From <stdin>:1: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
2022-05-17 20:52:43.931591: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-05-17 20:52:43.963271: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2399985000 Hz
2022-05-17 20:52:43.964706: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x562dc2276bb0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2022-05-17 20:52:43.964727: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2022-05-17 20:52:43.967131: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1
2022-05-17 20:52:45.327224: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x562dc13c0950 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2022-05-17 20:52:45.327271: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Tesla P100-PCIE-12GB, Compute Capability 6.0
2022-05-17 20:52:45.327280: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (1): Tesla P100-PCIE-12GB, Compute Capability 6.0
2022-05-17 20:52:45.328289: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: 
pciBusID: 0000:04:00.0 name: Tesla P100-PCIE-12GB computeCapability: 6.0
coreClock: 1.3285GHz coreCount: 56 deviceMemorySize: 11.91GiB deviceMemoryBandwidth: 511.41GiB/s
2022-05-17 20:52:45.329022: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 1 with properties: 
pciBusID: 0000:82:00.0 name: Tesla P100-PCIE-12GB computeCapability: 6.0
coreClock: 1.3285GHz coreCount: 56 deviceMemorySize: 11.91GiB deviceMemoryBandwidth: 511.41GiB/s
2022-05-17 20:52:45.329055: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2022-05-17 20:52:45.329317: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcublas.so.10'; dlerror: libcublas.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64
2022-05-17 20:52:45.354650: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10
2022-05-17 20:52:45.362046: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10
2022-05-17 20:52:45.362163: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64
2022-05-17 20:52:45.362260: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcusparse.so.10'; dlerror: libcusparse.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64
2022-05-17 20:52:45.362309: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7
2022-05-17 20:52:45.362319: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1753] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2022-05-17 20:52:45.362340: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2022-05-17 20:52:45.362350: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263]      0 1 
2022-05-17 20:52:45.362358: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0:   N N 
2022-05-17 20:52:45.362365: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 1:   N N 
False
>>> 
>>> 
>>> 
View Code

 

 显示gpu不可用,提示:

Could not load dynamic library 'libcublas.so.10'; dlerror: libcublas.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64
Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64
Could not load dynamic library 'libcurand.so.10'; dlerror: libcurand.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64
Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64
Could not load dynamic library 'libcusparse.so.10'; dlerror: libcusparse.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64
Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.4/lib64:/usr/local/cuda-11.4/lib64::/usr/local/cuda/lib64

 

libcublas.so.10  libcufft.so.10   libcurand.so.10    libcusolver.so.10    libcusparse.so.10    libcudnn.so.7  文件都无法找到

 

 

使用root账户,进入

cd /usr/local/cuda-11.4/lib64

 

运行以下命令

ln -sf libcublas.so.11.5.2.43  libcublas.so.10
ln -sf libcufft.so.10.5.0.43  libcufft.so.10
ln -sf libcurand.so.10.2.5.43  libcurand.so.10
ln -sf libcusolver.so.11.2.0.43  libcusolver.so.10
ln -sf libcusparse.so.11.6.0.43  libcusparse.so.10
ln -sf libcudnn.so.8  libcudnn.so.7

 

然后再运行

(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~$ python
Python 3.7.0 (default, Oct  9 2018, 10:31:47) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> 
>>> import tensorflow as tf
2022-05-17 21:56:44.976375: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1

>>> 
>>> 
>>> 
>>> 
>>> 
>>> print(tf.test.is_gpu_available())
WARNING:tensorflow:From <stdin>:1: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
2022-05-17 21:56:49.260798: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-05-17 21:56:49.291322: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2399975000 Hz
2022-05-17 21:56:49.292677: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x561584bd1c90 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2022-05-17 21:56:49.292698: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2022-05-17 21:56:49.294936: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1
2022-05-17 21:56:49.698527: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5615825c83f0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2022-05-17 21:56:49.698580: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Tesla P100-PCIE-12GB, Compute Capability 6.0
2022-05-17 21:56:49.698596: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (1): Tesla P100-PCIE-12GB, Compute Capability 6.0
2022-05-17 21:56:49.700391: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: 
pciBusID: 0000:04:00.0 name: Tesla P100-PCIE-12GB computeCapability: 6.0
coreClock: 1.3285GHz coreCount: 56 deviceMemorySize: 11.91GiB deviceMemoryBandwidth: 511.41GiB/s
2022-05-17 21:56:49.701804: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 1 with properties: 
pciBusID: 0000:82:00.0 name: Tesla P100-PCIE-12GB computeCapability: 6.0
coreClock: 1.3285GHz coreCount: 56 deviceMemorySize: 11.91GiB deviceMemoryBandwidth: 511.41GiB/s
2022-05-17 21:56:49.701858: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2022-05-17 21:56:49.709602: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10
2022-05-17 21:56:49.712853: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10
2022-05-17 21:56:49.713111: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10
2022-05-17 21:56:49.713657: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10
2022-05-17 21:56:49.714620: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10
2022-05-17 21:56:49.714756: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7
2022-05-17 21:56:49.717598: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0, 1
2022-05-17 21:56:49.717635: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2022-05-17 21:56:50.512900: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2022-05-17 21:56:50.512958: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263]      0 1 
2022-05-17 21:56:50.512968: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0:   N N 
2022-05-17 21:56:50.512973: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 1:   N N 
2022-05-17 21:56:50.515585: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/device:GPU:0 with 11112 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-12GB, pci bus id: 0000:04:00.0, compute capability: 6.0)
2022-05-17 21:56:50.516767: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/device:GPU:1 with 11112 MB memory) -> physical GPU (device: 1, name: Tesla P100-PCIE-12GB, pci bus id: 0000:82:00.0, compute capability: 6.0)
True
>>> 
>>> 
>>> 

 

显示两块显卡都在

 

 

 

 

 

######################

posted @ 2022-05-17 20:34  西北逍遥  阅读(135)  评论(0编辑  收藏  举报