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

Updated(?) netCDF leads to new crash in grdpaste #512

Closed
PaulWessel opened this issue Mar 15, 2019 · 3 comments
Closed

Updated(?) netCDF leads to new crash in grdpaste #512

PaulWessel opened this issue Mar 15, 2019 · 3 comments

Comments

@PaulWessel
Copy link
Member

grdpaste, when pasting two grids together now results in a new type of crash inside netCDF. Easy to demonstrate:

gmt grdmath -R0/1/0/1 -I5m X = 1.nc
gmt grdmath -R1/2/0/1 -I5m X = 2.nc
gmt grdpaste 1.nc 2.nc -Gboth.nc
ERROR: Caught signal number 11 (Segmentation fault) at
0   libnetcdf.13.dylib                  0x000000010ad062b2 NC_check_nulls + 158
1   ???                                 0x00000002e543a5c0 0x0 + 12436350400
Stack backtrace:
0   libgmt.6.dylib                      0x000000010a7d7184 sig_handler + 580
1   libsystem_platform.dylib            0x00007fff775b3b3d _sigtramp + 29
2   ???                                 0x0000000111ba9938 0x0 + 4592408888
3   libnetcdf.13.dylib                  0x000000010ad079e7 NC_get_varm + 117
4   libnetcdf.13.dylib                  0x000000010ad07ac4 nc_get_varm_float + 14
5   libgmt.6.dylib                      0x000000010a86f441 gmtnc_io_nc_grid + 641
6   libgmt.6.dylib                      0x000000010a86edb7 gmt_nc_read_grd + 1991
7   libgmt.6.dylib                      0x000000010a83a557 gmtlib_read_grd + 199
8   libgmt.6.dylib                      0x000000010a80007b api_import_data + 9019
9   libgmt.6.dylib                      0x000000010a7ec89b api_get_data + 315
10  libgmt.6.dylib                      0x000000010a7e4537 GMT_Read_Data + 4007
11  libgmt.6.dylib                      0x000000010aa856a4 GMT_grdpaste + 6996
12  libgmt.6.dylib                      0x000000010a7f4e54 GMT_Call_Module + 628
13  gmt                                 0x000000010a7c7ede main + 1070
14  libdyld.dylib                       0x00007fff773c8ed9 start + 1
15  ???                                 0x0000000000000005 0x0 + 5

netcdf library version 4.6.2 of Mar 9 2019 17:48:03.
We are presumably doing something that was OK in the paste but that the netCDF police (e.g., NC_check_nulls) is now cracking down on. Perhaps @remkos knows the story?

@PaulWessel
Copy link
Member Author

This is a bug in netCDF 4.6.2 (Unidata/netcdf-c#1265) that was fixed in 4.6.3 released March 5. So presumably the only recourse is to await distros pushing out netcdf 4.6.3 (I am stuck on 4.6.2).

@PaulWessel
Copy link
Member Author

The workaround for people needing to use grdpaste is to convert your files to GMT native binary which bypasses the netCDF library, i.e.,

gmt grdmath -R0/1/0/1 -I5m X = 1.grd=bf 
gmt grdmath -R1/2/0/1 -I5m X = 2.grd=bf 
gmt grdpaste 1.grd=bf 2.grd=bf -Gboth.nc

@PaulWessel
Copy link
Member Author

Fixed in GMT master and 5.4, now closed.

obaney pushed a commit to obaney/gmt that referenced this issue Aug 18, 2021
…gTools#512)

Let pytest generate coverage reports in both XML and HTML formats.
HTML version is useful for viewing reports locally, and XML version is for codecov.

If all tests pass, the XML and HTML coverage reports will be copied into
the root directory; otherwise, they will be in the tmp-test-dir-with-unique-name
directory.
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

1 participant