Skip to content
Snippets Groups Projects
Select Git revision
  • 5e0e29b19efe9e417dd384256f9e8d11a8afb20b
  • master default protected
  • noelp-master-patch-87404
  • disable-view
  • experimental_rel
  • test_quiggeldy_service
  • update-arbor-0.10.0
  • image_build
  • spack_v0.22.1
  • ebrains-24-04
  • update-readme
  • create-module-file
  • add-nestml-tests
  • feat_add_py-norse
  • update-libneuroml
  • update-bluebrain-packages
  • feat_arbor_install_all_binaries
  • ebrains-23.09-jsc-site-config
  • spack-v0.20.0
  • ebrains-23-09-spack-v0.19.2
  • ebrains-23-09
21 results

package.py

Blame
  • io.hpp 1.77 KiB
    #pragma once
    
    #include <stdexcept>
    #include <string>
    #include <utility>
    #include <vector>
    #include <common_types.hpp>
    #include <util/optional.hpp>
    #include <util/path.hpp>
    
    namespace arb {
    namespace io {
        // Holds the options for a simulation run.
        // Default constructor gives default options.
        struct cl_options {
            // Cell parameters:
            uint32_t nexc = 400;
            uint32_t ninh = 100;
            uint32_t next = 40;
            double syn_per_cell_prop = 0.05;
            float weight = 1.2;
            float delay = 0.1;
            float rel_inh_strength = 1;
            double poiss_lambda = 1;
    
            // Simulation running parameters:
            double tfinal = 100.;
            double dt = 1;
            uint32_t group_size = 10;
            uint32_t seed = 42;
    
            // Parameters for spike output.
            bool spike_file_output = false;
            bool single_file_per_rank = false;
            bool over_write = true;
            std::string output_path = "./";
            std::string file_name = "spikes";
            std::string file_extension = "gdf";
    
            // Turn on/off profiling output for all ranks.
            bool profile_only_zero = false;
    
            // Be more verbose with informational messages.
            bool verbose = false;
        };
    
        class usage_error: public std::runtime_error {
        public:
            template <typename S>
            usage_error(S&& whatmsg): std::runtime_error(std::forward<S>(whatmsg)) {}
        };
    
        class model_description_error: public std::runtime_error {
        public:
            template <typename S>
            model_description_error(S&& whatmsg): std::runtime_error(std::forward<S>(whatmsg)) {}
        };
    
        std::ostream& operator<<(std::ostream& o, const cl_options& opt);
    
        cl_options read_options(int argc, char** argv, bool allow_write = true);
    } // namespace io
    } // namespace arbor