Exit.hpp
Go to the documentation of this file.
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 /// \file
5 /// Defines function Parallel::exit.
6 
7 #pragma once
8 
9 #include <charm++.h>
10 #include <exception>
11 
12 /// Contains functions that forward to Charm++ parallel functions.
13 namespace Parallel {
14 
15 /// \ingroup ParallelGroup
16 /// \brief Exit the program normally.
17 /// This should only be called once over all processors.
18 [[noreturn]] inline void exit() {
19  CkExit();
20  // the following call is never reached, but suppresses the warning that
21  // a 'noreturn' function does return
22  std::terminate(); // LCOV_EXCL_LINE
23 }
24 
25 } // namespace Parallel
void exit()
Exit the program normally. This should only be called once over all processors.
Definition: Exit.hpp:18
Contains functions that forward to Charm++ parallel functions.
Definition: Abort.hpp:13