From e5efdb95716a44b6f9296aef57cb7caa5e934ea1 Mon Sep 17 00:00:00 2001 From: yao_yf Date: Wed, 25 Nov 2020 14:06:36 +0800 Subject: [PATCH] close_strategy_ckpt_stream --- .../strategy_checkpoint/parallel_strategy_checkpoint.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mindspore/ccsrc/frontend/parallel/strategy_checkpoint/parallel_strategy_checkpoint.cc b/mindspore/ccsrc/frontend/parallel/strategy_checkpoint/parallel_strategy_checkpoint.cc index 3074564a4e..5260f68f37 100644 --- a/mindspore/ccsrc/frontend/parallel/strategy_checkpoint/parallel_strategy_checkpoint.cc +++ b/mindspore/ccsrc/frontend/parallel/strategy_checkpoint/parallel_strategy_checkpoint.cc @@ -59,6 +59,7 @@ Status StrategyCheckpoint::Load(StrategyMap *strategy_map) { MS_LOG(ERROR) << "Load strategy file failed"; return FAILED; } + input.close(); size_t node_num = LongToSize(parallel_strategy_map.parallel_strategy_item_size()); for (size_t i = 0; i < node_num; i++) { straspb::ParallelStrategyItem parallel_strategy_item = parallel_strategy_map.parallel_strategy_item(SizeToLong(i)); @@ -137,6 +138,7 @@ Status StrategyCheckpoint::Save(const StrategyMap &strategy_map, const TensorInf MS_LOG(ERROR) << "Save strategy file failed"; return FAILED; } + output.close(); return SUCCESS; } } // namespace parallel