Browse Source

Added a check to make sure that overflow bin file is opened successfully

tags/v1.0.0
Adel Shafiei 5 years ago
parent
commit
85c5c04ba7
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/ccsrc/debug/debugger/debugger.cc

+ 4
- 0
mindspore/ccsrc/debug/debugger/debugger.cc View File

@@ -759,6 +759,10 @@ std::vector<std::string> Debugger::CheckOpOverflow() {
bin_list.push_back(stod(overflow_time));
std::fstream infile;
infile.open(file_path.c_str(), std::ios::binary | std::ios::in);
if (!infile.is_open()) {
MS_LOG(ERROR) << "Failed to open overflow bin file " << file_name;
continue;
}
infile.seekg(313, std::ios::beg);
std::vector<char> buffer;
buffer.resize(BUF_SIZ);


Loading…
Cancel
Save