NEURON
catch2_main.cpp File Reference
#include <catch2/catch_session.hpp>
#include <catch2/catch_test_macros.hpp>
#include "code.h"
#include "neuron.h"
#include "nrnmpi.h"
#include "ocfunc.h"
#include "section.h"
#include "multicore.h"
#include <exception>

Go to the source code of this file.

Namespaces

 nrn
 
 nrn::test
 

Functions

int ivocmain_session (int, const char **, const char **, int)
 This used to be ivocmain, the main entrypoint to the HOC interpreter. More...
 
void modl_reg ()
 Needed for compilation. More...
 
int main (int argc, char *argv[])
 

Variables

int nrn_main_launch
 
int nrn_nobanner_
 
int nrn::test::PROCESSORS {0}
 

Function Documentation

◆ ivocmain_session()

int ivocmain_session ( int  argc,
const char **  argv,
const char **  env,
int  start_session 
)

This used to be ivocmain, the main entrypoint to the HOC interpreter.

ivocmain_session parses command line argument, calls of initialization functions and drops into an interactive HOC session. This function is called for example by the "real main" in nrnmain.cpp , but can be also called from other external user applications that use NEURON. Additionally to the original implemenation a new parameter start_session was introduced to control whether an interactive HOC session shoudl be started or simply NEURON and all data structures be initialized and control returned to the caller.

Note
env argument should not be used as it might become invalid
Parameters
argcargument count as found in C/C++ main functions
argvargument vector as found in C/C++ main functions
envenvironment variable array as optionally found in main functions.
start_sessionset to 1 for default behavior (drop into interactive HOC session otherwise set to 0. If set to 1, but compiled with python support this function will still directly return (since in that mode we don't need an interactive HOC session either.
Returns
0 on success, otherwise error code.

Definition at line 361 of file ivocmain.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 40 of file catch2_main.cpp.

◆ modl_reg()

void modl_reg ( void  )

Needed for compilation.

Definition at line 18 of file catch2_main.cpp.

Variable Documentation

◆ nrn_main_launch

int nrn_main_launch
extern

Definition at line 333 of file hoc_init.cpp.

◆ nrn_nobanner_

int nrn_nobanner_
extern

Definition at line 119 of file hoc.cpp.