/*
 *  sim_params.sli
 *
 *  This file is part of NEST.
 *
 *  Copyright (C) 2004 The NEST Initiative
 *
 *  NEST is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  NEST is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

/* 
    Contains:
    - simulation parameters
    - recording parameters
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%     	Simulation parameters		%%%        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/run_mode (test) def  % (test) for writing files to 
                      % directory containing microcircuit.sli 
                      % (production) for writing files
                      % to a chosen absolute path. 

/t_sim 1000.0 def     % simulated time (ms)
/dt 0.1 def           % simulation step (ms). Default is 0.1 ms.

% master seed for random number generators
% actual seeds will be master_seed ... master_seed + 2*n_vp
%  ==>> different master seeds must be spaced by at least 2*n_vp + 1
% see Gewaltig et al. (2012) for details       
/master_seed 123456 def   % changes rng_seeds and grng_seed

/n_compute_nodes 1 def	    	    	    % number of compute nodes

/n_mpi_procs_per_compute_node 1 def	    % number of MPI processes per compute node

/n_threads_per_mpi_proc 2 def	            % number of threads per MPI process


/n_vp n_compute_nodes n_mpi_procs_per_compute_node mul n_threads_per_mpi_proc mul def
      		      				% number of virtual processes
                                                % This should be an integer multiple of 
                                                % the number of MPI processes 
                                                % See Morrison et al. (2005) Neural Comput
/walltime (8:0:0) def		% walltime for simulation

/memory (500mb) def		% total memory
                                % use for instance 4gb for a full-scale simulation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%     	Recording parameters		%%%        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

/overwrite_existing_files true def

% whether to record spikes from a fixed fraction of neurons in each population
% If false, a fixed number of neurons is recorded in each population.
% record_fraction_neurons_spikes true with f_rec_spikes 1. records all spikes
/record_fraction_neurons_spikes true def

record_fraction_neurons_spikes
{
    /frac_rec_spikes 0.1 def
}{
    /n_rec_spikes 100 def
} ifelse

% whether to record voltage from a fixed fraction of neurons in each population
/record_fraction_neurons_voltage true def

record_fraction_neurons_voltage
{
    /frac_rec_voltage 0.02 def
}{
    /n_rec_voltage 20 def
} ifelse

% whether to write any recorded cortical spikes to file
/save_cortical_spikes true def

% whether to write any recorded membrane potentials to file
/save_voltages true def

% whether to record thalamic spikes (only used when n_thal in
% network_params.sli is nonzero)
/record_thalamic_spikes true def

% whether to write any recorded thalamic spikes to file
/save_thalamic_spikes true def

% name of file to which to write global IDs
/GID_filename (population_GIDs.dat) def

% stem for spike detector file labels
/spike_detector_label (spikes_) def

% stem for voltmeter file labels
/voltmeter_label (voltages_) def

% stem for thalamic spike detector file labels
/th_spike_detector_label (th_spikes_) def

% file name for standard output
/std_out (output.txt) def

% file name for error output
/error_out (errors.txt) def
