- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个奇怪的错误,一段时间以来我都没有设法解决。我想通过与英特尔 OpenVINO 的推理引擎一起使用来扩展一个 C++ 软件包。因此,我必须动态链接一些库并将一些 header 包含到现有代码中。之前,它编译没有任何错误。然后我包含找到的第一个头文件 (#include "inference_engine.hpp"),但我收到此错误消息
In file included from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/VectorSpaceI.H:26:0,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/VectorSpace.H:230,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Vector.H:44,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/vector.H:39,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/fieldTypes.H:35,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/primitiveFieldsFwd.H:36,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:44,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:13: error: ‘FatalError’ in namespace ‘Foam’ does not name a type
::Foam::FatalError((functionName), __FILE__, __LINE__)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:358:5: note: in expansion of macro ‘FatalErrorIn’
FatalErrorIn(functionName) \
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
class NotImplemented : public std::logic_error
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/messageStream.H:225:27: error: expected unqualified-id before ‘__PRETTY_FUNCTION__’
#define FUNCTION_NAME __PRETTY_FUNCTION__
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:25: note: in definition of macro ‘FatalErrorIn’
::Foam::FatalError((functionName), __FILE__, __LINE__)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:39: note: in expansion of macro ‘FUNCTION_NAME’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
class NotImplemented : public std::logic_error
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/messageStream.H:225:27: error: expected ‘)’ before ‘__PRETTY_FUNCTION__’
#define FUNCTION_NAME __PRETTY_FUNCTION__
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:25: note: in definition of macro ‘FatalErrorIn’
::Foam::FatalError((functionName), __FILE__, __LINE__)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:39: note: in expansion of macro ‘FUNCTION_NAME’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
class NotImplemented : public std::logic_error
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/messageStream.H:225:27: error: expected ‘)’ before ‘__PRETTY_FUNCTION__’
#define FUNCTION_NAME __PRETTY_FUNCTION__
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:25: note: in definition of macro ‘FatalErrorIn’
::Foam::FatalError((functionName), __FILE__, __LINE__)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:39: note: in expansion of macro ‘FUNCTION_NAME’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
class NotImplemented : public std::logic_error
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/ie_blob.h:20:0,
from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:16,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:22: error: expected unqualified-id before ‘:’ token
class NotImplemented : public std::logic_error
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:16:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/ie_blob.h: In static member function ‘static size_t InferenceEngine::Blob::product(const SizeVector&)’:
/opt/intel_openvino/openvino/inference_engine/include/ie_blob.h:245:75: warning: use of old-style cast [-Wold-style-cast]
return std::accumulate(std::begin(dims), std::end(dims), (size_t) 1, std::multiplies<size_t>());
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:18:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/ie_error.hpp: At global scope:
/opt/intel_openvino/openvino/inference_engine/include/ie_error.hpp:16:7: warning: ‘class InferenceEngine::IErrorListener’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
class IErrorListener {
^
In file included from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/VectorSpaceI.H:26:0,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/VectorSpace.H:230,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Vector.H:44,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/vector.H:39,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/fieldTypes.H:35,
from /opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/primitiveFieldsFwd.H:36,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:44,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp: In function ‘void InferenceEngine::details::extract_exception(InferenceEngine::StatusCode, char*)’:
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:359:47: error: ‘FatalError’ was not declared in this scope
<< "Not implemented" << ::Foam::abort(FatalError);
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp:60:36: note: in expansion of macro ‘NotImplemented’
case NOT_IMPLEMENTED:throw NotImplemented(msg);
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:359:47: note: suggested alternative:
<< "Not implemented" << ::Foam::abort(FatalError);
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
#define NotImplemented notImplemented(FUNCTION_NAME)
^
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp:60:36: note: in expansion of macro ‘NotImplemented’
case NOT_IMPLEMENTED:throw NotImplemented(msg);
^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:303:16: note: ‘Foam::FatalError’
extern error FatalError;
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/cpp/ie_plugin_cpp.hpp:16:0,
from /opt/intel_openvino/openvino/inference_engine/include/ie_plugin_dispatcher.hpp:14,
from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:21,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp:60:55: warning: statement has no effect [-Wunused-value]
case NOT_IMPLEMENTED:throw NotImplemented(msg);
^
In file included from /opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:21:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/ie_plugin_dispatcher.hpp: At global scope:
/opt/intel_openvino/openvino/inference_engine/include/ie_plugin_dispatcher.hpp:20:7: warning: ‘class InferenceEngine::PluginDispatcher’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
class PluginDispatcher {
^
In file included from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:68:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp: In function ‘void InferenceEngine::TopResults(unsigned int, InferenceEngine::TBlob<T>&, std::vector<unsigned int>&)’:
/opt/intel_openvino/openvino/inference_engine/include/inference_engine.hpp:45:57: warning: use of old-style cast [-Wold-style-cast]
n = static_cast<unsigned>(std::min<size_t>((size_t) n, input.size()));
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C: In member function ‘virtual void Foam::combustionModels::FPVANNModel::correctTabulatedANNTransport()’:
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:371:17: warning: unused variable ‘celli_count’ [-Wunused-variable]
int celli_count = 0;
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:404:17: warning: unused variable ‘patch_count’ [-Wunused-variable]
int patch_count = 0;
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:301:16: warning: unused variable ‘Zeta’ [-Wunused-variable]
double Zeta;
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C: In member function ‘virtual void Foam::combustionModels::FPVANNModel::correctCalculatedANNTransport()’:
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:605:26: warning: unused variable ‘success’ [-Wunused-variable]
bool success = inf->doInference(frozenGraphName,inputOperationName,outputOperationName,no_of_inputs,no_of_outputs,input_dimensions,output_dimensions,cellsAndPatches,input_f_zeta_PVNorm,output_real,limit_intra,limit_inter,xlaJit);
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:696:17: warning: unused variable ‘celli_count’ [-Wunused-variable]
int celli_count = 0;
^
tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:721:17: warning: unused variable ‘patch_count’ [-Wunused-variable]
int patch_count = 0;
^
In file included from tabulatedCombustionModel/FPVANNModel/FPVANNModel.H:66:0,
from tabulatedCombustionModel/FPVANNModel/FPVANNModel.C:31:
/home/elias/OpenFOAM/elias-4.1/LRT10Foam/src/../ThirdParty/ANNInference/TensorflowCAPI/inferenceC.H: At global scope:
/home/elias/OpenFOAM/elias-4.1/LRT10Foam/src/../ThirdParty/ANNInference/TensorflowCAPI/inferenceC.H:25:19: warning: ‘TF_Buffer* ReadBufferFromFile(const char*)’ defined but not used [-Wunused-function]
static TF_Buffer* ReadBufferFromFile(const char* file)
^
/home/elias/OpenFOAM/elias-4.1/LRT10Foam/src/../ThirdParty/ANNInference/TensorflowCAPI/inferenceC.H:55:13: warning: ‘void DeallocateTensor(void*, std::size_t, void*)’ defined but not used [-Wunused-function]
static void DeallocateTensor(void* data, std::size_t, void*) // vorher void* arg
^
make: *** [Make/linux64GccDPInt64Opt/tabulatedCombustionModel/FPVANNModel/FPVANNModel.o] Error 1
除了包含额外的标题外,我没有做任何更改,而且错误消息非常奇怪。一位同事提到,所涉及的两个程序(OpenFOAM 和 OpenVINO)之间可能存在一些“冲突”。有人可以提示我可能是什么问题吗?
谢谢!
编辑:也许我应该指出这两个部分:
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:13: error: ‘FatalError’ in namespace ‘Foam’ does not name a type
::Foam::FatalError((functionName), __FILE__, __LINE__)
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp: In function ‘void InferenceEngine::details::extract_exception(InferenceEngine::StatusCode, char*)’:
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:359:47: error: ‘FatalError’ was not declared in this scope
<< "Not implemented" << ::Foam::abort(FatalError);
最佳答案
原因隐藏在错误转储的一半附近:
#define NotImplemented notImplemented(FUNCTION_NAME)
OpenFOAM 将其用作宏以在未实现的方法中引发错误,而 OpenVINO 恰好定义了一个具有相同名称的类。 C++ 命名空间仅在宏扩展后解析,因此这对您没有帮助。
您的选项,按偏好大致排序:
#undef NotImplemented
。#undef NotImplemented
,然后包含 OpenVINO header 。这意味着您不能将 OpenFOAM 宏用于您自己的目的(尽管您可能不需要)。关于c++ - 是什么导致我的 "‘FatalError’ in namespace ‘Foam’ does not name a type”错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57005993/
我们有一个特殊的日志记录函数来表示特定类型的崩溃,因此,它在内部调用fatalError。然而,与fatalError不同,当我们在guard语句中使用它时,它仍然提示我们没有退出guard的范围。
如何在 Swift 中对 fatalError 代码路径进行单元测试? 例如,我有以下swift代码 func divide(x: Float, by y: Float) -> Float {
我有一个在 Xcode 8.2.1 中用 Swift 2 编写的 iOS 应用程序,它是为 iOS 10.2 构建的。 我收到了许多来自 TestFlight 的崩溃报告,尽管有符号化,但没有任何崩溃
本文整理了Java中org.apache.hadoop.ha.ZKFailoverController.fatalError()方法的一些代码示例,展示了ZKFailoverController.fa
我有一些情况需要我的框架报告 fatalError或preconditionFailure和崩溃。我已经围绕这些条件设置了一些单元测试,以确保它们正确命中。 如果单元测试在没有测试主机应用程序的情况下
说我想做某事 val foo = when(bar) { "one" -> true "two" -> false else -> // in Swift it would be `
我在 Swift 周围闲逛,发现 fatalError 有这个签名: @noreturn public func fatalError(@autoclosure message: () -> Stri
我目前正在使用 Scala 和 Play Framework 2 开发一个项目。我想在运行时编译一些 Scala 代码并从解释器中获取结果。我在网上找了一些例子,最后得出了以下代码: package
我有一个奇怪的错误,一段时间以来我都没有设法解决。我想通过与英特尔 OpenVINO 的推理引擎一起使用来扩展一个 C++ 软件包。因此,我必须动态链接一些库并将一些 header 包含到现有代码中。
如果我的应用程序出现问题,我想立即终止该应用程序。在 swift 中我可以使用 fatalError(),是否有等效的 java? 最佳答案 我没有找到与 Android 中的 fatalError
我想放弃父类(super class)的默认初始化方法。我可以使用 Swift 中的 fatalError 轻松实现: class subClass:NSObject{ private var k
我正在尝试在 Spark 集群上运行一个基本脚本,该脚本接收一个文件,将其转换并以不同的格式输出。目前的 Spark 集群由 1 个主节点和 1 个从节点组成,两者都运行在同一节点上。完整的命令是:
使用 Swift 2,在我设计的示例中,我将 String 转换为 Int 或更具体地说是 Int 或 Int? 使用泛型。在 Int? 应该为 nil 的情况下,转换将失败并出现 fatalErro
我有一个 ViewController,它需要用 ViewModel: NSObject 初始化。 我对 ViewController 的实现是: class ViewController: UIVi
我有一个 WeMos D1 Mini 。以下是董事会信息: Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "LOLIN(WE
我正在尝试生成我的项目文档,但在 java.lang 上出现错误 Loading source files for package com.swimtechtest.swimmer... Loadin
我是一名优秀的程序员,十分优秀!