def init_network(): """ """ np.seterr(all='raise') context.env = Env(comm=context.comm, results_file_id=context.results_file_id, **context.kwargs) network.init(context.env)
def main(arena_id, cell_selection_path, config_file, template_paths, hoc_lib_path, dataset_prefix, config_prefix, results_path, results_id, node_rank_file, io_size, recording_fraction, recording_profile, coredat, trajectory_id, tstop, v_init, stimulus_onset, max_walltime_hours, checkpoint_clear_data, checkpoint_interval, results_write_time, spike_input_path, spike_input_namespace, spike_input_attr, dt, ldbal, lptbal, cleanup, profile_memory, write_selection, verbose, debug, dry_run): profile_time = False comm = MPI.COMM_WORLD np.seterr(all='raise') params = dict(locals()) env = Env(**params) if profile_time: from dentate.network import init, run import cProfile cProfile.runctx('init(env)', None, locals(), filename='dentate_profile_init') if not dry_run: cProfile.runctx('run(env)', None, locals(), filename='dentate_profile_run') else: network.init(env) if not dry_run: network.run(env)
def init_network(): """ """ np.seterr(all='raise') context.comm.barrier() context.env = Env(comm=context.comm, results_file_id=context.results_file_id, **context.kwargs) network.init(context.env) if context.debug: raise RuntimeError('config_worker: after network.init') context.comm.barrier()
def main(config_file, template_paths, hoc_lib_path, dataset_prefix, config_prefix, results_path, results_id, input_path, input_namespace, target_cell, tstop, v_init, stimulus_onset, max_walltime_hours, results_write_time, dt, ldbal, lptbal, verbose, dry_run): """ :param config_file: str; model configuration file name :param template_paths: str; colon-separated list of paths to directories containing hoc cell templates :param hoc_lib_path: str; path to directory containing required hoc libraries :param dataset_prefix: str; path to directory containing required neuroh5 data files :param config_prefix: str; path to directory containing network and cell mechanism config files :param results_path: str; path to directory to export output files :param results_id: str; label for neuroh5 namespaces to write spike and voltage trace data :param tstop: int; physical time to simulate (ms) :param v_init: float; initialization membrane potential (mV) :param stimulus_onset: float; starting time of stimulus (ms) :param max_walltime_hours: float; maximum wall time (hours) :param results_write_time: float; time to write out results at end of simulation :param dt: float; simulation time step :param verbose: bool; print verbose diagnostic messages while constructing the network :param dry_run: bool; whether to actually execute simulation after building network """ comm = MPI.COMM_WORLD np.seterr(all='raise') vrecord_fraction = 1.0 env = Env(comm, config_file, template_paths, hoc_lib_path, dataset_prefix, config_prefix, results_path, results_id, vrecord_fraction, target_cell, tstop, v_init, stimulus_onset, max_walltime_hours, results_write_time, dt, cell_selection=target_cell, spike_input_path=input_path, spike_input_ns=input_namespace, verbose=verbose) network.init(env) if not dry_run: network.run(env)
def main(cell_selection_path, config_file, template_paths, hoc_lib_path, dataset_prefix, config_prefix, results_path, results_id, node_rank_file, io_size, vrecord_fraction, coredat, tstop, v_init, stimulus_onset, max_walltime_hours, results_write_time, spike_input_path, spike_input_namespace, dt, ldbal, lptbal, cleanup, verbose, run_test): """ :param cell_selection_path: str; name of file specifying subset of cells gids to be instantiated :param config_file: str; model configuration file name :param template_paths: str; colon-separated list of paths to directories containing hoc cell templates :param hoc_lib_path: str; path to directory containing required hoc libraries :param dataset_prefix: str; path to directory containing required neuroh5 data files :param config_prefix: str; path to directory containing network and cell mechanism config files :param results_path: str; path to directory to export output files :param results_id: str; label for neuroh5 namespaces to write spike and voltage trace data :param node_rank_file: str; name of file specifying assignment of node gids to MPI ranks :param io_size: int; the number of MPI ranks to be used for I/O operations :param vrecord_fraction: float; fraction of cells to record intracellular voltage from :param coredat: bool; Save CoreNEURON data :param tstop: int; physical time to simulate (ms) :param v_init: float; initialization membrane potential (mV) :param stimulus_onset: float; starting time of stimulus (ms) :param max_walltime_hours: float; maximum wall time (hours) :param results_write_time: float; time to write out results at end of simulation :param spike_input_path: str; path to file for input spikes when cell selection is specified :param spike_input_namespace: str; :param dt: float; simulation time step :param ldbal: bool; estimate load balance based on cell complexity :param lptbal: bool; calculate load balance with LPT algorithm :param cleanup: bool; whether to delete from memory the synapse attributes metadata after specifying connections :param verbose: bool; print verbose diagnostic messages while constructing the network :param run_test: bool; whether to actually execute simulation after building network """ comm = MPI.COMM_WORLD np.seterr(all='raise') params = dict(locals()) env = Env(**params) network.init(env) if run_test: network.run(env, output=False)
def init_network(comm, kwargs): np.seterr(all='raise') env = Env(comm=comm, **kwargs) network.init(env) return env