Skip to content

Conversation

@PaulWessel
Copy link
Member

See form post for details. This PR simply adds a failing test.

See form post for details. This PR simply adds a failing test.
@PaulWessel PaulWessel added bug Something isn't working backport 6.1 Backport this PR to 6.1 branch labels Aug 31, 2020
@PaulWessel PaulWessel requested review from joa-quim and seisman August 31, 2020 00:12
@PaulWessel PaulWessel self-assigned this Aug 31, 2020
@PaulWessel
Copy link
Member Author

Note: I thought I had fixed that since it was also reported earlier but I cannot find the pull request of issue. Can you, @seisman?

@PaulWessel
Copy link
Member Author

Note it works without -I but fails with -I.

@seisman
Copy link
Member

seisman commented Aug 31, 2020

This one? #3206

@PaulWessel
Copy link
Member Author

Thanks yes. OK, so this current case does not involve 15s so perhaps takes a different path. I will debug.

PaulWessel added a commit that referenced this pull request Aug 31, 2020
If an intensity grid is given, and a remote earth_relief grid is given, then when the intensity grid is read in and we specify the subregion wesn, make sure this region matches the possibly adjusted tile_wesn due to rounding in gmt_remote.c  See #4124 for background.
PaulWessel added a commit that referenced this pull request Aug 31, 2020
* Make sure intensity subset matches tiled region if given

If an intensity grid is given, and a remote earth_relief grid is given, then when the intensity grid is read in and we specify the subregion wesn, make sure this region matches the possibly adjusted tile_wesn due to rounding in gmt_remote.c  See #4124 for background.

* Update grdimage.c

* Update grdimage.c

Actually, similar problem cased the issue to begin with.
github-actions bot pushed a commit that referenced this pull request Aug 31, 2020
* Make sure intensity subset matches tiled region if given

If an intensity grid is given, and a remote earth_relief grid is given, then when the intensity grid is read in and we specify the subregion wesn, make sure this region matches the possibly adjusted tile_wesn due to rounding in gmt_remote.c  See #4124 for background.

* Update grdimage.c

* Update grdimage.c

Actually, similar problem cased the issue to begin with.
seisman pushed a commit that referenced this pull request Aug 31, 2020
* Make sure intensity subset matches tiled region if given

If an intensity grid is given, and a remote earth_relief grid is given, then when the intensity grid is read in and we specify the subregion wesn, make sure this region matches the possibly adjusted tile_wesn due to rounding in gmt_remote.c  See #4124 for background.

* Update grdimage.c

* Update grdimage.c

Actually, similar problem cased the issue to begin with.

Co-authored-by: Paul Wessel <[email protected]>
@PaulWessel
Copy link
Member Author

Fixed by #4130.

@PaulWessel PaulWessel closed this Aug 31, 2020
@seisman
Copy link
Member

seisman commented Aug 31, 2020

But do we want to add the test for it?

@PaulWessel PaulWessel reopened this Aug 31, 2020
@PaulWessel
Copy link
Member Author

Ooops, yes, this PR has the test script and now the correct PS.

@seisman
Copy link
Member

seisman commented Aug 31, 2020

One concern about this PR is, this PR uses earth_relief_03. It means we have to cache the earth_relief_03s grid (at least some tiles).

@PaulWessel
Copy link
Member Author

Might we have a flag to prevent a test from being run in the CI, only locally?

@PaulWessel
Copy link
Member Author

Likewise, perhaps remove backport?

@seisman seisman removed the backport 6.1 Backport this PR to 6.1 branch label Sep 2, 2020
@PaulWessel
Copy link
Member Author

Before adding another single flag, perhaps thing about deeper about test partitioning. Ways to consider subsets of tests:

Ability to skip or select tests that are CPU/time intensive
Ability to skip or select tests that require large data sets
Ability to skip or select tests only for the API (the api dir)
Ability to select tests only for one module (i.e., only the test/module folder)

Might be others. Hopefully the flag (maybe this is a bitflag) can help the CI know what to pre-download? A key issue for us is often the time it takes. I made a histogram of run times for the tests once. It is long-tailed, with mostly quick tests and a few slow ones. A linear scheme does not seem sensible, maybe a flag 1, 2 , 3 that maps to log10 of some scaled time?

@seisman
Copy link
Member

seisman commented Sep 2, 2020

Ability to skip or select tests only for the API (the api dir)
Ability to select tests only for one module (i.e., only the test/module folder)

It's already supported. ctest -R api to run api tests only, and ctest -R psxy to run psxy-specific tests.

Currently, tests have inconsistent names (e.g., GMT_hammer.sh in doc/scripts directory, ex01/ex01.sh in doc/examples directory, and pshistogram/flip.sh in test directory). In #3949, I plan to let all tests use their relative path as the test name. For example, the test name should be doc/scripts/GMT_hammer.sh instead of GMT_hammer.sh. After #3949 is done, it's possible to split all tests into three groups: examples, scripts in the documentation, and the real tests.

Comment on lines 2 to 3
# Failing script while fixing https://forum.generic-mapping-tools.org/t/error-pygmt-gmtcliberror-module-grdimage-failed-with-status-code-78/829
# Now reported as issue ###
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix/improve the comments.

@seisman
Copy link
Member

seisman commented Sep 2, 2020

For this test, I think we can run gmt grdcut -R3:57/4:18/44:00/44:15 @earth_relief_03s -G/dev/null to cache the two tiles (~3 MB) in the CI.

@PaulWessel
Copy link
Member Author

Like this?

Comment on lines 5 to 6
# Ensure the two tiles are downloaded first:
gmt grdcut -R3:57/4:18/44:00/44:15 @earth_relief_03s -G/dev/null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I didn't mean this. It should be done in the CI script:

# Download remote files, if not already cached
- bash: |
set -x -e
# list of datasets used in tests
data="@earth_relief_01d \
@earth_relief_30m \
@earth_relief_20m \
@earth_relief_15m \
@earth_relief_10m @earth_relief_10m_g \
@earth_relief_06m \
@earth_relief_05m @earth_relief_05m_g \

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I agree. Should I or you move that code to the .yml file then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do that.

@PaulWessel PaulWessel merged commit e5acedc into master Sep 2, 2020
@PaulWessel PaulWessel deleted the tile-rounding branch September 2, 2020 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants