112 #define RTLD_GLOBAL 0 113 #define RTLD_NOLOAD 0 115 extern void* dlopen_noerr(
const char*
name,
int mode);
116 #define dlopen dlopen_noerr 117 extern void*
dlsym(
void* handle,
const char*
name);
118 extern int dlclose(
void* handle);
122 #if defined(HAVE_DLFCN_H) 145 char* (*nrnpy_nrncore_arg_p_)(
double tstop);
159 static size_t part1();
160 static void part2(
const char*);
175 size_t rankbytes =
part1();
194 size_t rankbytes = 0;
220 static void part2(
const char* path) {
253 px[
i] = double(cgs[
i].group_id);
259 append = (*
getarg(2) != 0);
271 #if defined(HAVE_DLFCN_H) 281 void* handle = get_coreneuron_handle();
284 check_coreneuron_compatibility(handle);
290 void* launcher_sym =
dlsym(handle,
"corenrn_embedded_run");
304 int (*coreneuron_launcher)(
int,
int,
int,
int,
const char*,
const char*) = (
int (*)(
int,
int,
int,
int,
const char*,
const char*))launcher_sym;
324 int b = (*nrnpy_nrncore_enable_value_p_)();
333 int result = (*nrnpy_nrncore_file_mode_value_p_)();
344 char*
arg = (*nrnpy_nrncore_arg_p_)(tstop);
350 const char* CORENRN_DATA_DIR =
"corenrn_data";
365 #else // !HAVE_DLFCN_H
static void datumtransform(CellGroup *)
const char * dlerror(void)
int nrncore_is_file_mode()
int hoc_is_double_arg(int narg)
void clear()
after writing NrnThread to file we remove all previous mapping information, free memory.
Represent main neuron object computed by single thread.
int(* nrnpy_nrncore_enable_value_p_)()
value of neuron.coreneuron.enable as 0, 1 (-1 if error)
int(* nrnpy_nrncore_file_mode_value_p_)()
value of neuron.coreneuron.file_mode as 0, 1 (-1 if error)
void write_memb_mech_types(const char *fname)
int nrncore_psolve(double tstop, int file_mode)
void nrn_spike_exchange_init()
std::string get_write_path()
int dlclose(void *handle)
size_t nrnbbcore_gap_write(const char *path, int *group_ids)
int nrncore_run(const char *)
short * nrn_is_artificial_
void append(Item *ql, Item *q)
static void mk_tml_with_art(CellGroup *)
void(* nrnthread_v_transfer_)(NrnThread *)
static void part2(const char *)
size_t write_corenrn_model(const std::string &path)
dump neuron model to given directory path
static void clean_deferred_netcons()
void hoc_execerror(const char *, const char *)
void write_nrnthread(const char *path, NrnThread &nt, CellGroup &cg)
char *(* nrnpy_nrncore_arg_p_)(double tstop)
Gets the python string returned by neuron.coreneuron.nrncore_arg(tstop) return a strdup() copy of the...
NrnMappingInfo mapinfo
mapping information
Compartment mapping information for NrnThread.
size_t size()
number of cells
std::string corenrn_mpi_library
static CellGroup * mk_cellgroups(CellGroup *)
std::string get_filename(const std::string &path, std::string file_name)
void write_globals(const char *fname)
static size_t get_mla_rankbytes(CellGroup *)
void vector_resize(Vect *v, int n)
void create_dir_path(const std::string &path)
create directory with given path
int * nrn_prop_dparam_size_
VEC * cgs(MTX_FN A, void *A_params, VEC *b, VEC *r0, double tol, VEC *x)
static void clean_deferred_type2artml()
NetCvode * net_cvode_instance
size_t nrncore_netpar_bytes()
double * vector_vec(Vect *v)
void map_coreneuron_callbacks(void *handle)
Populate function pointers by mapping function pointers for callback.
int hoc_is_object_arg(int narg)
void * dlsym(void *handle, const char *symbol)
void write_nrnthread_task(const char *path, CellGroup *cgs, bool append)
Write all dataset ids to files.dat.
void nrn_write_mapping_info(const char *path, int gid, NrnMappingInfo &minfo)
dump mapping information to gid_3.dat file
static void setup_nrn_has_net_event()