@@ -153,36 +153,32 @@ void ModuleBase::Global_File::make_dir_out(
153153#endif
154154 }
155155
156- std::stringstream ss,ss1;
157-
158156 // mohan add 2010-09-12
159157 if (out_alllog)
160158 {
161- ss << " running_" << calculation << " _" << rank + 1 ;
162- open_log (GlobalV::ofs_running, ss.str (), calculation, restart);
159+ open_log (GlobalV::ofs_running, PARAM.globalv .log_file , calculation, restart);
163160 #if defined(__CUDA) || defined(__ROCM)
164- open_log (GlobalV::ofs_device, " device" + std::to_string (rank), calculation, restart);
161+ open_log (GlobalV::ofs_device, " device" + std::to_string (rank) + " .log " , calculation, restart);
165162 #endif
166163 }
167164 else
168165 {
169166 if (rank==0 )
170167 {
171- ss << " running_" << calculation;
172- open_log (GlobalV::ofs_running, ss.str (), calculation, restart);
168+ open_log (GlobalV::ofs_running, PARAM.globalv .log_file , calculation, restart);
173169 #if defined(__CUDA) || defined(__ROCM)
174- open_log (GlobalV::ofs_device, " device" , calculation, restart);
170+ open_log (GlobalV::ofs_device, " device.log " , calculation, restart);
175171 #endif
176172 }
177173 }
178174
179175 if (rank==0 )
180176 {
181- open_log (GlobalV::ofs_warning, " warning" , calculation, restart);
177+ open_log (GlobalV::ofs_warning, " warning.log " , calculation, restart);
182178 }
183179
184180#ifdef GATHER_INFO
185- open_log (GlobalV::ofs_info, " math_info_" + std::to_string (rank), calculation, restart);
181+ open_log (GlobalV::ofs_info, " math_info_" + std::to_string (rank) + " .log " , calculation, restart);
186182#endif
187183
188184 return ;
@@ -206,7 +202,7 @@ void ModuleBase::Global_File::open_log(std::ofstream &ofs, const std::string &fn
206202// PARAM.globalv.global_out_dir : (default dir to store "*.log" file)
207203// ----------------------------------------------------------
208204 std::stringstream ss;
209- ss << PARAM.globalv .global_out_dir << fn << " .log " ;
205+ ss << PARAM.globalv .global_out_dir << fn;
210206
211207 if (calculation == " md" && restart)
212208 {
0 commit comments