Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files dat #964

Merged
merged 7 commits into from
Feb 23, 2021
Merged

Files dat #964

merged 7 commits into from
Feb 23, 2021

Conversation

nrnhines
Copy link
Member

@nrnhines nrnhines commented Feb 7, 2021

Related to neuronsimulator/ringtest#18 where test_submodel.py uses the latest pc.nrncore_write(path, append) implemented in this pull request

Alternative to old pc.nrnbbcore_write(datpath, gidroups_vector).
User does not need to construct, or know the format of, files.dat, when
sequentially constructing and writing mod files. When append is 0, files.dat
is written from scratch. When append is non-zero, reads existing files.dat,
modifies the ngroupids line and appends groupids to end of file. This
works also when submodels are constructed by different launches.

Updates ParallelContext.nrncore_write documentation

Alternative to old pc.nrnbbcore_write(datpath, gidroups_vector).
User does not need to construct, or know the format of, files.dat, when
sequentially constructing and writing mod files. When append is 0, files.dat
is written from scratch. When append is non-zero, reads existing files.dat,
modifies the ngroupids line and appends groupids to end of file. This
works also when submodels are constructed by different launches.
@nrnhines nrnhines requested a review from pramodk February 7, 2021 22:37
@codecov-io
Copy link

codecov-io commented Feb 7, 2021

Codecov Report

Merging #964 (b38b17a) into master (2e461f9) will decrease coverage by 0.00%.
The diff coverage is 40.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #964      +/-   ##
==========================================
- Coverage   27.84%   27.83%   -0.01%     
==========================================
  Files         570      570              
  Lines      108613   108664      +51     
==========================================
+ Hits        30239    30249      +10     
- Misses      78374    78415      +41     
Impacted Files Coverage Δ
src/nrniv/nrncore_write/io/nrncore_io.h 100.00% <ø> (ø)
src/parallel/ocbbs.cpp 41.62% <37.50%> (-0.22%) ⬇️
src/nrniv/nrncore_write/io/nrncore_io.cpp 66.40% <37.70%> (-9.06%) ⬇️
src/nrniv/nrncore_write.cpp 81.91% <62.50%> (-2.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e461f9...b38b17a. Read the comment docs.

@nrnhines
Copy link
Member Author

nrnhines commented Feb 8, 2021

I'm wondering if the second optional arg, "append", is needed or desireable. Would it be too magical if nrncore_write checks the existence and version of a gidgroup file before writing, to decide whether to append or create from scratch a files.dat file. If an old one exists, it seems reasonable to remove all the [0-9]*.dat files and start afresh.

src/nrniv/nrncore_write.cpp Show resolved Hide resolved
src/nrniv/nrncore_write/io/nrncore_io.cpp Outdated Show resolved Hide resolved
src/nrniv/nrncore_write/io/nrncore_io.cpp Outdated Show resolved Hide resolved
src/nrniv/nrncore_write/io/nrncore_io.cpp Outdated Show resolved Hide resolved
src/nrniv/nrncore_write/io/nrncore_io.cpp Outdated Show resolved Hide resolved
src/nrniv/nrncore_write/io/nrncore_io.cpp Show resolved Hide resolved
src/parallel/ocbbs.cpp Outdated Show resolved Hide resolved
@pramodk
Copy link
Member

pramodk commented Feb 17, 2021

I assume this PR is still work-in-progress.

@nrnhines
Copy link
Member Author

I got distracted. Will make the changes and ask for a final review.

@nrnhines nrnhines marked this pull request as draft February 17, 2021 12:15
 Parallel.nrncore_write(path, append) optional second arg must be
a number.
Resolves reviewer suggestions.
@nrnhines nrnhines marked this pull request as ready for review February 21, 2021 00:28
Copy link
Member

@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.

LGTM

@pramodk pramodk merged commit c02b9e1 into master Feb 23, 2021
@pramodk pramodk deleted the files_dat branch February 23, 2021 22:48
alexsavulescu pushed a commit that referenced this pull request Apr 13, 2021
…964)

* pc.nrncore_write(datpath, append)
  Alternative to old pc.nrnbbcore_write(datpath, gidroups_vector).
  User does not need to construct, or know the format of, files.dat, when
  sequentially constructing and writing mod files. When append is 0, files.dat
  is written from scratch. When append is non-zero, reads existing files.dat,
  modifies the ngroupids line and appends groupids to end of file. This
  works also when submodels are constructed by different launches.
* Update ParallelContext.nrncore_write documentation.
* Parallel.nrnbbcore_write(path, Vector) deprecated.
  Parallel.nrncore_write(path, append) optional second arg must be
  a number.
alexsavulescu pushed a commit that referenced this pull request Apr 30, 2021
…964)

* pc.nrncore_write(datpath, append)
  Alternative to old pc.nrnbbcore_write(datpath, gidroups_vector).
  User does not need to construct, or know the format of, files.dat, when
  sequentially constructing and writing mod files. When append is 0, files.dat
  is written from scratch. When append is non-zero, reads existing files.dat,
  modifies the ngroupids line and appends groupids to end of file. This
  works also when submodels are constructed by different launches.
* Update ParallelContext.nrncore_write documentation.
* Parallel.nrnbbcore_write(path, Vector) deprecated.
  Parallel.nrncore_write(path, append) optional second arg must be
  a number.
@alexsavulescu alexsavulescu mentioned this pull request Mar 22, 2022
15 tasks
olupton pushed a commit that referenced this pull request Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants