Assertion `ncp->head != ((void *)0)' failed.

Wei-keng Liao wkliao at ece.northwestern.edu
Wed Feb 13 13:28:35 CST 2013


Hi, Jialin,

I suspect it is because the call to ncmpi_iget_vara() failed.
Please check the return values of all your ncmpi_ calls.
It may tell you if you got an error before you would like to continue.

Also, I am seeing this line in your codes:
>        nb_temp_in[rank]=calloc(varasize,sizeof(float));

But you are using nb_temp[rank] in ncmpi_iget_vara()


Wei-keng

On Feb 13, 2013, at 12:13 PM, Liu, Jaln wrote:

> Hi,
> 
> When I run the codes below, I got an error " Assertion `ncp->head != ((void *)0)' failed."
> (I looked into the source codes, I saw a operation of checking Id, seems each request should be checked and matched with the file handle? I don't know the reason)
> 
>        float ** nb_temp;
>        nb_temp=malloc(nprocs*sizeof(float *));
>        int * request=calloc(nprocs, sizeof(int));
>        int * status=calloc(nprocs,sizeof(int));
>        mpi_start[1]=rank*5;//starts on other dimensions are specified to 0.
>        int varasize=100*10*NLAT*NLON;
>        nb_temp_in[rank]=calloc(varasize,sizeof(float));
> 
>        ncmpi_iget_vara(ncid, temp_varid, mpi_start,mpi_count,nb_temp[rank],varasize,MPI_FLOAT,&(request[rank]);
> 
>        ncmpi_wait_all(ncid, nprocs, request, status);
> 
> A detailed return is in the attachment,
> 
> Can you please tell me what's wrong with the codes?
> I appreciate it.
> 
> Jialin
> <56034.e>



More information about the parallel-netcdf mailing list