#include <../../nrnconf.h>
#include "nrn_ansi.h"
#include "../utils/profile/profiler_interface.h"
#include <stdio.h>
#include <stdlib.h>
#include <filesystem>
#include "string.h"
#include "oc2iv.h"
#include "nrnmpi.h"
#include "nrnpy.h"
#include "utils/logger.hpp"
Go to the source code of this file.
|
int | hoc_main1 (int, const char **, const char **) |
|
void | hoc_main1_init (const char *, const char **) |
|
void | pr_profile () |
|
int | hoc_obj_run (const char *, Object *) |
|
void | hoc_final_exit () |
|
void | ivoc_final_exit () |
|
void | ivoc_cleanup () |
|
void | setneuronhome (const char *) |
|
int | hoc_xopen1 (const char *filename, const char *rcs) |
|
int | ivocmain (int argc, const char **argv, const char **env) |
| Main entrypoint function into the HOC interpeter. More...
|
|
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. More...
|
|
void | hoc_nrnmpi_init () |
|
static bool | nrn_optarg_on (const char *opt, int *pargc, const char **argv) |
|
static const char * | nrn_optarg (const char *opt, int *pargc, const char **argv) |
|
static int | nrn_optargint (const char *opt, int *pargc, const char **argv, int dflt) |
|
void | hoc_ret () |
|
void | hoc_pushx (double) |
|
void | hoc_single_event_run () |
|
int | run_til_stdin () |
|
void | hoc_notify_value () |
|
std::tuple< int, const char ** > | nrn_mpi_setup (int argc, const char **argv) |
| A top-level initialization of MPI given argc and argv. More...
|
|
◆ PR_PROFILE
◆ Session
◆ hoc_final_exit()
◆ hoc_main1()
int hoc_main1 |
( |
int |
argc, |
|
|
const char ** |
argv, |
|
|
const char ** |
envp |
|
) |
| |
◆ hoc_main1_init()
void hoc_main1_init |
( |
const char * |
pname, |
|
|
const char ** |
envp |
|
) |
| |
◆ hoc_notify_value()
void hoc_notify_value |
( |
| ) |
|
◆ hoc_nrnmpi_init()
◆ hoc_obj_run()
int hoc_obj_run |
( |
const char * |
cmd, |
|
|
Object * |
ob |
|
) |
| |
◆ hoc_pushx()
void hoc_pushx |
( |
double |
d | ) |
|
◆ hoc_single_event_run()
void hoc_single_event_run |
( |
void |
| ) |
|
◆ hoc_xopen1()
int hoc_xopen1 |
( |
const char * |
filename, |
|
|
const char * |
rcs |
|
) |
| |
◆ ivoc_cleanup()
◆ ivocmain()
int ivocmain |
( |
int |
argc, |
|
|
const char ** |
argv, |
|
|
const char ** |
env |
|
) |
| |
Main entrypoint function into the HOC interpeter.
This function simply calls ivocmain_session with the start_session
= 1.
- Note
- This is part of NEURON's public interface
-
env
argument should not be used as it might become invalid
- Parameters
-
argc | argument count as found in C/C++ main functions |
argv | argument vector as found in C/C++ main functions |
env | environment variable array as optionally found in main functions. |
- Returns
- 0 on success, otherwise error code.
Definition at line 334 of file ivocmain.cpp.
◆ 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
-
argc | argument count as found in C/C++ main functions |
argv | argument vector as found in C/C++ main functions |
env | environment variable array as optionally found in main functions. |
start_session | set 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.
◆ nrn_mpi_setup()
std::tuple<int, const char**> nrn_mpi_setup |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
A top-level initialization of MPI given argc and argv.
Sets stubs, load dyn lib, and initializes
Definition at line 770 of file ivocmain.cpp.
◆ nrn_optarg()
static const char* nrn_optarg |
( |
const char * |
opt, |
|
|
int * |
pargc, |
|
|
const char ** |
argv |
|
) |
| |
|
static |
◆ nrn_optarg_on()
static bool nrn_optarg_on |
( |
const char * |
opt, |
|
|
int * |
pargc, |
|
|
const char ** |
argv |
|
) |
| |
|
static |
◆ nrn_optargint()
static int nrn_optargint |
( |
const char * |
opt, |
|
|
int * |
pargc, |
|
|
const char ** |
argv, |
|
|
int |
dflt |
|
) |
| |
|
static |
◆ pr_profile()
◆ run_til_stdin()
◆ setneuronhome()
void setneuronhome |
( |
const char * |
| ) |
|
◆ always_false
◆ hoc_default_dll_loaded_
double hoc_default_dll_loaded_ |
|
extern |
◆ hoc_nframe
◆ hoc_nstack
◆ hoc_print_first_instance
int hoc_print_first_instance |
|
extern |
◆ neuron_home
◆ nrn_global_argc
◆ nrn_global_argv
const char** nrn_global_argv |
|
extern |
◆ nrn_is_python_extension
int nrn_is_python_extension |
|
extern |
◆ nrn_istty_
◆ nrn_nobanner_
◆ nrnpy_nositeflag
◆ units_on_flag_