CoreNEURON
utils.hpp
Go to the documentation of this file.
1 /*
2 # =============================================================================
3 # Copyright (c) 2021-22 Blue Brain Project/EPFL
4 #
5 # See top-level LICENSE file for details.
6 # =============================================================================.
7 */
8 
9 #pragma once
10 
11 #include <utility>
12 #include "coreneuron/mpi/nrnmpi.h"
14 
15 namespace coreneuron {
16 [[noreturn]] void nrn_abort(int errcode);
17 template <typename... Args>
18 void nrn_fatal_error(const char* msg, Args&&... args) {
19  if (nrnmpi_myid == 0) {
20  printf(msg, std::forward<Args>(args)...);
21  }
22  nrn_abort(-1);
23 }
24 extern double nrn_wtime(void);
25 } // namespace coreneuron
coreneuron::nrn_fatal_error
static void nrn_fatal_error(const char *msg)
Definition: nrnmpi.cpp:30
coreneuron
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
Definition: corenrn_parameters.cpp:12
nrnmpi.hpp
coreneuron::nrn_abort
void nrn_abort(int errcode)
Definition: utils.cpp:13
coreneuron::nrn_wtime
double nrn_wtime()
Definition: utils.cpp:22
coreneuron::nrnmpi_myid
int nrnmpi_myid
Definition: nrnmpi_def_cinc.cpp:11
nrnmpi.h