diff --git a/miniapp/io.cpp b/miniapp/io.cpp index d7f328e76e587c3ca506a9928738d0369d4c9e0a..fbc70ef823a660c4a14cb4610f1dd011251e4f2b 100644 --- a/miniapp/io.cpp +++ b/miniapp/io.cpp @@ -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( diff --git a/miniapp/miniapp.cpp b/miniapp/miniapp.cpp index f77d96be4c0e0e317d679aca057d7f79e71c0c26..d38d3999e7fd24d45df181d65b94c5596c93281a 100644 --- a/miniapp/miniapp.cpp +++ b/miniapp/miniapp.cpp @@ -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); diff --git a/tests/performance/io/disk_io.cpp b/tests/performance/io/disk_io.cpp index 8cec648594eb58533b4c059a336b621128c974ae..5182b0a8035655b87dc4ac9812796487f1c9868c 100644 --- a/tests/performance/io/disk_io.cpp +++ b/tests/performance/io/disk_io.cpp @@ -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