Browse Source

!577 dts:error message add

From: @wangwenhua1
Reviewed-by: @xchu42,@ji_chen
Signed-off-by: @ji_chen
tags/v1.2.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
9577978fe0
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      ge/common/ge/plugin_manager.cc

+ 7
- 1
ge/common/ge/plugin_manager.cc View File

@@ -123,7 +123,10 @@ Status PluginManager::LoadSo(const string &path, const vector<string> &func_chec
if (handle == nullptr) { if (handle == nullptr) {
const char *error = mmDlerror(); const char *error = mmDlerror();
GE_IF_BOOL_EXEC(error == nullptr, error = ""); GE_IF_BOOL_EXEC(error == nullptr, error = "");
GELOGE(GE_PLGMGR_PATH_INVALID, "Failed to dlopen %s!", error);
ErrorManager::GetInstance().ATCReportErrMessage("E19012", {"function", "reason"},
{"mmDlopen", "shared library path is " + FmtToStr(file_path_dlopen) + ". Errormessage" + FmtToStr(error)});
GELOGE(GE_PLGMGR_PATH_INVALID, "Failed to dlopen the shared library path[%s]. Errormessage[%s]!",
file_path_dlopen.c_str(), error);
continue; continue;
} }


@@ -132,6 +135,9 @@ Status PluginManager::LoadSo(const string &path, const vector<string> &func_chec
for (const auto &func_name : func_check_list) { for (const auto &func_name : func_check_list) {
auto real_fn = (void (*)())mmDlsym(handle, const_cast<char *>(func_name.c_str())); auto real_fn = (void (*)())mmDlsym(handle, const_cast<char *>(func_name.c_str()));
if (real_fn == nullptr) { if (real_fn == nullptr) {
ErrorManager::GetInstance().ATCReportErrMessage("E19012", {"function", "reason"},
{"mmDlsym", FmtToStr(func_name) + " is skipped since function" +
FmtToStr(func_name) + " is not existed!"});
GELOGE(GE_PLGMGR_PATH_INVALID, "%s is skipped since function %s is not existed!", func_name.c_str(), GELOGE(GE_PLGMGR_PATH_INVALID, "%s is skipped since function %s is not existed!", func_name.c_str(),
func_name.c_str()); func_name.c_str());
is_valid = false; is_valid = false;


Loading…
Cancel
Save