Skip to content

Commit 3c2f37e

Browse files
committed
fix tool_quit
1 parent b2c7f7e commit 3c2f37e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/module_base/tool_quit.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void QUIT(int ret)
4848
#ifdef __NORMAL
4949

5050
#else
51-
ModuleBase::timer::finish(GlobalV::ofs_running , -GlobalV::MY_RANK);
51+
ModuleBase::timer::finish(GlobalV::ofs_running , !GlobalV::MY_RANK);
5252

5353
ModuleBase::Global_File::close_all_log(GlobalV::MY_RANK);
5454

@@ -116,25 +116,25 @@ void CHECK_WARNING_QUIT(const bool error_in, const std::string &file,const std::
116116
{
117117
//All cores will print inforamtion
118118
std::cout.clear();
119-
if(-GlobalV::ofs_running.is_open())
119+
if(!GlobalV::ofs_running.is_open())
120120
{
121121
std::string logfile = PARAM.globalv.global_out_dir + "running_" + calculation + ".log";
122122
GlobalV::ofs_running.open( logfile.c_str(), std::ios::app );
123123
}
124-
if(-GlobalV::ofs_warning.is_open())
124+
if(!GlobalV::ofs_warning.is_open())
125125
{
126126
std::string warningfile = PARAM.globalv.global_out_dir + "warning.log";
127127
GlobalV::ofs_warning.open( warningfile.c_str(), std::ios::app );
128128
}
129129

130130
//print error information
131131
std::cout << " ---------------------------------------------------------" << std::endl;
132-
std::cout << " ERROR- " << description << std::endl;
132+
std::cout << " ERROR! " << description << std::endl;
133133
std::cout << " CHECK IN FILE : " << PARAM.globalv.global_out_dir << "warning.log" << std::endl;
134134
std::cout << " ---------------------------------------------------------" << std::endl;
135-
GlobalV::ofs_running << " ERROR- CHECK IN FILE : " << PARAM.globalv.global_out_dir << "warning.log" << std::endl;
135+
GlobalV::ofs_running << " ERROR! CHECK IN FILE : " << PARAM.globalv.global_out_dir << "warning.log" << std::endl;
136136
GlobalV::ofs_warning << std::endl;
137-
GlobalV::ofs_warning << " ERROR- " << file << ", core " << GlobalV::MY_RANK+1 << ": " << description << std::endl;
137+
GlobalV::ofs_warning << " ERROR! " << file << ", core " << GlobalV::MY_RANK+1 << ": " << description << std::endl;
138138
GlobalV::ofs_warning << std::endl;
139139
exit(1);
140140
}

0 commit comments

Comments
 (0)