编译错误:模型在windows环境下可成功预测,但是在linux上报错
Created by: huangyunhua
PaddlePaddle版本:1.6.1 系统环境:linux,python 3.6
windows上的安装时用pip linux安装是先下载各项依赖包,然后用pip install --no-index --find-links=/usr/packages/download/ paddlepaddle安装的(已经用install_check_run测试显示安装成功)
报错信息如下 /opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/executor.py:774: UserWarning: The following exception is not an EOF exception. "The following exception is not an EOF exception.") Traceback (most recent call last): File "./Senta-master/sentiment_classify.py", line 287, in main(args) File "./Senta-master/sentiment_classify.py", line 282, in main args.model_path) File "./Senta-master/sentiment_classify.py", line 225, in infer_net fetch_targets] = fluid.io.load_inference_model(model_path, exe) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/io.py", line 1328, in load_inference_model load_persistables(executor, load_dirname, program, params_filename) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/io.py", line 849, in load_persistables filename=filename) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/io.py", line 682, in load_vars filename=filename) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/io.py", line 726, in load_vars executor.run(load_prog) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/executor.py", line 775, in run six.reraise(*sys.exc_info()) File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/six.py", line 696, in reraise raise value File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/executor.py", line 770, in run use_program_cache=use_program_cache) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/executor.py", line 817, in _run_impl use_program_cache=use_program_cache) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/executor.py", line 894, in _run_program fetch_var_name) paddle.fluid.core_avx.EnforceNotMet:
C++ Call Stacks (More useful to developers):
0 std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&&&, char const*, int) 1 paddle::memory::detail::AlignedMalloc(unsigned long) 2 paddle::memory::detail::CPUAllocator::Alloc(unsigned long*, unsigned long) 3 paddle::memory::detail::BuddyAllocator::SystemAlloc(unsigned long) 4 paddle::memory::detail::BuddyAllocator::Alloc(unsigned long) 5 void* paddle::memory::legacy::Allocpaddle::platform::CPUPlace(paddle::platform::CPUPlace const&, unsigned long) 6 paddle::memory::allocation::NaiveBestFitAllocator::AllocateImpl(unsigned long) 7 paddle::memory::allocation::AllocatorFacade::Alloc(boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&, unsigned long) 8 paddle::memory::allocation::AllocatorFacade::AllocShared(boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&, unsigned long) 9 paddle::memory::AllocShared(boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&, unsigned long) 10 paddle::framework::Tensor::mutable_data(boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>, paddle::framework::proto::VarType_Type, unsigned long) 11 void paddle::framework::VisitDataTypepaddle::framework::DeserializedDataFunctor(paddle::framework::proto::VarType_Type, paddle::framework::DeserializedDataFunctor) 12 paddle::framework::TensorFromStream(std::istream&, paddle::framework::Tensor*, paddle::platform::DeviceContext const&) 13 paddle::framework::DeserializeFromStream(std::istream&, paddle::framework::LoDTensor*, paddle::platform::DeviceContext const&) 14 paddle::operators::LoadOpKernel<paddle::platform::CPUDeviceContext, float>::LoadLodTensor(std::istream&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&, paddle::framework::Variable*, paddle::framework::ExecutionContext const&) const 15 paddle::operators::LoadOpKernel<paddle::platform::CPUDeviceContext, float>::Compute(paddle::framework::ExecutionContext const&) const 16 ZNSt17_Function_handlerIFvRKN6paddle9framework16ExecutionContextEEZNKS1_24OpKernelRegistrarFunctorINS0_8platform8CPUPlaceELb0ELm0EJNS0_9operators12LoadOpKernelINS7_16CPUDeviceContextEfEENSA_ISB_dEENSA_ISB_iEENSA_ISB_aEENSA_ISB_lEEEEclEPKcSJ_iEUlS4_E_E9_M_invokeERKSt9_Any_dataS4 17 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&, paddle::framework::RuntimeContext*) const 18 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) const 19 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) 20 paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) 21 paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocatorstd::string > const&, bool)
Python Call Stacks (More useful to users):
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/framework.py", line 2459, in append_op attrs=kwargs.get("attrs", None)) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/io.py", line 711, in load_vars 'file_path': os.path.join(load_dirname, new_var.name) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/io.py", line 682, in load_vars filename=filename) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/io.py", line 849, in load_persistables filename=filename) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/paddle/fluid/io.py", line 1328, in load_inference_model load_persistables(executor, load_dirname, program, params_filename) File "./Senta-master/sentiment_classify.py", line 225, in infer_net fetch_targets] = fluid.io.load_inference_model(model_path, exe) File "./Senta-master/sentiment_classify.py", line 282, in main args.model_path) File "./Senta-master/sentiment_classify.py", line 287, in main(args)
Error Message Summary:
PaddleCheckError: Expected posix_memalign(&p, alignment, size) == 0, but received posix_memalign(&p, alignment, size):12 != 0:0. Alloc 641634304 error! at [/paddle/paddle/fluid/memory/detail/system_allocator.cc:59] [operator < load > error]