2017-09-24 5 views
0

を開くことができません、私は次のエラーを取得する:がtensorflowセッション

2017-09-24 10:49:20.526121: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 0 with properties: 
name: GeForce GTX 970 
major: 5 minor: 2 memoryClockRate (GHz) 1.342 
pciBusID 0000:03:00.0 
Total memory: 3.94GiB 
Free memory: 3.87GiB 
2017-09-24 10:49:20.599629: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x3dcf7e0 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that. 
2017-09-24 10:49:20.599947: E tensorflow/core/common_runtime/direct_session.cc:171] Internal: failed initializing StreamExecutor for CUDA device ordinal 1: Internal: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_INVALID_DEVICE 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/home/user/python-envs/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1486, in __init__ 
    super(Session, self).__init__(target, graph, config=config) 
    File "/home/user/python-envs/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 621, in __init__ 
    self._session = tf_session.TF_NewDeprecatedSession(opts, status) 
    File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__ 
    self.gen.next() 
    File "/home/user/python-envs/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status 
    pywrap_tensorflow.TF_GetCode(status)) 
tensorflow.python.framework.errors_impl.InternalError: Failed to create session. 

私は私のシステムに2つのGPUを持っています。表示用のものと計算用のもの:

GPU0 (display) : Nvidia NVS 310 
GPU1 (compute) : Nvidia Geforce GTX 970 
Graphics Driver: 384.66 
CUDA version : 8 
cuDNN version : v6 for CUDA 8 (April 27, 2017) 
Operating Sys. : Ubuntu 16.04 

ほかに誰かがこの問題を抱えていますか?これをデバッグ/修正するにはどうすればいいですか?

注::私はGithubで問題を開こうとしました。しかし、私が終了する前に、私はSOの早期に提起された問題を探すか、そこに尋ねるように求められました。

ありがとうございます!

答えて

0

tensorflowは、以下にリンクされているGithubの問題のように、利用可能なすべてのGPUを計算しようとしているようです。計算に使用したいデバイスに環境変数CUDA_VISIBLE_DEVICESを設定することはやりました。 Githubの上

おそらく関連の問題が含まれています:Segmentation fault when GPUs are already used

一つはnvidia-smiユーティリティを実行してUbuntuの上のデバイスIDを確認することができます。

関連する問題