ARPA-SIMC / arkimaps

generazione mappe meteorologiche da modelli previsionali
GNU General Public License v2.0
0 stars 1 forks source link

tests.test_flavour.TestFlavour.test_default_shape causa fastidi a Magics #82

Closed spanezz closed 2 years ago

spanezz commented 2 years ago

Su Fedora34:

$ nose2-3.9 --verbose tests.test_flavour.TestFlavour.test_default_shape
test_default_shape (tests.test_flavour.TestFlavour) ... Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
ok

----------------------------------------------------------------------
Ran 1 test in 0.594s

OK

Su Debian bullseye:

$ nose2-3 --verbose tests.test_flavour.TestFlavour.test_default_shape
test_default_shape (tests.test_flavour.TestFlavour) ... ecCodes assertion failed: `h' in ./src/grib_query.c:572
Aborted (core dumped)
spanezz commented 2 years ago

Fedora32:

# nose2-3.8 --verbose tests.test_flavour.TestFlavour.test_default_shape
test_default_shape (tests.test_flavour.TestFlavour) ... Unable to open /share/magics/110m/ne_110m_land.shp or /share/magics/110m/ne_110m_land.SHP.
Magics-ERROR: Can not open Shapefile (4) /share/magics/110m/ne_110m_land.shp
Magics-warning: CairoDriver - Could NOT read logo /share/magics/ecmwf_logo_2014.png
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 193 of /builddir/build/BUILD/Magics-4.8.0-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 193 of /builddir/build/BUILD/Magics-4.8.0-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 193 of /builddir/build/BUILD/Magics-4.8.0-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 193 of /builddir/build/BUILD/Magics-4.8.0-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 193 of /builddir/build/BUILD/Magics-4.8.0-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 193 of /builddir/build/BUILD/Magics-4.8.0-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 193 of /builddir/build/BUILD/Magics-4.8.0-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 193 of /builddir/build/BUILD/Magics-4.8.0-Source/src/decoders/GribDecoder.cc
ok

----------------------------------------------------------------------
Ran 1 test in 0.669s

OK
spanezz commented 2 years ago

Centos8:

# nose2-3.6 --verbose tests.test_flavour.TestFlavour.test_default_shape
test_default_shape (tests.test_flavour.TestFlavour) ... Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
Magics-ERROR: Assertion failed: current_handle_ in getstring, line 209 of /builddir/build/BUILD/Magics-4.9.3-Source/src/decoders/GribDecoder.cc
ok

----------------------------------------------------------------------
Ran 1 test in 0.730s

OK

Non son riuscito a far partire la test suite su centos7, ma non sono sicuro sia una piattaforma supportata, quindi per il momento lascio perdere. Ad ogni modo il problema si riproduce con Magics di tutte le versioni, ora cerco di fare un codice minimo per riprodurlo

spanezz commented 2 years ago

Ho riprodotto l'abort con issue82.zip

Chi conosce meglio Magics di me può provare a vedere che problemi possono esserci tra quel grib e quello shapefile?

Al momento faccio self.skipTest("This currently makes Magics error out, see #82"). Il test non richiede che lo shapefile e il grib abbiano caratteristiche particolari: sta testando solo che lo shapefile indicato dal flavour venga effettivamente usato, per cui una volta capito il problema c'è molta libertà nella scelta di un workaround.

Lascierei questo issue aperto, anche a bassa priorità, finché non troviamo un modo di riattivare quel test.

Intanto, la test suite arriva in fondo senza abort di Magics

spanezz commented 2 years ago

Ho iniziato a semplificare/ripulire quel file di test, e visto che sono test che non hanno in realtà bisogno di Magics perché guardano solo a come i flavour trasformano le ricette, ho riorganizzato tutti quei test per non fare rendering, e quindi non usare Magics.

Ora tutti i test passano e non serve piú saltarne. Al momento lascio aperta l'issue casomai a qualcuno interessi investigare sull'abort di Magics. Altrimenti, chiudete pure

brancomat commented 2 years ago

Ho riprodotto l'abort con issue82.zip

Chi conosce meglio Magics di me può provare a vedere che problemi possono esserci tra quel grib e quello shapefile?

Grazie per la segnalazione e per il test case precotto.

Ho fatto un po' di prove, questi gli esiti:

A questo punto chiuderei issue nel senso che una mgrib senza una mcont rappresenta un po' un caso al limite del laboratoristico nell'uso di magics (non ho trovato menzioni specifiche ma anche nel loro tutorial mgrib e mcont vengono introdotte contemporaneamente)