Hi
I have a code that uses GMT libraries to write to NetCDF grd files,
e.g. like so where the very last argument is the output filename without .grd, e.g. trying to write in a subdirectory and making a file tmp.grd
zcat /disk/twb3/citcom/fulltest/Ra1e8Pl1e6_ddy_151e7_10_244e9_e4_129xyz_25h/63000/v.ab.gz | abconvert 0 22 1 4 | shsyn 5 1 bin/x86_64/tmp
abconvert: reading poltor vector AB AB format in physical convention, lmax: 255
abconvert: compute divergence, switching to pol out
abconvert: output of poloidal part of expansion
shsyn: sum_mode: 1 and out_mode: 1
shsyn: readjusting nlon, nlat and xrange for FFT
shsyn: lmax=255 nlon=513 nlat=256
shsyn: E=0 dx=0.703125 W=360 S=-90 dy=0.705882 N=90
shsyn: constructing lookup tables (Legendre functions) …
shsyn: using 64.25 MB for P array, limit is set to 4200
shsyn: read 1 sets of coefficients with lmax=255
shsyn: set: 1 l: 0 pow^2: 0
shsyn: set: 1 l: 1 pow^2: 0.517226
shsyn: set: 1 l: 2 pow^2: 0.269922
shsyn: set: 1 l: 3 pow^2: 0.553164
shsyn: set: 1 l: 4 pow^2: 0.139321
shsyn: set 1: total power^2 per lmax: 0.0268946
shsyn: using FFT block method, lat= 90
shsyn: my_gmt_write_grd: written to bin/x86_64/tmp.grd
shsyn: Done.
Works fine. If I write to a different disk, mounted on NSF, I can access it
touch /disk/twb3/citcom/fulltest/Ra1e8Pl1e6_ddy_151e7_10_244e9_e4_129xyz_25h/63000/div.grd
but when I use the GMT code, I cannot write to that file, it seems
> zcat /disk/twb3/citcom/fulltest/Ra1e8Pl1e6_ddy_151e7_10_244e9_e4_129xyz_25h/63000/v.ab.gz | abconvert 0 22 1 4 | shsyn 5 1 /disk/twb3/citcom/fulltest/Ra1e8Pl1e6_ddy_151e7_10_244e9_e4_129xyz_25h/63000/div
abconvert: reading poltor vector AB AB format in physical convention, lmax: 255
shsyn: sum_mode: 1 and out_mode: 1
abconvert: compute divergence, switching to pol out
abconvert: output of poloidal part of expansion
shsyn: readjusting nlon, nlat and xrange for FFT
shsyn: lmax=255 nlon=513 nlat=256
shsyn: E=0 dx=0.703125 W=360 S=-90 dy=0.705882 N=90
shsyn: constructing lookup tables (Legendre functions) …
shsyn: using 64.25 MB for P array, limit is set to 4200
shsyn: read 1 sets of coefficients with lmax=255
shsyn: set: 1 l: 0 pow^2: 0
shsyn: set: 1 l: 1 pow^2: 0.517226
shsyn: set: 1 l: 2 pow^2: 0.269922
shsyn: set: 1 l: 3 pow^2: 0.553164
shsyn: set: 1 l: 4 pow^2: 0.139321
shsyn: set 1: total power^2 per lmax: 0.0268946
shsyn: using FFT block method, lat= 90
shsyn (gmtapi_export_grid): Could not find file [/disk/twb3/citcom/fulltest/Ra1e8Pl1e6_ddy_151e7_10_244e9_e4_129xyz_25h/63000/div.grd]
[Session shsyn (0)]: Error returned from GMT API: GMT_GRID_WRITE_ERROR (19)
[Session shsyn (0)]: Error returned from GMT API: GMT_GRID_WRITE_ERROR (19)
[Session shsyn (0)]: Error returned from GMT API: GMT_GRID_WRITE_ERROR (19)
my_gmt_write_grd: error writing grid, code 19
This is using the current GitHub GMT and seemingly worked fine just a few days ago with a slightly older GMT GitHub version. I realize that this looks like a problem on our end, and I could generate a more portable example, but I wonder if this might ring a bell?
I’ve also seen a bunch of Directory gmt.history is not locked for exclusive access. Multiple gmt processes running at once could corrupt history file. warning (though not for the runs above).
Any ideas? Some sort of file locking switch I should use during compile?
Thanks much in advance!
T