-
Notifications
You must be signed in to change notification settings - Fork 265
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
Shared diskless files #12
Conversation
Fedor, I am not sure I understand the point of this change. We assume that some part of the code has opened/created |
Hi Dennis, Thanks for considering the patch. The following scenario's are described in the docs:
This is the scenario that I implemented.
Before my change this results in an file not found error. My implementation indeed only works for single processes, as memio.c does not create shared memory and You could also use the ncid, but that is not always very elegant. Cheers, Fedor |
I expect to accept this change, but after SiggyF wrote:
|
Following up on open pull requests/issue reports. Dennis, can this be merged? If so I'm happy to handle the actual merge into the development branch. |
Not yet; I recall that I realized there might be Ward Fisher wrote:
|
Given that this pull request can't be merged at this time, but that we also are interested in incorporating it once we're able to, I am closing the pull request and adding a link to it to the 'Requested Features' page on the NetCDF-C wiki. This way we can re-open it once we have the resources to devote to it. https://github.com/Unidata/netcdf-c/wiki/Requested-Features |
…h_pio2 Adding PIO to netCDF
I extended the diskless mode. Files that are created in memory can now be opened by opening a
file with NC_DISKLESS mode using the same name.
This is in improvement over sharing open file identifiers between processes and provides an easy path
from disk-based to memory-based model coupling.
This is a simplified example of the use case I had (netcdf as shared memory between python and c) :
http://nbviewer.ipython.org/github/SiggyF/notebooks/blob/master/diskless.ipynb
and this is more detailed example (create a dataset in netcdf in python and reuse it in a fortran based model) :
http://nbviewer.ipython.org/github/nens/python-subgrid/blob/master/notebooks/delflandrain.ipynb
I added an extra test tst_diskless5.c. Note that if you want to ignore the whitespace cleanup you can do so by adding ?w=1 in a github url or add --ignore-all-space in the git command.
Please let me know if you can merge this code into the netcdf library. Feel free to contact me if extra effort is required.
Fedor Baart