Hi, I am running SMOKE5.1. No problem for inventory input, temporal allocation and chemical speciation, but SMOKE crashed in the spatial allocation step using grdmat. Could you please advise how to solve this problem? Thanks!
Here is the error message:
grdmat: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)’ failed.
Aborted (core dumped)
*** Error running grdmat ***
No error message in the log file. Here is the last part of the log file:
File “SRGPRO_PATH” opened for input on unit: 94
/home/juz001/hall5/SWAPIT_road_salt/SRG/CA_884_NOFILL.txt
Value for GRIDDESC: '/fs/site5/eccc/aq/r1/juz001/SWAPIT_road_salt//SMOKE/ge_dat/GRIDDESC'
Value for GRIDDESC: '/fs/site5/eccc/aq/r1/juz001/SWAPIT_road_salt//SMOKE/ge_dat/GRIDDESC'
File "GRIDDESC" opened for input on unit: 94
/fs/site5/eccc/aq/r1/juz001/SWAPIT_road_salt//SMOKE/ge_dat/GRIDDESC
Value for IOAPI_GRIDNAME_1: 'PanAm2_5_500x500'
Value for IOAPI_GRIDNAME_1: 'PanAm2_5_500x500'
File "GRIDDESC" opened for input on unit: 94
/fs/site5/eccc/aq/r1/juz001/SWAPIT_road_salt//SMOKE/ge_dat/GRIDDESC
NOTE: Output grid "PanAm2_5_500x500" set; described as
No description available
Computing gridding matrix size...
File "SRGPRO_PATH" opened for input on unit: 94
/home/juz001/hall5/SWAPIT_road_salt/SRG/CA_880_NOFILL.txt
Reading surrogate 880 to define the size of gridding matrix
File "SRGPRO_PATH" opened for input on unit: 94
/home/juz001/hall5/SWAPIT_road_salt/SRG/CA_880_NOFILL.txt
File "SRGPRO_PATH" opened for input on unit: 94
/home/juz001/hall5/SWAPIT_road_salt/SRG/CA_881_NOFILL.txt
Reading surrogate 881 to define the size of gridding matrix
File "SRGPRO_PATH" opened for input on unit: 94
/home/juz001/hall5/SWAPIT_road_salt/SRG/CA_881_NOFILL.txt
File "SRGPRO_PATH" opened for input on unit: 94
/home/juz001/hall5/SWAPIT_road_salt/SRG/CA_882_NOFILL.txt
Reading surrogate 882 to define the size of gridding matrix
(END)
It would be very useful to know just which malloc
-call (which will have been called by which Fortran ALLOCATE
) is responsible for this crash.
As has been stated repeatedly on this Forum: Please build this program using the appropriate one of the I/O API debug/traceback BIN
-types
AIXdbg
IRIX64dbg
IRIX6n32dbg
Linux2_alphadbg
Linux2_ia64dbg
Linux2_ia64ifortdbg
Linux2_x86_64af95_dbg
Linux2_x86_64af95dbg
Linux2_x86_64aoccflangdbg
Linux2_x86_64dbg
Linux2_x86_64g95dbg
Linux2_x86_64gfort10_mediumdbg
Linux2_x86_64gfort10dbg
Linux2_x86_64gfort_mediumdbg
Linux2_x86_64gfortdbg
Linux2_x86_64ifort_mediumdbg
Linux2_x86_64ifortdbg
Linux2_x86_64ifortmpidbg
Linux2_x86_64ifx_mediumdbg
Linux2_x86_64ifxdbg
Linux2_x86_64ifxmpidbg
Linux2_x86_64llvmflangdbg
Linux2_x86_64nvfort_mediumdbg
Linux2_x86_64nvfortdbg
Linux2_x86_64of95dbg
Linux2_x86_64pathdbg
Linux2_x86_64pgdbg
Linux2_x86_64sundbg
Linux2_x86af95_dbg
Linux2_x86af95dbg
Linux2_x86dbg
Linux2_x86g95dbg
Linux2_x86sundbg
SunOS5dbg
and re-run it, in order to find the subroutine, file-name, and line-number that caused this crash.
Note that the standard SMOKE scripts will need a bit of tweaking in order to make this run work (they tend to force the running of a particular $BIN
at the very start, violating the software engineering principles of late binding and locality).
Thanks for the quick response! I am using the Precompiled Executables downloaded from the SMOKE website.
Below is surrogate 882. It is for the City of Toronto, Canada.
#DATE = Thu Feb 20 14:48:18 UTC 2025
882 124024 244 249 0.01142096 ! 2.063741 180.697732 0.011421
882 124024 245 249 0.07263160 ! 13.124366 180.697732 0.084053
882 124024 246 249 0.01254297 ! 2.266486 180.697732 0.096596
882 124024 243 250 0.04549677 ! 8.221163 180.697732 0.142092
882 124024 244 250 0.07937082 ! 14.342126 180.697732 0.221463
882 124024 245 250 0.19011396 ! 34.353161 180.697732 0.411577
882 124024 246 250 0.00212549 ! 0.384071 180.697732 0.413703
882 124024 243 251 0.00000422 ! 0.000763 180.697732 0.413707
882 124024 244 251 0.09047538 ! 16.348695 180.697732 0.504182
882 124024 245 251 0.09905181 ! 17.898437 180.697732 0.603234
882 124024 246 251 0.05682488 ! 10.268126 180.697732 0.660059
882 124024 245 252 0.08474982 ! 15.314101 180.697732 0.744809
882 124024 246 252 0.15534048 ! 28.069673 180.697732 0.900149
882 124024 247 252 0.03148762 ! 5.689741 180.697732 0.931637
882 124024 245 253 0.00264353 ! 0.477679 180.697732 0.934280
882 124024 246 253 0.06571971 ! 11.875402 180.697732 1.000000
882 124001 244 246 0.01627838 ! 0.010741 0.659807 0.016278
882 124001 245 247 0.19858833 ! 0.131030 0.659807 0.214867
882 124001 246 247 0.08227503 ! 0.054286 0.659807 0.297142
882 124001 246 248 0.11250054 ! 0.074229 0.659807 0.409642
882 124001 247 249 0.01373439 ! 0.009062 0.659807 0.423377
882 124001 248 249 0.06540197 ! 0.043153 0.659807 0.488779
882 124001 249 249 0.05094045 ! 0.033611 0.659807 0.539719
882 124001 249 250 0.22739123 ! 0.150034 0.659807 0.767110
882 124001 249 251 0.00094702 ! 0.000625 0.659807 0.768057
882 124001 248 252 0.07825191 ! 0.051631 0.659807 0.846309
882 124001 249 253 0.06053810 ! 0.039943 0.659807 0.906847
882 124001 247 255 0.03141235 ! 0.020726 0.659807 0.938260
882 124001 248 255 0.06174031 ! 0.040737 0.659807 1.000000
882 124011 250 256 0.00899579 ! 2.272429 252.610146 0.008996
882 124011 251 256 0.03175512 ! 8.021664 252.610146 0.040751
882 124011 252 256 0.01503707 ! 3.798516 252.610146 0.055788
882 124011 248 257 0.01703510 ! 4.303239 252.610146 0.072823
882 124011 249 257 0.04181288 ! 10.562358 252.610146 0.114636
882 124011 250 257 0.06483581 ! 16.378183 252.610146 0.179472
882 124011 251 257 0.05617917 ! 14.191428 252.610146 0.235651
882 124011 252 257 0.04382897 ! 11.071641 252.610146 0.279480
882 124011 247 258 0.00826203 ! 2.087072 252.610146 0.287742
882 124011 248 258 0.11617055 ! 29.345859 252.610146 0.403912
882 124011 249 258 0.04738086 ! 11.968887 252.610146 0.451293
882 124011 250 258 0.06001531 ! 15.160475 252.610146 0.511309
882 124011 251 258 0.01199337 ! 3.029647 252.610146 0.523302
882 124011 252 258 0.06714214 ! 16.960787 252.610146 0.590444
882 124011 253 258 0.00966930 ! 2.442564 252.610146 0.600113
882 124011 248 259 0.03831359 ! 9.678401 252.610146 0.638427
882 124011 249 259 0.08711541 ! 22.006237 252.610146 0.725542
882 124011 250 259 0.07672293 ! 19.380991 252.610146 0.802265
882 124011 251 259 0.07991120 ! 20.186379 252.610146 0.882177
882 124011 252 259 0.05850031 ! 14.777771 252.610146 0.940677
882 124011 253 259 0.02709660 ! 6.844877 252.610146 0.967773
882 124011 249 260 0.00756105 ! 1.909998 252.610146 0.975335
882 124011 251 260 0.00153936 ! 0.388857 252.610146 0.976874
882 124011 252 260 0.00256674 ! 0.648384 252.610146 0.979441
882 124011 253 260 0.00030662 ! 0.077456 252.610146 0.979747
882 124011 250 261 0.00735915 ! 1.858995 252.610146 0.987106
882 124011 251 261 0.01289359 ! 3.257052 252.610146 1.000000
882 124013 250 250 0.00359749 ! 0.327548 91.048933 0.003597
882 124013 249 251 0.13163155 ! 11.984913 91.048933 0.135229
882 124013 250 251 0.02678318 ! 2.438580 91.048933 0.162012
882 124013 248 252 0.02639228 ! 2.402989 91.048933 0.188405
882 124013 249 252 0.14415111 ! 13.124804 91.048933 0.332556
882 124013 250 252 0.24270922 ! 22.098416 91.048933 0.575265
882 124013 251 252 0.04707006 ! 4.285679 91.048933 0.622335
882 124013 249 253 0.13631254 ! 12.411111 91.048933 0.758647
882 124013 250 253 0.13236419 ! 12.051618 91.048933 0.891012
882 124013 251 253 0.00874877 ! 0.796566 91.048933 0.899760
882 124013 249 254 0.06422712 ! 5.847811 91.048933 0.963988
882 124013 250 254 0.03601248 ! 3.278898 91.048933 1.000000
882 124025 245 245 0.01575875 ! 3.293681 209.006450 0.015759
882 124025 246 245 0.00257951 ! 0.539135 209.006450 0.018338
882 124025 243 246 0.02325319 ! 4.860067 209.006450 0.041591
882 124025 244 246 0.03651956 ! 7.632824 209.006450 0.078111
882 124025 245 246 0.05973498 ! 12.484995 209.006450 0.137846
882 124025 246 246 0.04626627 ! 9.669948 209.006450 0.184112
882 124025 242 247 0.01264209 ! 2.642278 209.006450 0.196754
882 124025 243 247 0.08624922 ! 18.026643 209.006450 0.283004
882 124025 244 247 0.04511667 ! 9.429676 209.006450 0.328120
882 124025 245 247 0.06616492 ! 13.828895 209.006450 0.394285
882 124025 246 247 0.06818075 ! 14.250217 209.006450 0.462466
882 124025 242 248 0.00244519 ! 0.511060 209.006450 0.464911
882 124025 243 248 0.07174991 ! 14.996193 209.006450 0.536661
882 124025 244 248 0.09881591 ! 20.653163 209.006450 0.635477
882 124025 245 248 0.12845427 ! 26.847771 209.006450 0.763931
882 124025 246 248 0.05824060 ! 12.172660 209.006450 0.822172
882 124025 242 249 0.00057439 ! 0.120052 209.006450 0.822746
882 124025 243 249 0.06350156 ! 13.272236 209.006450 0.886248
882 124025 244 249 0.08701325 ! 18.186330 209.006450 0.973261
882 124025 245 249 0.00497190 ! 1.039160 209.006450 0.978233
882 124025 243 250 0.00556287 ! 1.162675 209.006450 0.983796
882 124025 244 250 0.01620425 ! 3.386792 209.006450 1.000000
882 124012 250 253 0.00623727 ! 1.177095 188.719674 0.006237
882 124012 251 253 0.00151685 ! 0.286259 188.719674 0.007754
882 124012 249 254 0.01782471 ! 3.363873 188.719674 0.025579
882 124012 250 254 0.07153357 ! 13.499792 188.719674 0.097112
882 124012 251 254 0.00507854 ! 0.958420 188.719674 0.102191
882 124012 248 255 0.00860518 ! 1.623966 188.719674 0.110796
882 124012 249 255 0.08344942 ! 15.748546 188.719674 0.194246
882 124012 250 255 0.05533253 ! 10.442337 188.719674 0.249578
882 124012 251 255 0.01495836 ! 2.822937 188.719674 0.264536
882 124012 247 256 0.02798616 ! 5.281539 188.719674 0.292523
882 124012 248 256 0.06021379 ! 11.363527 188.719674 0.352736
882 124012 249 256 0.15137590 ! 28.567611 188.719674 0.504112
882 124012 250 256 0.05362542 ! 10.120172 188.719674 0.557738
882 124012 251 256 0.02175318 ! 4.105253 188.719674 0.579491
882 124012 252 256 0.00004853 ! 0.009158 188.719674 0.579539
882 124012 246 257 0.01030998 ! 1.945696 188.719674 0.589849
882 124012 247 257 0.18780438 ! 35.442381 188.719674 0.777654
882 124012 248 257 0.08201802 ! 15.478415 188.719674 0.859672
882 124012 249 257 0.04667212 ! 8.807948 188.719674 0.906344
882 124012 250 257 0.01800394 ! 3.397698 188.719674 0.924348
882 124012 247 258 0.05884968 ! 11.106092 188.719674 0.983198
882 124012 248 258 0.01680249 ! 3.170960 188.719674 1.000000
882 124021 241 248 0.00720658 ! 1.976642 274.282959 0.007207
882 124021 242 248 0.01849353 ! 5.072460 274.282959 0.025700
882 124021 243 248 0.01695179 ! 4.649587 274.282959 0.042652
882 124021 240 249 0.02119706 ! 5.813993 274.282959 0.063849
882 124021 241 249 0.04929106 ! 13.519699 274.282959 0.113140
882 124021 242 249 0.07657886 ! 21.004276 274.282959 0.189719
882 124021 243 249 0.00162193 ! 0.444869 274.282959 0.191341
882 124021 239 250 0.00803425 ! 2.203658 274.282959 0.199375
882 124021 240 250 0.08424568 ! 23.107155 274.282959 0.283621
882 124021 241 250 0.08855144 ! 24.288151 274.282959 0.372172
882 124021 242 250 0.11865190 ! 32.544194 274.282959 0.490824
882 124021 243 250 0.02589845 ! 7.103502 274.282959 0.516723
882 124021 240 251 0.03970221 ! 10.889639 274.282959 0.556425
882 124021 241 251 0.09471580 ! 25.978930 274.282959 0.651141
882 124021 242 251 0.07449360 ! 20.432325 274.282959 0.725634
882 124021 243 251 0.04956380 ! 13.594506 274.282959 0.775198
882 124021 241 252 0.04464104 ! 12.244276 274.282959 0.819839
882 124021 242 252 0.06388271 ! 17.521938 274.282959 0.883722
882 124021 243 252 0.07689379 ! 21.090657 274.282959 0.960615
882 124021 242 253 0.01999889 ! 5.485354 274.282959 0.980614
882 124021 243 253 0.01938562 ! 5.317146 274.282959 1.000000
882 124022 243 251 0.03355623 ! 7.341985 218.796498 0.033556
882 124022 244 251 0.04508564 ! 9.864580 218.796498 0.078642
882 124022 243 252 0.03457868 ! 7.565694 218.796498 0.113221
882 124022 244 252 0.04608025 ! 10.082198 218.796498 0.159301
882 124022 245 252 0.00734160 ! 1.606316 218.796498 0.166642
882 124022 243 253 0.07607696 ! 16.645372 218.796498 0.242719
882 124022 244 253 0.04100789 ! 8.972382 218.796498 0.283727
882 124022 245 253 0.03858108 ! 8.441406 218.796498 0.322308
882 124022 243 254 0.03101680 ! 6.786368 218.796498 0.353325
882 124022 244 254 0.06250724 ! 13.676366 218.796498 0.415832
882 124022 245 254 0.11752906 ! 25.714947 218.796498 0.533361
882 124022 246 254 0.00861149 ! 1.884164 218.796498 0.541973
882 124022 244 255 0.03928373 ! 8.595142 218.796498 0.581257
882 124022 245 255 0.08264784 ! 18.083058 218.796498 0.663904
882 124022 246 255 0.05708484 ! 12.489963 218.796498 0.720989
882 124022 247 255 0.03680987 ! 8.053870 218.796498 0.757799
882 124022 245 256 0.03376844 ! 7.388416 218.796498 0.791568
882 124022 246 256 0.11467393 ! 25.090254 218.796498 0.906242
882 124022 247 256 0.07435550 ! 16.268723 218.796498 0.980597
882 124022 248 256 0.00036808 ! 0.080535 218.796498 0.980965
882 124022 246 257 0.01833235 ! 4.011055 218.796498 0.999298
882 124022 247 257 0.00070250 ! 0.153704 218.796498 1.000000
882 124015 245 248 0.02323387 ! 4.710902 202.760127 0.023234
882 124015 246 248 0.09139503 ! 18.531267 202.760127 0.114629
882 124015 247 248 0.00013985 ! 0.028355 202.760127 0.114769
882 124015 245 249 0.04542204 ! 9.209779 202.760127 0.160191
882 124015 246 249 0.13322167 ! 27.012042 202.760127 0.293412
882 124015 247 249 0.08277783 ! 16.784042 202.760127 0.376190
882 124015 248 249 0.00360448 ! 0.730846 202.760127 0.379795
882 124015 245 250 0.01145402 ! 2.322418 202.760127 0.391249
882 124015 246 250 0.14981452 ! 30.376412 202.760127 0.541063
882 124015 247 250 0.04745143 ! 9.621257 202.760127 0.588515
882 124015 245 251 0.00166757 ! 0.338116 202.760127 0.590182
882 124015 246 251 0.16309541 ! 33.069247 202.760127 0.753278
882 124015 247 251 0.16960730 ! 34.389597 202.760127 0.922885
882 124015 248 251 0.00373851 ! 0.758020 202.760127 0.926624
882 124015 246 252 0.00217247 ! 0.440489 202.760127 0.928796
882 124015 247 252 0.07120403 ! 14.437337 202.760127 1.000000
882 124014 247 249 0.02077802 ! 1.973115 94.961623 0.020778
882 124014 248 249 0.19442414 ! 18.462832 94.961623 0.215202
882 124014 249 249 0.00227475 ! 0.216014 94.961623 0.217477
882 124014 247 250 0.12640410 ! 12.003539 94.961623 0.343881
882 124014 248 250 0.19694745 ! 18.702450 94.961623 0.540828
882 124014 249 250 0.09707401 ! 9.218306 94.961623 0.637902
882 124014 247 251 0.00408575 ! 0.387989 94.961623 0.641988
882 124014 248 251 0.28705617 ! 27.259320 94.961623 0.929044
882 124014 249 251 0.00269273 ! 0.255706 94.961623 0.931737
882 124014 248 252 0.06826287 ! 6.482353 94.961623 1.000000
882 124023 246 252 0.00077500 ! 0.130858 168.848760 0.000775
882 124023 247 252 0.08601248 ! 14.523101 168.848760 0.086787
882 124023 248 252 0.05701290 ! 9.626558 168.848760 0.143800
882 124023 246 253 0.06127163 ! 10.345638 168.848760 0.205072
882 124023 247 253 0.10175409 ! 17.181052 168.848760 0.306826
882 124023 248 253 0.06010120 ! 10.148013 168.848760 0.366927
882 124023 249 253 0.03322459 ! 5.609932 168.848760 0.400152
882 124023 246 254 0.10317154 ! 17.420387 168.848760 0.503323
882 124023 247 254 0.09580796 ! 16.177055 168.848760 0.599131
882 124023 248 254 0.07423323 ! 12.534188 168.848760 0.673365
882 124023 249 254 0.03435112 ! 5.800145 168.848760 0.707716
882 124023 246 255 0.00984710 ! 1.662671 168.848760 0.717563
882 124023 247 255 0.12927693 ! 21.828250 168.848760 0.846840
882 124023 248 255 0.15118340 ! 25.527129 168.848760 0.998023
882 124023 249 255 0.00197682 ! 0.333783 168.848760 1.000000
Is that the complete surrogate file? It looks like it may be missing the grid definition header:
For example, the modeling platform 12 km surrogates begin with a line:
“#GRID us12k_516x444 -2952000.000000 -2772000.000000 12000.000000 12000.000000 516 444 1 LAMBERT meters 33.000000 45.000000 -97.000000 -97.000000 40.000000”
This is also consistent with where grdmat is failing at “define the size of gridding matrix”.
Just reran the script using “valgrind --leak-check=full --show-leak-kinds=all -s”, but didn’t find any memory problem. Here is the error message:
…
double free or corruption (out)
Aborted (core dumped)
*** Error running grdmat ***
…
==843070== 18,024 bytes in 178 blocks are still reachable in loss record 436 of 436
==843070== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==843070== by 0x163D02: ??? (in /usr/bin/bash)
==843070== by 0x16932E: ??? (in /usr/bin/bash)
==843070== by 0x155B36: execute_command_internal (in /usr/bin/bash)
==843070== by 0x158157: execute_command (in /usr/bin/bash)
==843070== by 0x14938A: reader_loop (in /usr/bin/bash)
==843070== by 0x13AC05: main (in /usr/bin/bash)
==843070==
==843070== LEAK SUMMARY:
==843070== definitely lost: 0 bytes in 0 blocks
==843070== indirectly lost: 0 bytes in 0 blocks
==843070== possibly lost: 0 bytes in 0 blocks
==843070== still reachable: 207,561 bytes in 1,765 blocks
==843070== suppressed: 0 bytes in 0 blocks
==843070==
==843070== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
I didn’t copy the grid definition header of surrogate 882. It is a rotated lat-lon grid. Here is the header:
#GRID PanAm2_5_500x500 -90.000000 35.000000 0.022500 0.022500 524 524 1 LAT-LON degrees 0.000000 0.000000 0.000000 0.000000 0.000000
#SRGDESC=882,Toronto Road Salt - Collector
Just a quick update, the error was gone after changing a machine. The results look reasonable. Thanks all for your help!
1 Like