Skip to content
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

nf_set_log_level not included in netcdf.mod #313

Open
kgerheiser opened this issue Nov 30, 2021 · 1 comment
Open

nf_set_log_level not included in netcdf.mod #313

kgerheiser opened this issue Nov 30, 2021 · 1 comment

Comments

@kgerheiser
Copy link

kgerheiser commented Nov 30, 2021

I built NetCDF-C with --enable-logging and NetCDF-Fortran with CPPFLAGS=-DLOGGING. Then, I try to call nf_set_log_level, but I get function not found.

Desktop/ufs-data/ufs-weather-model/FV3/io/module_write_netcdf_parallel.F90:87:12:

   87 |     ncerr = nf_set_log_level(3); NC_ERR_STOP(ncerr)
      |            1
Error: Function 'nf_set_log_level' at (1) has no IMPLICIT type

nf_set_log_level is not included in netcdf.mod, and I found I have to #include "netcdf.inc" for it to work. I think there should be an nf90_set_log_level that works with the module.

It would also be nice if nf_set_log_level were documented somewhere and told you that you have to add -DLOGGING to the pre-processor, or automatically detect if NetCDF-C was compiled with --enable-logging.

@edwardhartnett
Copy link
Contributor

All good points. The netCDF-4 logging capability was developed and used internally (by me) when developing netCDF-4. I didn't think it would be useful to end users, but it is.

Meanwhile, @DennisHeimbigner developed his own logging system for the DAP code.

We have several issues open regarding this: Unidata/netcdf-c#1845, Unidata/netcdf-c#1762, and Unidata/netcdf-c#643.

I did a better job with logging on the PIO library, which has logging similar to the netcdf-4 logging, but without some of the ugliness, and with separate output streams for each processor. This is absolutely essential when debugging parallel I/O problems, but is not in the netcdf-c logging yet.

So there is much to be done, and if I could clone myself 10 times, I just might be able to finish it all...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants