This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Dear NetCDF Support team, > > I wish to report a problem in trying to compile the following NetCDF 4 > parallel I/O statement: > > > nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & > > id_var_domask(mid,av,if), & > > local_pf(mask_size_l(mid,1),mask_size_l(mid,2), & > > mask_size_l(mid,3)), & > > start = (/ mask_start_l(mid,1), mask_start_l(mid,2), & > > mask_start_l(mid,3), domask_time_count(mid,av) /) > > & > > !!$ count = (/ mask_size_l(mid,1), mask_size_l(mid,2), & > > !!$ mask_size_l(mid,3), 1 /), & > > !!$ stride= (/ mask_size(mid,1) - mask_size_l(mid,1) + 1, & > > !!$ mask_size(mid,2) - mask_size_l(mid,2) + 1, & > > !!$ mask_size(mid,3) - mask_size_l(mid,3) + 1, 1 > > /) & > > ) > > On two different HPC systems and compilers, each with a parallel I/O > enabled NetCDF 4.0.1/HDF5 installation, the above parallel I/O code snippet > - compiles well without count and stride > - but does not compile with count and stride: > compiler 1: > > fortcom: Error: data_output_mask.f90, line 323: There is no matching > > specific function for this generic function reference. [NF90_PUT_VAR] > > nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & > > --------------------^ > > compilation aborted for data_output_mask.f90 (code 1) > > make: *** [data_output_mask.o] Error 1 > > MAKE_ERROR > > compiler 2: > > "data_output_mask.f90", line 323.21: 1513-062 (S) Generic procedure > > reference can not be resolved due to incorrect actual argument attributes. > > ** data_output_mask === End of Compilation 1 === > > 1501-511 Compilation failed for file data_output_mask.f90. > > make: *** [data_output_mask.o] Error 1 > > MAKE_ERROR > > What I wish to achieve with the code snippet is that each processor > directly writes its subset of volume data to the same variable in the > same output file using parallel I/O, one timestep at a time. I believe > that I do need count and stride in order to assure a correct match of > all data on file. > > Depending on the file generation mode, it is created using one of these > two statements: > > nc_stat = NF90_CREATE_PAR( filename, OR( NF90_NOCLOBBER, > > & > > NF90_NETCDF4 ), comm2d, MPI_INFO_NULL, & > > id_set_mask(mid,av) ) > > > nc_stat = NF90_CREATE_PAR( filename, OR( NF90_NOCLOBBER, > > & > > NF90_CLASSIC_MODEL ), comm2d, & > > MPI_INFO_NULL, id_set_mask(mid,av) ) > > I am not aware whether my observed compiler error points at a NetCDF / > parallel I/O problem or whether there is an obvious bug in my code that > I just did't notice. > > I would be grateful for help, suggestions or any clarifying comments or > questions. > > Kind wishes, > Marcus Letzel > > Howdy Marcus! The dimensionality of the third parameter (values) must match the dimensionality of the count and stride array. Your value array seems to be 3D, but your stride and count arrays are 4D. I have just added a test of the stride parameter in parallel I/O situations. If you get tomorrow's daily snapshot you can see for yourself in nf_test/f90tst_parallel2.f90 that the stride parameter is working as intended. Please let me know if this doesn't help. Thanks, Ed Ticket Details =================== Ticket ID: RYQ-949285 Department: Support netCDF Priority: Normal Status: Closed