-
Notifications
You must be signed in to change notification settings - Fork 267
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
nc_open_mem fails #394
Comments
any work-arounds found? |
This was referenced Apr 28, 2017
Merged
attn: @WardF Having this work would be a great win on our end. |
btw I fixed this in #400 |
I am headed back from EGU in the am. I have no internet at the hotel, effectively, so will take care if this this weekend if not sooner. |
Well don't do that on our account--I'll be happy so long as it makes 4.4.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
re esupport: YID-571993
Full Name: Michael Uleysky
Email Address: uleysky@poi.dvo.ru
Organization: POI FEB RAS
Package Version: 4.4.1.1
Operating System: Linux
Hardware:
Description of problem: nc_open_mem() returns the error "No such file or directory". Strace shows what netcdf try to open(2) the first argument of nc_open_mem call. I am attaching a very simple c program that reproduce this bug. The file ref_nctest_classic.nc is taken from the distribution directory (nctest/ref_nctest_classic.nc).
Full Name: Michael Uleysky
Email Address: uleysky@poi.dvo.ru
Organization: POI FEB RAS
Package Version: 4.4.1.1
Operating System: Linux
Hardware:
Description of problem: nc_open_mem() returns the error "No such file or directory". Strace shows what netcdf try to open(2) the first argument of nc_open_mem call. I am attaching a very simple c program that reproduce this bug. The file ref_nctest_classic.nc is taken from the distribution directory (nctest/ref_nctest_classic.nc).
======= testnc.c============
#include <netcdf.h>
#include <netcdf_mem.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mman.h>
int main()
{
int fd;
struct stat st;
int ret;
void* data;
int ncid;
fd=open("ref_nctest_classic.nc",O_RDONLY);
if(fd==-1) return 1;
ret=fstat(fd,&st);
if(ret!=0) return 1;
data=mmap(0,st.st_size,PROT_READ,MAP_SHARED,fd,0);
if(data==0) return 1;
ret=nc_open_mem("test",0,st.st_size,data,&ncid);
if(ret!=NC_NOERR) {printf("%s\n",nc_strerror(ret)); return 1;}
return 0;
}
The text was updated successfully, but these errors were encountered: