PreconditionNotMetError: The third-party dynamic library (libcublas.so) that Paddle depends on is no

运行paddle报错:

C++ Call Stacks (More useful to developers):
--------------------------------------------
0   std::string paddle::platform::GetTraceBackString(std::string&&, char const*, int)
1   paddle::platform::EnforceNotMet::EnforceNotMet(paddle::platform::ErrorSummary const&, char const*, int)
2   paddle::platform::dynload::GetCublasDsoHandle()
3   void std::__once_call_impl(cublasContext**)::{lambda()#1} ()> >()
4   paddle::platform::CublasHandleHolder::CublasHandleHolder(CUstream_st*, cublasMath_t)
5   paddle::platform::CUDAContext::CUDAContext(paddle::platform::CUDAPlace const&, paddle::platform::stream::Priority const&)
6   paddle::platform::CUDADeviceContext::CUDADeviceContext(paddle::platform::CUDAPlace)
7   std::_Function_handler > (), std::reference_wrapper(std::map > >, std::less, std::allocator > > > > >*, paddle::platform::Place)::{lambda()#1} ()> > >::_M_invoke(std::_Any_data const&)
8   std::_Function_handler (), std::__future_base::_Task_setter > >, std::__future_base::_Result_base::_Deleter>, std::unique_ptr > > >::_M_invoke(std::_Any_data const&)
9   std::__future_base::_State_base::_M_do_set(std::function ()>&, bool&)
10  std::__future_base::_Deferred_state(std::map > >, std::less, std::allocator > > > > >*, paddle::platform::Place)::{lambda()#1} ()>, std::unique_ptr > >::_M_run_deferred()
11  paddle::platform::DeviceContextPool::Get(paddle::platform::Place const&)
12  paddle::framework::GarbageCollector::GarbageCollector(paddle::platform::Place const&, unsigned long)
13  paddle::framework::UnsafeFastGPUGarbageCollector::UnsafeFastGPUGarbageCollector(paddle::platform::CUDAPlace const&, unsigned long)
14  paddle::framework::Executor::RunPartialPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, long, long, bool, bool, bool)
15  paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool)
16  paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector > const&, bool, bool)

----------------------
Error Message Summary:
----------------------
PreconditionNotMetError: The third-party dynamic library (libcublas.so) that Paddle depends on is not configured correctly. (error code is libcublas.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; at (/paddle/paddle/fluid/platform/dynload/dynamic_loader.cc:194)

解决方式:

找到cuda的lib64,然后设置LD_LIBRARY_PATH

export LD_LIBRARY_PATH='/usr/local/cuda-10.0/lib64/'

 

你可能感兴趣的:(深度学习)