Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Conversation

jorblancoa
Copy link
Contributor

  • Read buffer size from neurodamus report.conf file

- Read buffer size from report.conf file
@jorblancoa jorblancoa requested a review from pramodk February 15, 2019 14:03
Copy link
Collaborator

@pramodk pramodk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge this after merging neurodamus & reporting lib PR.

@pramodk
Copy link
Collaborator

pramodk commented Feb 24, 2019

@jorblancoa : looks good. one related thing : there is an existing command line option to change number of buffered steps:

$coreneuron_exec -h

USAGE:

OPTIONS:

--num-report-mindelay ARG   Number of min delay intervals to be buffered during
                            reporting (int).

can you change this option to report-buffer-size (default 4MB) ? That should allow to change size of buffer from command line. See coreneuron/coreneuron/nrniv/nrnoptarg.cpp.

void set_report_buffer_size(int n) {
size_report_buffer = n;
#ifdef ENABLE_REPORTING
records_set_max_buffer_size_hint(size_report_buffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
records_set_max_buffer_size_hint(size_report_buffer);
records_set_max_buffer_size_hint(size_report_buffer);

sscanf(raw_line, "\n%s %s %s %s %s %s %d %lf %lf %lf %d\n", report.name, report.target_name,
report.buffer_size = 4; //default size to 4 Mb
fgets(raw_line, MAX_FILEPATH_LEN, fp);
sscanf(raw_line, "\n%s %s %s %s %s %s %d %lf %lf %lf %d %d\n", report.name, report.target_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sscanf(raw_line, "\n%s %s %s %s %s %s %d %lf %lf %lf %d %d\n", report.name, report.target_name,
sscanf(raw_line, "\n%s %s %s %s %s %s %d %lf %lf %lf %d %d\n", report.name, report.target_name,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of lines here got indented with tabs...

- report-buffer-size option with default of 4MB
- Use command line buffer size if not default, otherwise use config file
- Added aux method to check if the value of the command line is the default one
- Fix identation issues
@jorblancoa jorblancoa force-pushed the reportinglib_buffer_size branch from d31fbbc to fc4f2de Compare February 26, 2019 09:36
@pramodk pramodk merged commit 680749a into master Feb 26, 2019
@pramodk pramodk deleted the reportinglib_buffer_size branch February 26, 2019 12:40
iomaganaris pushed a commit that referenced this pull request Mar 6, 2019
- Add buffer size configuration for reportinglib
- Read buffer size from report.conf file
- Add command line option for the report buffer size (4MB as default)
pramodk pushed a commit to neuronsimulator/nrn that referenced this pull request Nov 2, 2022
)

- Add buffer size configuration for reportinglib
- Read buffer size from report.conf file
- Add command line option for the report buffer size (4MB as default)

CoreNEURON Repo SHA: BlueBrain/CoreNeuron@680749a
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants