On Sat, May 25, 2019 at 02:52:53PM +0200, Thomas Koenig wrote: > > consider this: There is a bug, confirmed by several people. This occurs > in closed-source, proprietary software, and appears to be due to one > of my commits. > > Despite considerable help from somebody who has access to the source, > and putting in quite a few (volunteer) hours myself, there is no > test case. > > So, what to do? Close the PR as INVALID? This would be our standard > policy, correct? > > FYI, the proprietary, closed-source software is SPEC, the corresponding > PR is 90539, and the friendly helper is Martin Liska. >
Put the PR in WAITING as Richard suggested with a note that SPEC is proprietary and without a testcase, it is not possible in investigate further. For WRF, I suppose you or Martin could be a good citizen and contact the project to report a bug. https://www.mmm.ucar.edu/wrf-user-support-contributor-information For netcdf, I suppose you of Martin could report a bug in their interface at https://www.unidata.ucar.edu/software/netcdf/#help Martin's comment #23 shows the interface as And Fortran interface is defined in netcdf/include/netcdf.inc: integer nf_put_vara_double ! (integer ncid, ! integer varid, ! integer start(1), ! integer count(1), ! doubleprecision dvals(1)) external nf_put_vara_double start(1), count(1), and dvals(1) are each an element of an array. i.e, scalar things. If one looks at the NetCDF sources, the code in question (netcdf-fortran-4.4.5/fortran/nf_varaio.F90) is Function nf_put_vara_double(ncid, varid, start, counts, dvals) & RESULT(status) ! Write out real(RK8) variable to dataset for given start and count vectors USE netcdf_nc_interfaces Implicit NONE Integer, Intent(IN) :: ncid, varid Integer, Intent(IN) :: start(*), counts(*) Real(RK8), Intent(IN) :: dvals(*) So, the comment #23 and the implementation have a mismatch. I'll note that NetCDF has a module fortran/module_netcdf_nf_interfaces.F90, but munging a direct call from C into the Fortran code could mess up the interface. Now, returning to Martin's comment #20 where I wrap the code A0 = nc_put_vara_double (*fncid, *fvarid + -1, (const size_t *) f2c_coords (*fncid, *fvarid + -1, (const int *) A3, (size_t *) &B3), (const size_t *) f2c_counts (*fncid, *fvarid + -1, (const int *) A4, (size_t *) &B4), A5); Depending on the declaration of A5, that naked A5 which is dvals(*), likely to work. -- Steve