Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装paddle出现问题 #49106

Closed
dfcs008 opened this issue Dec 15, 2022 · 10 comments
Closed

安装paddle出现问题 #49106

dfcs008 opened this issue Dec 15, 2022 · 10 comments
Assignees
Labels
status/need-more-info 信息不全 type/build 编译/安装问题

Comments

@dfcs008
Copy link

dfcs008 commented Dec 15, 2022

重新安装了pytorch 11.7 cuda版本。 显示torch.cuda.isavailable 为True cudnn也有。 然后安装了paddle
conda install paddlepaddle-gpu==2.4.1 cudatoolkit=11.7 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge

运行import paddle 没出现问题
运行paddle.utils.run_check() 出现如下问题

paddle.utils.run_check()
Running verify PaddlePaddle program ...
W1215 14:25:46.643707 14556 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.7, Runtime API Version: 11.7
W1215 14:25:46.644002 14556 dynamic_loader.cc:307] The third-party dynamic library (libcudnn.so) that Paddle depends on is not configured correctly. (error code is /usr/local/cuda/lib64/libcudnn.so: cannot open shared object file: No such file or directory)
Suggestions:

  1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed.
  2. Configure third-party dynamic library environment variables as follows:
  • Linux: set LD_LIBRARY_PATH by export LD_LIBRARY_PATH=...

  • Windows: set PATH by `set PATH=XXX;
    Traceback (most recent call last):
    File "", line 1, in
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 269, in run_check
    _run_static_single(use_cuda, use_xpu, use_npu)
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 173, in _run_static_single
    exe.run(startup_prog)
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/executor.py", line 1463, in run
    six.reraise(*sys.exc_info())
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/six.py", line 719, in reraise
    raise value
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/executor.py", line 1450, in run
    res = self._run_impl(program=program,
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/executor.py", line 1661, in _run_impl
    return new_exe.run(scope, list(feed.keys()), fetch_list,
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/executor.py", line 631, in run
    tensors = self._new_exe.run(scope, feed_names,
    RuntimeError: In user code:

    File "", line 1, in

    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 269, in run_check
    _run_static_single(use_cuda, use_xpu, use_npu)
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 159, in _run_static_single
    input, out, weight = _simple_network()
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 33, in _simple_network
    weight = paddle.create_parameter(
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/layers/tensor.py", line 152, in create_parameter
    return helper.create_parameter(attr, shape, convert_dtype(dtype), is_bias,
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/layer_helper_base.py", line 381, in create_parameter
    self.startup_program.global_block().create_parameter(
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/framework.py", line 3965, in create_parameter
    initializer(param, self)
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/initializer.py", line 56, in call
    return self.forward(param, block)
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/initializer.py", line 184, in forward
    op = block.append_op(type="fill_constant",
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/framework.py", line 4017, in append_op
    op = Operator(
    File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/framework.py", line 2858, in init
    for frame in traceback.extract_stack():

    PreconditionNotMetError: Cannot load cudnn shared library. Cannot invoke method cudnnGetVersion.
    [Hint: cudnn_dso_handle should not be null.] (at /paddle/paddle/phi/backends/dynload/cudnn.cc:60)
    [operator < fill_constant > error]

而后我所搜了一下,找到了这篇:
https://blog.csdn.net/weixin_41255438/article/details/124144722
运行了 find / -name 'cudnn'
并找到并运行了类似的命令, export LD_LIBRARY_PATH='/usr/local/anaconda3/envs/rasa-gpu/lib/'
后再运行import paddle 没出现问题
运行paddle.utils.run_check() 出现如下问题
paddle.utils.run_check()
Running verify PaddlePaddle program ...
W1215 14:42:27.344878 14576 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.7, Runtime API Version: 11.7
W1215 14:42:27.351974 14576 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4.
Traceback (most recent call last):
File "", line 1, in
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 269, in run_check
_run_static_single(use_cuda, use_xpu, use_npu)
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 173, in _run_static_single
exe.run(startup_prog)
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/executor.py", line 1463, in run
six.reraise(*sys.exc_info())
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/six.py", line 719, in reraise
raise value
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/executor.py", line 1450, in run
res = self._run_impl(program=program,
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/executor.py", line 1661, in _run_impl
return new_exe.run(scope, list(feed.keys()), fetch_list,
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/executor.py", line 631, in run
tensors = self._new_exe.run(scope, feed_names,
OSError: In user code:

File "<stdin>", line 1, in <module>
  
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 269, in run_check
  _run_static_single(use_cuda, use_xpu, use_npu)
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 159, in _run_static_single
  input, out, weight = _simple_network()
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/utils/install_check.py", line 33, in _simple_network
  weight = paddle.create_parameter(
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/layers/tensor.py", line 152, in create_parameter
  return helper.create_parameter(attr, shape, convert_dtype(dtype), is_bias,
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/layer_helper_base.py", line 381, in create_parameter
  self.startup_program.global_block().create_parameter(
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/framework.py", line 3965, in create_parameter
  initializer(param, self)
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/initializer.py", line 56, in __call__
  return self.forward(param, block)
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/initializer.py", line 184, in forward
  op = block.append_op(type="fill_constant",
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/framework.py", line 4017, in append_op
  op = Operator(
File "/home/bdhxx/miniconda3/envs/flc-HRnet/lib/python3.9/site-packages/paddle/fluid/framework.py", line 2858, in __init__
  for frame in traceback.extract_stack():

ExternalError: CUDA error(214), uncorrectable ECC error encountered. 
  [Hint: Please search for the error code(214) on website (https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g3f51e3575c2178246db0a94a430e0038) to get Nvidia's official solution and advice about CUDA Error.] (at /paddle/paddle/phi/core/cuda_stream.h:73)
  [operator < fill_constant > error]
@dfcs008 dfcs008 added status/new-issue 新建 type/build 编译/安装问题 labels Dec 15, 2022
@paddle-bot
Copy link

paddle-bot bot commented Dec 15, 2022

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@dfcs008
Copy link
Author

dfcs008 commented Dec 15, 2022

本GPU服务器已经安装了pytorch, 并成功运行了很多程序。

@yt605155624 yt605155624 added status/following-up 跟进中 and removed status/new-issue 新建 labels Dec 16, 2022
@yt605155624
Copy link
Contributor

Hint: Please search for the error code(214) on website (https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g3f51e3575c2178246db0a94a430e0038) to get Nvidia's official solution and advice about CUDA Error.

@paddle-bot paddle-bot bot added status/need-more-info 信息不全 and removed status/following-up 跟进中 labels Dec 16, 2022
@dfcs008
Copy link
Author

dfcs008 commented Dec 16, 2022

Hint: Please search for the error code(214) on website (https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g3f51e3575c2178246db0a94a430e0038) to get Nvidia's official solution and advice about CUDA Error.

why did pytorch work when I just pip install ?

@dfcs008
Copy link
Author

dfcs008 commented Dec 16, 2022

Hint: Please search for the error code(214) on website (https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g3f51e3575c2178246db0a94a430e0038) to get Nvidia's official solution and advice about CUDA Error.

so how can I solve the problem? I could not find the answer

@ghost
Copy link

ghost commented Jan 10, 2023

看来不是我一个人有这个问题,本来想支持一波国产框架,发现我不配,🦀🦀,安装都装不上

@zxjt2012
Copy link

zxjt2012 commented Jan 24, 2023

我是用anaconda安装的,也出现这个问题,输入下面命令,暂时解决。
export LD_LIBRARY_PATH='/home/{用户名}/anaconda3/envs/{虚拟环境名}/lib/'

pa>>> paddle.utils.run_check()
Running verify PaddlePaddle program ...
W0124 22:52:18.063221 126315 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 12.0, Runtime API Version: 11.7
W0124 22:52:18.068292 126315 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4.
PaddlePaddle works well on 1 GPU.
PaddlePaddle works well on 1 GPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

@ghost
Copy link

ghost commented Feb 10, 2023

我用的miniconda,然后挂代理,从国外访问下载,才成功了。可能是conda访问网络有问题。

@hushuguo
Copy link

我发现还是不行

Copy link

paddle-bot bot commented May 14, 2024

Since you haven't replied for more than a year, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
由于您超过一年未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-more-info 信息不全 type/build 编译/安装问题
Projects
None yet
Development

No branches or pull requests

4 participants