Segmentation fault with SMOKE 5.3 smoke_example_case_v3/2022he_cb6_22m

Hello!

I am running SMOKE 5.3 and getting a runtime error when I try to run the nonpt sector script. I have run every other sector in the example case (point, onroad, all other nonpoint sectors) without runtime errors. This one seems to be related to the program artopnt.

I compiled SMOKE according to these instructions: B. Instructions for SMOKE Installation · CEMPD/SMOKE Wiki · GitHub and I am following instructions ot run the test case from here: GitHub - CEMPD/SMOKE-ExampleCase-v3 · GitHub

Here are the modules I am using for compiling both IOAPI 3.2 and SMOKE 5.3: gcc/8.5.0 netcdf-fortran/4.6.2 netcdf-c/4.9.3 hdf5/1.14.6 zlib/1.2.11 szip/2.1.1

These are the compiler flags I got from the compilation LOG file, specifically for the program procar2pt: gfortran -I/uufs/chpc.utah.edu/common/home/daq-group5/IOAPI3.2.gcc/ioapi/ fixed_src -I/uufs/chpc.utah.edu/common/home/daq-group5/SMOKE5.3/src/inc -I/uufs/chpc.utah.edu/common/home/daq-group5/IOAPI3.2.gcc/Linux2_x86_64dbg -g -Og -ffixed-line-length-132 -fbacktrace -fno-backslash -fcheck=all -Wall -Wsurprising -fbounds-check -finit-real=snan -m64 -g -std=legacy -fbacktrace -Wsurprising -fbounds-check -finit-real=snan -m64 -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DNEED_ARGS=1 -c /uufs/chpc.utah.edu/common/home/daq-group5/SMOKE5.3/src/smkinven/procar2pt.f

When I try to run Annual_nonpt_12US1_2022he_cb6_22m.csh (I did not change anything in this job script from the original test case file), I get this error:

At line 448 of file /uufs/chpc.utah.edu/common/home/daq-group5/SMOKE5.3/src/smkinven/procar2pt.f
Fortran runtime error: Index '1' of dimension 1 of array 'oldcmact' below lower bound of 30106

Error termination. Backtrace:
#0  0x14fd91232171 in ???
#1  0x14fd91232d19 in ???
#2  0x14fd912330fb in ???
#3  0x42ffeb in procar2pt_
        at /uufs/chpc.utah.edu/common/home/daq-group5/SMOKE5.3/src/smkinven/procar2pt.f:448
#4  0x403453 in adjustinv_
        at /uufs/chpc.utah.edu/common/home/daq-group5/SMOKE5.3/src/smkinven/adjustinv.f:80
#5  0x43640f in procinven_
        at /uufs/chpc.utah.edu/common/home/daq-group5/SMOKE5.3/src/smkinven/procinven.f:474
#6  0x48bcd8 in smkinven
        at /uufs/chpc.utah.edu/common/home/daq-group5/SMOKE5.3/src/smkinven/smkinven.f:280
#7  0x48dfdd in main
        at /uufs/chpc.utah.edu/common/home/daq-group5/SMOKE5.3/src/smkinven/smkinven.f:58

Hi Lexie,

Thanks for reporting the bug. I’ve create a SMOKE issue ticket to discuss this particular issue. This bug is an interesting one and was only replicated with SMOKE v5.3 compiled with specific compiler and compilation flags. This issue is not isolate to SMOKE v5.3 but exists pre-SMOKE v5.0, and may only be surfaced now under specific compilation configuration and running with specific emission modeling platform (SMOKE Example Case v3 in this case, which is a simplified version of EPA’s Emissions Modeling Platform 2022v2).

As described in the SMOKE issue ticket, fix for this issue is to implement explicit nullification at the beginning of the PROCAR2PT subroutine body in src/smkinven/procar2pt.f. We will commit this code fix along with other ongoing fixes to SMOKE github in the next couple weeks.

If you are not comfortable with implement the code fix by yourself, I’d suggest you to try compile SMOKE v5.3 with Intel OneAPI or AMD AOCC compiler and see if that’ll get you pass this crash.

Thanks,

Huy

Thank you so much for addressing this, Huy! The bug fix worked for me and the nonpt sector in the example case ran without errors this time. Much appreciated!