File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -391,8 +391,6 @@ struct NC {
391391 int chunk ; /* chunk size for reading header, one chunk at a time */
392392 MPI_Offset v_align ; /* alignment of the beginning of fixed-size variables */
393393 MPI_Offset r_align ; /* file alignment for record variable section */
394- MPI_Offset env_v_align ; /* v_align set in environment variable */
395- MPI_Offset env_r_align ; /* r_align set in environment variable */
396394 MPI_Offset info_v_align ;/* v_align set in MPI Info object */
397395 MPI_Offset info_r_align ;/* r_align set in MPI Info object */
398396 MPI_Offset h_minfree ; /* pad at the end of the header section */
@@ -406,6 +404,7 @@ struct NC {
406404 the size of file header extent. */
407405 MPI_Offset begin_rec ; /* file offset of the first 'record' */
408406
407+ MPI_Offset fix_end ; /* end offset of last fix-sized variable */
409408 MPI_Offset recsize ; /* length of 'record': sum of single record sizes
410409 of all the record variables */
411410 MPI_Offset numrecs ; /* no. 'records' allocated */
Original file line number Diff line number Diff line change 3434static int
3535compute_var_shape (NC * ncp )
3636{
37- int i , err ;
37+ int i , err , last_fix ;
3838 NC_var * first_var = NULL ; /* first "non-record" var */
3939 NC_var * first_rec = NULL ; /* first "record" var */
4040
@@ -44,6 +44,7 @@ compute_var_shape(NC *ncp)
4444 ncp -> begin_rec = ncp -> xsz ;
4545 ncp -> recsize = 0 ;
4646
47+ last_fix = -1 ;
4748 for (i = 0 ; i < ncp -> vars .ndefined ; i ++ ) {
4849 /* ncp->vars.value[i]->len will be recomputed from dimensions in
4950 * ncmpio_NC_var_shape64() */
@@ -62,8 +63,14 @@ compute_var_shape(NC *ncp)
6263 */
6364 ncp -> begin_rec = ncp -> vars .value [i ]-> begin
6465 + ncp -> vars .value [i ]-> len ;
66+ last_fix = i ;
6567 }
6668 }
69+ if (last_fix >= 0 )
70+ ncp -> fix_end = ncp -> vars .value [last_fix ]-> begin
71+ + ncp -> vars .value [last_fix ]-> len ;
72+ else
73+ ncp -> fix_end = ncp -> begin_var ;
6774
6875 if (first_rec != NULL ) {
6976 if (ncp -> begin_rec > first_rec -> begin )
You can’t perform that action at this time.
0 commit comments