Skip to content
Snippets Groups Projects
Commit d6218b18 authored by w.klijn's avatar w.klijn
Browse files

Fix namespace exporter

fix importing of file export parameters from json
parent fc458060
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ cl_options read_options(int argc, char** argv) {
util::nothing, // trace_max_gid
// spike_output_parameters:
false, // no spike output
false, // spike output
false, // single_file_per_simulation
true, // Overwrite outputfile if exists
"./", // output path
......@@ -208,6 +208,17 @@ cl_options read_options(int argc, char** argv) {
update_option(options.probe_soma_only, fopts, "probe_soma_only");
update_option(options.trace_prefix, fopts, "trace_prefix");
update_option(options.trace_max_gid, fopts, "trace_max_gid");
// Parameters for spike output
update_option(options.spike_file_output, fopts, "spike_file_output");
if (options.spike_file_output) {
update_option(options.single_file_per_rank, fopts, "single_file_per_rank");
update_option(options.over_write, fopts, "over_write");
update_option(options.output_path, fopts, "output_path");
update_option(options.file_name, fopts, "file_name");
update_option(options.file_extention, fopts, "file_extention");
}
}
catch (std::exception& e) {
throw model_description_error(
......@@ -260,18 +271,8 @@ cl_options read_options(int argc, char** argv) {
else {
fopts["trace_max_gid"] = nullptr;
}
fid << std::setw(3) << fopts << "\n";
// Parameters for spike output
options.spike_file_output = fopts["spike_file_output"];
if (options.spike_file_output) {
options.single_file_per_rank = fopts["single_file_per_rank"];
options.over_write = fopts["over_write"];
options.output_path = fopts["output_path"].get<std::string>();;
options.file_name = fopts["file_name"].get<std::string>();;
options.file_extention = fopts["file_extention"].get<std::string>();;
}
}
catch (std::exception& e) {
throw model_description_error(
......
......@@ -33,7 +33,7 @@ using lowered_cell = fvm::fvm_cell<double, cell_local_size_type>;
using model_type = model<lowered_cell>;
using time_type = model_type::time_type;
using sample_trace_type = sample_trace<time_type, model_type::value_type>;
using file_export_type = communication::exporter_spike_file<time_type, global_policy>;
using file_export_type = io::exporter_spike_file<time_type, global_policy>;
void banner();
std::unique_ptr<recipe> make_recipe(const io::cl_options&, const probe_distribution&);
std::unique_ptr<sample_trace_type> make_trace(cell_member_type probe_id, probe_spec probe);
......
......@@ -22,7 +22,7 @@ using global_policy = communication::global_policy;
using lowered_cell = fvm::fvm_cell<double, cell_local_size_type>;
using cell_group_type = cell_group<lowered_cell>;
using time_type = typename cell_group_type::time_type;
using spike_type = communication::exporter_spike_file<time_type,
using spike_type = io::exporter_spike_file<time_type,
global_policy>::spike_type;
using timer = util::timer_type;
......@@ -68,7 +68,7 @@ int main(int argc, char** argv)
}
// Create the sut
communication::exporter_spike_file<time_type, global_policy> exporter(
io::exporter_spike_file<time_type, global_policy> exporter(
"spikes", "./", "gdf", true);
// We need the nr of ranks to calculate the nr of spikes to produce per
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment