c3014214149
c3014214149
2021-02-24 16:16

Error: libcaffe2.so: undefined reference to 的问题

在做一个大数据与湍流模型结合的计算模型。在编译solver的时候出现如下报错:

     -lm -o /home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/bin/simpleNNFoam
/usr/bin/ld: warning: libmkl_intel_lp64.so, needed by /home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmkl_gnu_thread.so, needed by /home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmkl_core.so, needed by /home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libprotobuf.so.15, needed by /home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/lib/libreynoldsnet.so, may conflict with libprotobuf.so.9
/usr/bin/ld: warning: libmkl_rt.so, needed by //home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0, not found (try using -rpath or -rpath-link)
Make/linux64GccDPInt32Opt/simpleNNFoam.o: In function `Foam::TurbulenceModel<Foam::geometricOneField, Foam::geometricOneField, Foam::incompressibleTurbulenceModel, Foam::transportModel>::New(Foam::geometricOneField const&, Foam::geometricOneField const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel const&, Foam::word const&)':
simpleNNFoam.C:(.text._ZN4Foam15TurbulenceModelINS_17geometricOneFieldES1_NS_29incompressibleTurbulenceModelENS_14transportModelEE3NewERKS1_S6_RKNS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEERKNS7_IdNS_13fvsPatchFieldENS_11surfaceMeshEEESJ_RKS3_RKNS_4wordE[_ZN4Foam15TurbulenceModelINS_17geometricOneFieldES1_NS_29incompressibleTurbulenceModelENS_14transportModelEE3NewERKS1_S6_RKNS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEERKNS7_IdNS_13fvsPatchFieldENS_11surfaceMeshEEESJ_RKS3_RKNS_4wordE]+0x35a): undefined reference to `Foam::TurbulenceModel<Foam::geometricOneField, Foam::geometricOneField, Foam::incompressibleTurbulenceModel, Foam::transportModel>::dictionaryConstructorTablePtr_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vslDeleteStream'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdLn'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsCos'
/home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/lib/libreynoldsnet.so: undefined reference to `caffe2::Workspace::RunNet(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsTanh'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_sgemv'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_saxpby'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsCbrt'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdCos'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsUnpackV'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsPackV'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_sscal'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dger_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgesdd_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgeqrf_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `ssyev_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `MKL_Domatcopy2'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dsyev_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsExpm1'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vslSkipAheadStream'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdErf'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dorgqr_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdTanh'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsExp'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dpotri_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `scopy_'
/home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/lib/libreynoldsnet.so: undefined reference to `caffe2::Workspace::GetBlob(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsPow'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdCosh'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sger_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiErrorMessage'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdExp'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsPowx'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsSinCos'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdPow'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgesv_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgels_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdMul'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiCreateDescriptor_d_md'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiCreateDescriptor_s_1d'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsAcos'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_dscal'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsAtan'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdSqr'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdSin'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dcopy_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdPackV'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsAtan'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdTanh'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_scopy'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsTan'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgels_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdSqrt'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiCreateDescriptor_d_1d'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdLog2'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdDiv'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgemm_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dtrtrs_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiCreateDescriptor_s_md'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiFreeDescriptor'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sorgqr_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `MKL_Set_Dynamic'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdTan'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `spotrs_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dpstrf_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgetri_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdErfc'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgetrs_'
//home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined reference to `cblas_gemm_s8u8s32'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdInvSqrt'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vslNewStream'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsErfc'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dpotrf_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsRngUniform'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_dgemm_batch'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgetri_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dswap_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdSub'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdExpm1'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdLog10'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsAsin'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdLog1p'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `MKL_Somatcopy'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdAtan'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiCommitDescriptor'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_dcopy'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsErf'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdLn'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdPowx'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdSinh'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiComputeForward'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sormqr_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdTrunc'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsLn'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsAbs'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `daxpy_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgeqrf_'
//home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined reference to `cblas_sgemm_alloc'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsInv'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `viRngBernoulli'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdTan'
//home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined reference to `vsExp'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_saxpy'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdAcos'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsInvSqrt'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsCosh'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsLog10'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsLog1p'
//home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined reference to `cblas_sgemm_pack'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsMul'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsCos'
/home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/lib/libreynoldsnet.so: undefined reference to `c10::enforce_detail::EnforceFailMessage::EnforceFailMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `strtrs_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dormqr_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgemv_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiSetValue'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dpotrs_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsSqrt'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dscal_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `MKL_Get_Max_Threads'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgemm_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_sgemm'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsSin'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsSqrt'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsTan'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgesv_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdInv'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_sgemm_batch'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiErrorClass'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsLog2'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdAsin'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgetrf_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `DftiComputeBackward'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `MKL_Domatcopy'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsSin'
//home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined reference to `cblas_sgemm_free'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdAdd'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgeev_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsSqr'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgetrf_'
//home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined reference to `cblas_sgemm_compute'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsSinh'
/home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/lib/libreynoldsnet.so: undefined reference to `c10::ThrowEnforceNotMet(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void const*)'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsSub'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdSqrt'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `spotrf_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgetrs_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdAsin'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `spstrf_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdCbrt'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdAbs'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `MKL_Set_Num_Threads'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsAcos'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `dgesdd_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsAsin'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdSin'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `saxpy_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgeev_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `spotri_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sgemv_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `MKL_Somatcopy2'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsTrunc'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `ddot_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmsLn'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdAcos'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsTanh'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdSinCos'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsDiv'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vsAdd'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vmdCos'
/home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/lib/libreynoldsnet.so: undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sscal_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdAtan'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `sswap_'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `vdUnpackV'
/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib/libcaffe2.so: undefined reference to `cblas_sdot'
collect2: error: ld returned 1 exit status
/home/cbq/OpenFOAM/OpenFOAM-4.1/wmake/makefiles/general:132: recipe for target '/home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/bin/simpleNNFoam' failed
make: *** [/home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/bin/simpleNNFoam] Error 1

看上去应该是缺少caffe2的链接

我的option文件内容如下:

EXE_INC = \
    -I/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib \
    -I/home/cbq/anaconda3/envs/mytorch/lib \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude \
    -I/home/cbq/run/test/TurbulenceModels/testincompressible/lnInclude \
    -I/home/cbq/run/test/transportModels \
    -I/home/cbq/run/test/transportModels/testincompressible/testsinglePhaseTransportModel \
    -I/home/cbq/run/test/TurbulenceModels/turbulenceModels/reynoldsNet/lnInclude \
    -I/home/cbq/run/test/TurbulenceModels/turbulenceModels/lnInclude \
    -I/home/cbq/run/test/TurbulenceModels/testincompressible/lnInclude \



EXE_LIBS = \
    -lprotobuf -lglog -lgflags -lpthread \
    -L/home/cbq/OpenFOAM/cbq-4.1/platforms/linux64GccDPInt32Opt/lib \
    -L/home/cbq/anaconda3/envs/mytorch/lib/python3.6/site-packages/torch/lib \
    -lc10 \
    -lcaffe2 \
    -lreynoldsnet \
    -ltestturbulenceModels \
    -ltestincompressibleTurbulenceModels \
    -ltestincompressibleTransportModels \
    -lfiniteVolume \
    -lmeshTools \
    -lfvOptions \
    -lsampling \

求各位大神指点一二

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

为你推荐