![]() |
NEURON
|
Provides interface function for CoreNEURON mechanism library and NEURON. More...
#include <cstdlib>
#include <coreneuron/engine.h>
#include <string>
#include <iostream>
Go to the source code of this file.
Namespaces | |
coreneuron | |
THIS FILE IS AUTO GENERATED DONT MODIFY IT. | |
Functions | |
void | coreneuron::modl_reg () |
Mechanism registration function. More... | |
void | coreneuron::nrn_cleanup_ion_map () |
Cleanup global ion map created during mechanism registration. More... | |
char * | prepare_args (int &argc, char **&argv, std::string &args) |
parse arguments from neuron and prepare new one for coreneuron More... | |
void | mk_mech_init (int argc, char **argv) |
initialize standard mechanisms from coreneuron More... | |
void | set_openmp_threads (int nthread) |
set openmp threads equal to neuron's pthread More... | |
void | add_mpi_library_arg (const char *mpi_lib, std::string &args) |
Add MPI library loading CLI argument for CoreNEURON. More... | |
int | corenrn_embedded_run (int nthread, int have_gaps, int use_mpi, int use_fast_imem, const char *mpi_lib, const char *nrn_arg, int file_mode) |
Run CoreNEURON in embedded mode with NEURON. More... | |
int | solve_core (int argc, char **argv) |
Initialize mechanisms and run simulation using CoreNEURON. More... | |
Variables | |
bool | coreneuron::nrn_have_gaps |
variables defined in coreneuron library More... | |
bool | coreneuron::nrn_use_fast_imem |
bool | corenrn_embedded |
global variables from coreneuron library More... | |
bool | corenrn_file_mode |
int | corenrn_embedded_nthread |
Provides interface function for CoreNEURON mechanism library and NEURON.
libcorenrnmech is a interface library provided to building standalone executable special-core. Also, it is used by NEURON to run CoreNEURON via dlopen to execute models via in-memory transfer.
Definition in file enginemech.cpp.
void add_mpi_library_arg | ( | const char * | mpi_lib, |
std::string & | args | ||
) |
Add MPI library loading CLI argument for CoreNEURON.
CoreNEURON requires --mpi-lib
CLI argument with the path of library. In case of solve_core()
call from MOD file, such CLI argument may not present. In this case, we additionally check NRN_CORENRN_MPI_LIB
env variable set by NEURON.
mpi_lib | path of coreneuron MPI library to load |
args | char* argv[] in std::string form |
Definition at line 72 of file enginemech.cpp.
int corenrn_embedded_run | ( | int | nthread, |
int | have_gaps, | ||
int | use_mpi, | ||
int | use_fast_imem, | ||
const char * | mpi_lib, | ||
const char * | nrn_arg, | ||
int | file_mode | ||
) |
Run CoreNEURON in embedded mode with NEURON.
nthread | Number of Pthreads on NEURON side |
have_gaps | True if gap junctions are used |
use_mpi | True if MPI is used on NEURON side |
use_fast_imem | True if fast imembrance calculation enabled |
nrn_arg | Command line arguments passed by NEURON |
Definition at line 106 of file enginemech.cpp.
void mk_mech_init | ( | int | argc, |
char ** | argv | ||
) |
char* prepare_args | ( | int & | argc, |
char **& | argv, | ||
std::string & | args | ||
) |
void set_openmp_threads | ( | int | nthread | ) |
set openmp threads equal to neuron's pthread
set openmp threads equal to neuron's pthread
If there are a number of mpi processes on this node as well, things can go very slowly as there are so many more threads than cores. Assume the NEURON users pc.nthread() is well chosen if OMP_NUM_THREADS is not set.
int solve_core | ( | int | argc, |
char ** | argv | ||
) |
Initialize mechanisms and run simulation using CoreNEURON.
NOTE: this type of usage via MOD file exist in neurodamus where we delete entire model and call coreneuron via file mode.
Definition at line 179 of file enginemech.cpp.
|
extern |
global variables from coreneuron library
global variables from coreneuron library
Definition at line 47 of file nrn_setup.cpp.
|
extern |
Definition at line 49 of file nrn_setup.cpp.
|
extern |
Definition at line 48 of file nrn_setup.cpp.