ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
tool_quit.h
Go to the documentation of this file.
1#ifndef QUIT_H
2#define QUIT_H
3
4#include <cassert>
5#include <complex>
6#include <fstream>
7#include <iomanip>
8#include <iostream>
9#include <string>
10#include <valarray>
11#include <vector>
12
13namespace ModuleBase
14{
15
16//==========================================================
17// GLOBAL FUNCTION :
18// NAME : WARNING( write information into GlobalV::ofs_warning)
19// NAME : QUIT( exit the running program)
20// NAME : WARNING_QUIT( write information into
21// GlobalV::ofs_warning , and then quit)
22//==========================================================
29void WARNING(const std::string &file, const std::string &description);
30
38void set_quit_out_dir(const std::string& dir);
39
48void set_quit_calculation(const std::string& calculation);
49
54[[noreturn]] void QUIT(void);
55
60[[noreturn]] void QUIT(int ret);
61
68[[noreturn]] void WARNING_QUIT(const std::string& file, const std::string& description);
69
76[[noreturn]] void WARNING_QUIT(const std::string& file, const std::string& description, int ret);
77
84void CHECK_WARNING_QUIT(const bool error, const std::string &file, const std::string &description);
85
86} // namespace ModuleBase
87
88#endif
Definition clebsch_gordan_coeff.cpp:8
void WARNING_QUIT(const std::string &, const std::string &)
Combine the functions of WARNING and QUIT.
Definition test_delley.cpp:14
void CHECK_WARNING_QUIT(const bool error_in, const std::string &file, const std::string &description)
Check, if true, WARNING_QUIT.
Definition tool_quit.cpp:148
void set_quit_calculation(const std::string &calculation)
Inject the calculation tag used by CHECK_WARNING_QUIT to compose the fallback log filename ("running_...
Definition tool_quit.cpp:28
void WARNING(const std::string &file, const std::string &description)
Print out warning information in warning.log file.
Definition tool_quit_no_exit.cpp:8
void set_quit_out_dir(const std::string &dir)
Inject the global output directory used by QUIT/WARNING_QUIT/CHECK_WARNING_QUIT for log path resoluti...
Definition tool_quit.cpp:23
void QUIT()
Close .log files and exit.
Definition tool_quit.cpp:55
file(GLOB ATen_CORE_SRCS "*.cpp") set(ATen_CPU_SRCS $
Definition CMakeLists.txt:1