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

subsetted writes #5

Merged
merged 10 commits into from
Aug 1, 2017
Merged

subsetted writes #5

merged 10 commits into from
Aug 1, 2017

Conversation

evomassiny
Copy link
Collaborator

Hello,

I've implemented subsetted writes using those functions from the libnetCDF library.
A user should now be able to:

I've also updated the documentation and the units tests accordingly,
I would love to see those changes merged, please tell me if anything is wrong with those.

Thanks for your time.

@evomassiny
Copy link
Collaborator Author

Travis is yelling at me, I need to fix that first :/
Sorry.

@evomassiny evomassiny closed this Jul 23, 2017
@evomassiny
Copy link
Collaborator Author

evomassiny commented Jul 23, 2017

Hello again,

It turns out that travis was yelling for 2 different reasons:

  • opening a file in read/write mode, closing it and then re-opening it in read mode triggers this error "H5F_open(): unable to truncate a file which is already open", which apparently is supposed to happen, a quick fix was to re-open it in read/write mode.
  • the use of extern static variables now requires an unsafe block, which means that even the current version can't be built using the nightly and betâ version of rustc :/ (see this issue )

I will try to refactor the netcdf-sys crate in order to get it working with the future versions of rust (and the current beta and nightly version), but this problem is not related to this pull request, and all tests succeed on the stable channel, that's why I still wish to merge this PR, if you're OK with it.

Thanks for your time.

@evomassiny evomassiny reopened this Jul 23, 2017
static".
Use newly generated constants instead (from bindgen).
@evomassiny
Copy link
Collaborator Author

Hello again,

I managed to refactor the netcdf-sys module to avoid the use of extern static bindings (which caused the build failure on the beta and nightly channels).
I've basically replaced all the constants of "netcdf-sys/src/ncconst.c" by rust constants, directly generated using a newer version of bindgen. This also simplify the build of the netcdf-sys crate (because we don't need to generate C constant, and their rust bindings).

The whole crate now compile without warnings, and all tests are successful using all rust versions :)

Thanks for your time.

@mhiley
Copy link
Collaborator

mhiley commented Aug 1, 2017

This is great, thanks so much!

@mhiley mhiley merged commit 4913609 into georust:master Aug 1, 2017
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.

2 participants