Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
auryn_global.h
Go to the documentation of this file.
1 /*
2 * Copyright 2014-2018 Friedemann Zenke
3 *
4 * This file is part of Auryn, a simulation package for plastic
5 * spiking neural networks.
6 *
7 * Auryn is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * Auryn is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Auryn. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * If you are using Auryn or parts of it for your work please cite:
21 * Zenke, F. and Gerstner, W., 2014. Limits to high-speed simulations
22 * of spiking neural networks using general-purpose computers.
23 * Front Neuroinform 8, 76. doi: 10.3389/fninf.2014.00076
24 */
25 
26 #ifndef AURYN_GLOBAL_H_
27 #define AURYN_GLOBAL_H_
28 
29 #include <boost/filesystem.hpp>
30 #include "auryn_definitions.h"
31 #include "Logger.h"
32 #include "System.h"
33 
34 // Global variables that are exported here.
35 
36 namespace auryn {
37 
39  extern System * sys;
40 
42  extern Logger * logger;
43 
44 #ifdef AURYN_CODE_USE_MPI
45 
46  extern mpi::environment * mpienv;
47 
49  extern mpi::communicator * mpicommunicator;
50 #endif // AURYN_CODE_USE_MPI
51 
52 
78  void auryn_init(int ac, char* av[], string dir=".", string simulation_name="default", string logfile_prefix="", LogMessageType filelog_level=NOTIFICATION, LogMessageType consolelog_level=PROGRESS);
79 
85  void auryn_env_init(int ac, char* av[], string dir=".", string logfile_prefix="", LogMessageType filelog_level=NOTIFICATION, LogMessageType consolelog_level=PROGRESS);
86 
94  void auryn_kernel_init(string dir=".", string simulation_name="default");
95 
100  void auryn_free();
101 
107  void auryn_env_free();
108 
115  void auryn_kernel_free();
116 
125  void auryn_abort(int errcode=0);
126 }
127 
128 #endif /*AURYN_GLOBAL_H__*/
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
Definition: Logger.h:41
mpi::environment * mpienv
Global pointer to instance of mpi::environment which needs to be initialized in every simulation main...
Definition: auryn_global.cpp:33
mpi::communicator * mpicommunicator
Global pointer to instance of mpi::mpicommunicator which needs to be initialized in every simulation ...
Definition: auryn_global.cpp:32
Logger * logger
Global pointer to instance of Logger which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:36
void auryn_kernel_init(string dir, string simulation_name)
Initalizes the Auryn kernel (used internally)
Definition: auryn_global.cpp:73
Definition: ABSConnection.h:38
void auryn_kernel_free()
Frees the current auryn kernel (used interally)
Definition: auryn_global.cpp:93
void auryn_abort(int errcode)
Terminates Auryn simulation abnormally.
Definition: auryn_global.cpp:113
System * sys
Global pointer to instance of System which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:37
void auryn_init(int ac, char *av[], string dir, string simulation_name, string logfile_prefix, LogMessageType filelog_level, LogMessageType consolelog_level)
Initalizes MPI and the Auryn simulation environment.
Definition: auryn_global.cpp:84
LogMessageType
Enum type for significance level of a given message send to the Logger.
Definition: Logger.h:41
Definition: Logger.h:41
void auryn_env_free()
Frees logger and MPI.
Definition: auryn_global.cpp:98
void auryn_env_init(int ac, char *av[], string dir, string logfile_prefix, LogMessageType filelog_level, LogMessageType consolelog_level)
Initalizes Auryn base environment (used internally)
Definition: auryn_global.cpp:40