You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change 12a43badc70bf5f4ea77b14b5044250c5ac16a76 from May 2 broke Julia #5384
Very likely it's because it can't handle the -i0-1,1 anymore. The crash is indeed caused when it tries to access a 3rd column in data that has only 2 columns
We clearly need to improve how testing is done so that when we make any bug fixes on the API that there is either automatically or manually a run of the Julia and PyGMT tests (and of course ideally also GMT/MEX tests). Otherwise, time goes by and it is harder to get back in and rediscover what was learned. Maybe we should add a new label that can be used to flags API-related changes?
Remind me if you are passing this as a matrix, sets of vectors, or a GMT dataset via reference.
The detection problem here was that I didn't have this test in my test suites, or only tested that the GMT syntax is well generated.
The culprit was this in change in gmt_api.c/gmtapi_pick_in_col_number()
col_pos = GMT->current.io.col[GMT_IN][col].col; /* Which data column to pick */
to
col_pos = GMT->current.io.col[GMT_IN][col].order; /* Which data column to pick */
We clearly need to improve how testing is done so that when we make any bug fixes on the API that there is either automatically or manually a run of the Julia and PyGMT tests (and of course ideally also GMT/MEX tests).
PyGMT runs its full tests with GMT master branch nightly, so any GMT API problems should be detected by PyGMT tests (if there are covered) in a few days.
I meant across all PyGMT modules you do use both methods for passing data into GMT. not mixing, but one modules may use VECTOR and another may use MATRIX.
one modules may use VECTOR and another may use MATRIX.
Yes.
Maybe I was wrong. For example, in PyGMT, the contour function can either pass vectors of x, y, z by calling GMT_Put_Vectors or pass a matrix of (x,y,z) by calling GMT_Put_Matrix.
Activity
PaulWessel commentedon Jun 25, 2021
OK, so a couple of things:
Thoughts on this, @seisman and @meghanrjones?
joa-quim commentedon Jun 25, 2021
The detection problem here was that I didn't have this test in my test suites, or only tested that the GMT syntax is well generated.
The culprit was this in change in
gmt_api.c/gmtapi_pick_in_col_number()seisman commentedon Jun 25, 2021
PyGMT runs its full tests with GMT master branch nightly, so any GMT API problems should be detected by PyGMT tests (if there are covered) in a few days.
The commit reverted in #5385 comes from PR #5289.
PaulWessel commentedon Jun 25, 2021
Please check if the revert (which was one line only) negatively affects the pyGMT examples.
seisman commentedon Jun 25, 2021
Yes, scripts in GenericMappingTools/pygmt#1313 now break.
PaulWessel commentedon Jun 25, 2021
@joa-quim let me know please.
joa-quim commentedon Jun 25, 2021
I am passing a GMTdataset. It works if I only pass the matrix.
You can reproduce it in Matlab. This crashes Matlab (if using
orderinstead ofcol)joa-quim commentedon Jun 25, 2021
But even Matrices have problems. This should plot bars with error-bars and what is passed in is 5x3 matrix
The generated command is
No crash but 0-error bars
PaulWessel commentedon Jun 25, 2021
I think I will make a test*.c example to do some more testing on -i and passing various things in.
PaulWessel commentedon Jun 25, 2021
And @seisman, I think PyGMT uses mostly GMT_VECTOR when passing in datasets and GMT_MATRIX when passing in grids, or do you mix it up?
seisman commentedon Jun 25, 2021
I think PyGMT doesn't use GMT_VECTOR and GMT_MATRIX together.
PaulWessel commentedon Jun 25, 2021
I meant across all PyGMT modules you do use both methods for passing data into GMT. not mixing, but one modules may use VECTOR and another may use MATRIX.
seisman commentedon Jun 25, 2021
Yes.
seisman commentedon Jun 25, 2021
Maybe I was wrong. For example, in PyGMT, the
contourfunction can either pass vectors of x, y, z by callingGMT_Put_Vectorsor pass a matrix of (x,y,z) by callingGMT_Put_Matrix.PaulWessel commentedon Jun 29, 2021
Can you check this again - should work fine after the fix. if so please close.
joa-quim commentedon Jun 29, 2021
It's fine ... and closed.