Segmentation Fault in laypoint (SMOKE v4.8.1)

Dear SMOKE users,
I am using SMOKEv4.8.1 (precompiled executables from the CMAS) to process point source, but keep running into this segmentation fault when LAYPOINT was started.

     Program LAYPOINT to take a SMOKE point source inventory file
     and dot- and cross-point meteorology files and construct a
     point source layer fractions matrix for all selected hours
     and an optional report of plume exceeding a user-defined
     layer number. The program uses a Briggs method that has been
     adapted for multiple layers. 
     You will need to enter the logical names for the input and
     output files (and to have set them prior to program start,
     using "setenv <logicalname> <pathname>").
     You may use END_OF-FILE (control-D) to quit the program
     during logical-name entry. Default responses are given in
     brackets [LIKE THIS] and can be accepted by hitting the
     <RETURN> key.
        at time 12:00:00
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source             
laypoint           000000000060ACBD  Unknown               Unknown  Unknown
libpthread-2.17.s  00002B5082A296D0  Unknown               Unknown  Unknown
laypoint           0000000000496C52  bmatvec_                  566  bmatvec.f
laypoint           0000000000409EA5  MAIN__                   1204  laypoint.f
laypoint           0000000000403E5E  Unknown               Unknown  Unknown       00002B5082E5C445  __libc_start_main     Unknown  Unknown
laypoint           0000000000403D69  Unknown               Unknown  Unknown

I have tried to increase the RAM and unlimited the stacksize , but the segmentation fault is still there.
The laypoint log was stoped here:

     "PLAY" opened as UNKNOWN(R-W)    
     File name "/gpfs/share/home/CTM/SMOKE/smoke4.8.1/data/run_sc_12km/scenario/play.point.2017001.b12.ncf"
     File type GRDDED3 
     Execution ID "????????????????"
     Grid name ""
     Dimensions: 3 rows, 1 cols, 13 lays, 1 vbles
     NetCDF ID:    327680  opened as READWRITE           
     Starting date and time  2017001:120000 (12:00:00  Jan. 01, 2017)
     Timestep                          010000 (1:00:00 hh:mm:ss)
     Maximum current record number         0
     Reading source data from inventory file...
     Value for IOAPI_ISPH:  '12'
     Value for IOAPI_ISPH:  '12'
     INITSPHERES:  input sphere WGS 84
     Determining elevated/plume-in-grid sources...
     NOTE: All non-PinG sources are potentially elevated
     NOTE: No PinG sources will be modeled
     Calculating hourly layer fractions...
     Processing Tuesday Jan. 01, 2017

Could you please advise how to solve this problem?


What grid are you running on?

It’s a 124*124 12km grid.

Does it means that a Linux2_x86_64ifort_medium version of SMOKE need to be compiled?

Can you please provide the full Grdmat and Laypoint logs, as well as the GRIDDESC? That would help us understand whether the grids and input files are configured properly.

It’s curious that the lot claims the seg-fault is happening at line 566 of “bmatvec.f”.
Which has only 559 lines…

There is a typo on the script calling mcip output files, after change that, the seg-fault was gone, but there is still a error on Grdmat.
Here is the error message of Grdmat

    NOTE: Grid settings initialized using c12           in  
          grid description file.
     NOTE: Output grid "c12" set; described as 
          No description available
     Value for IOAPI_ISPH:  '12'
     Value for IOAPI_ISPH:  '12'
     INITSPHERES:  input sphere WGS 84
     Value for IOAPI_GRIDNAME_1:  'c12'
     Value for IOAPI_GRIDNAME_1:  'c12'
     *** ERROR ABORT in subroutine GRDMAT
     No source-cell intersections found.

Normal Completion of program of smkinven, spcmat, temporal and laypoint are reported from their log file.

Best regards,

“no source-cell intersections found” means that there are no inventory sources within the modeling domain according to SMOKE. That’s most likely the reason for the Laypoint segmentation fault as well. Check the setting for WEST_HSPHERE - is it set to false / N? (This is a Smkinven parameter, so we can’t verify from the Grdmat/Laypoint logs.) We always set it to Y (except for hemispheric domains), but someone running for a domain in China, for example, will need to set it to N.

We suspect your grid is not properly characterized to SMOKE.

This means that there are no emissions that overlap your grid.

If you are not in Western hemisphere, you need to set the SMOKE flag to show that is the case.