# Illegal instruction (core dumped) error

**URL:** <https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386>\
**Category:** Spatial Allocator\
**Created:** [March 23, 2020, 2:47pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386 "2020-03-23T14:47:38Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [March 23, 2020, 2:47pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/1 "2020-03-23T14:47:38Z")

</div>

Hi, I am new to SA tools. After I installed the software following the instruction, I tried to run the test case for TN. When running ‘generate\_surrogates.csh’, the program crashed with the following error. I turned on the ‘debug’ option, but didn’t get more useful information. Could you please me to figure out the problem? Thanks!

Hao

Writing surrogates to file /local/data/hhe/Spatial-Allocator/output/srg\_M08\_NASH.txt  
WARNING: Environment variable: MAX\_LINE\_SEG, not set  
Illegal instruction (core dumped)

GENERATING AIRPORT SURROGATE - category = 2  
Surrogate Creator Version 4.3, 01/20/2017

EV: OUTPUT\_FILE\_TYPE=RegularGrid  
Setting output grid

EV: OUTPUT\_FILE\_TYPE=RegularGrid  
Reading Regular Grid

EV: OUTPUT\_GRID\_NAME=M08\_NASH  
WARNING: Environment variable: MAX\_LINE\_SEG, not set  
MAX\_LINE\_SEG not set, discretization intervals disabled  
griddesc file name = /local/data/hhe/Spatial-Allocator/data/GRIDDESC.txt

Ellipsoid var = OUTPUT\_FILE\_ELLIPSOID  
EV: OUTPUT\_FILE\_ELLIPSOID=+a=6370000.0,+b=6370000.0  
Ellipsoid=+a=6370000.0,+b=6370000.0  
EV: OUTPUT\_GRID\_NAME=M08\_NASH  
Illegal instruction (core dumped)  
0.000u 0.015s 0:00.28 3.5% 0+0k 0+0io 0pf+0w  
Error generating surrogate for category 2  
ozone-nox{hhe}1094: ./generate\_surrogates.csh  
Writing surrogates to file /local/data/hhe/Spatial-Allocator/output/srg\_M08\_NASH.txt  
Illegal instruction (core dumped)

GENERATING AIRPORT SURROGATE - category = 2  
Surrogate Creator Version 4.3, 01/20/2017

EV: OUTPUT\_FILE\_TYPE=RegularGrid  
Setting output grid

EV: OUTPUT\_FILE\_TYPE=RegularGrid  
Reading Regular Grid

EV: OUTPUT\_GRID\_NAME=M08\_NASH  
EV: MAX\_LINE\_SEG=1000  
griddesc file name = /local/data/hhe/Spatial-Allocator/data/GRIDDESC.txt

Ellipsoid var = OUTPUT\_FILE\_ELLIPSOID  
EV: OUTPUT\_FILE\_ELLIPSOID=+a=6370000.0,+b=6370000.0  
Ellipsoid=+a=6370000.0,+b=6370000.0  
EV: OUTPUT\_GRID\_NAME=M08\_NASH  
Illegal instruction (core dumped)  
0.000u 0.013s 0:00.29 3.4% 0+0k 0+0io 0pf+0w  
Error generating surrogate for category 2

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [March 23, 2020, 2:50pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/2 "2020-03-23T14:50:40Z")

</div>

Since you are new at SA tool. I would like for you to use our new SA tool using postgreSQL/postGIS. The older version of SA tool could run into this segmentation fault due to the size of shapefiles as well as the size of memory required. Here is the information of new PG surrogate tool.

> **[CMASCenter/Spatial-Allocator](https://github.com/CMASCenter/Spatial-Allocator/tree/master/pg_srgtools)**
>
> Surrogate Tools, Raster Tools, and Vector Tools Open Source GIS - CMASCenter/Spatial-Allocator

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [March 27, 2020, 1:16am UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/3 "2020-03-27T01:16:16Z")

</div>

Thanks for your suggestion, and I will try it. Another question, in the shapefile\_catalogy.csv file, I found some data from emiss\_shp2003/2010/2014. Where can I download these shapefiles?

Hao

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [March 27, 2020, 3:35pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/4 "2020-03-27T15:35:56Z")

</div>

@eyth.alison. Can you point @haohe.umcp to the location of latest shapefiles? I sent you the package of latest shapefiles last week.

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [March 27, 2020, 3:49pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/5 "2020-03-27T15:49:32Z")

</div>

Here are 2011 platform shapefiles:  
ftp://newftp.epa.gov/air/emismod/2011/v3platform/spatial\_surrogates/shapefiles/

Here are 2016 platform shapefiles (similar to 2014):  
ftp://newftp.epa.gov/air/emismod/2016/alpha/spatial\_surrogates/shapefiles/

I don’t think we have the older 2003 version posted anywhere now…

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [March 27, 2020, 4:25pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/6 "2020-03-27T16:25:55Z")

</div>

Additional shapefiles are here [https://drive.google.com/drive/u/0/folders/1idGoi6I3GvKFCcf87O\_8zMirM7Gtd0\_E](https://drive.google.com/drive/u/0/folders/1idGoi6I3GvKFCcf87O_8zMirM7Gtd0_E)

![image001.jpg](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/64f616983d5e1c5697da3e3dc3eb37d7d031eebf.jpeg)

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [April 2, 2020, 3:35pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/7 "2020-04-02T15:35:47Z")

</div>

I have set up the postgreSQL/postGIS on our server. I followed all the steps without any error. But when running the ‘run\_pg\_srgcreate.csh’, the similar error showed again. What I should try next?

Run Date: Thu Apr 02 11:32:19 EDT 2020

```
            Main Control CSV File            

```

GENERATION CONTROL FILE ./surrogate\_generation\_pg.csv  
SURROGATE SPECIFICATION FILE ./surrogate\_specification\_pg.csv  
SHAPEFILE CATALOG ./shapefile\_catalog\_pg.csv  
SURROGATE CODE FILE ./surrogate\_codes.csv  
SHAPEFILE DIRECTORY …/data/emiss\_shp2010  
SRGCREATE EXECUTABLE …/bin/64bits/srgcreate.exe  
DEBUG\_OUTPUT Y  
OUTPUT\_FORMAT SMOKE  
OUTPUT\_FILE\_TYPE RegularGrid  
OUTPUT\_GRID\_NAME us12k\_444x336  
GRIDDESC ./GRIDDESC.txt  
OUTPUT\_FILE\_ELLIPSOID +a=6370000.0,+b=6370000.0  
OUTPUT DIRECTORY ./outputs/us12k\_444x336  
OUTPUT SURROGATE FILE ./outputs/agpro\_us12k.txt  
OUTPUT SRGDESC FILE ./outputs/srgdesc\_us12k.txt  
PGSCRIPT DIRECTORY ./pgscripts  
OVERWRITE OUTPUT FILES YES  
LOG FILE NAME ./LOGS/srg\_conus12k.log  
PG\_SERVER localhost  
PG\_USER pgsurg  
PGBIN /usr/bin  
SRID\_FINAL 900921  
DBNAME surrogates  
DENOMINATOR\_THRESHOLD 0.0005  
COMPUTE SURROGATES FROM SHAPEFILES NO  
COMPUTE SURROGATES YES  
MERGE SURROGATES NO  
GAPFILL SURROGATES NO

Warning: PGSCRIPT DIRECTORY is not needed in /local/data/hhe/Spatial-Allocator/pg\_srgtools/control\_variables\_pg.csv.  
Warning: PG\_SERVER is not needed in /local/data/hhe/Spatial-Allocator/pg\_srgtools/control\_variables\_pg.csv.  
Warning: PG\_USER is not needed in /local/data/hhe/Spatial-Allocator/pg\_srgtools/control\_variables\_pg.csv.  
Warning: PGBIN is not needed in /local/data/hhe/Spatial-Allocator/pg\_srgtools/control\_variables\_pg.csv.  
Warning: SRID\_FINAL is not needed in /local/data/hhe/Spatial-Allocator/pg\_srgtools/control\_variables\_pg.csv.  
Warning: DBNAME is not needed in /local/data/hhe/Spatial-Allocator/pg\_srgtools/control\_variables\_pg.csv.  
Warning: COMPUTE SURROGATES is not needed in /local/data/hhe/Spatial-Allocator/pg\_srgtools/control\_variables\_pg.csv.  
Get Grid Header For Surrogate Files  
SRGCREATE\_ERROR\>WARNING: Environment variable: MAX\_LINE\_SEG, not set  
SRGCREATE\_ERROR\>Illegal instruction (core dumped)  
ERROR IN RUNNING THE EXECUTABLE: SRGCREATE

Error: Getting Grid Header Failed, check grid description file.

End Date: Thu Apr 02 11:32:19 EDT 2020  
Elapsed time in minutes: 0.00585

ERROR – The Program Run Stopped

---

<div class="post-metadata">

**Author:** ![dyang](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@dyang](https://forum.cmascenter.org/u/dyang)\
**Post date:** [April 3, 2020, 2:44pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/8 "2020-04-03T14:44:05Z")

</div>

Make sure you use gov.epa.surrogate. **ppg.Main** package, not gov.epa.surrogate.SurrogateTool. gov.epa.surrogate.SurrogateTool package is used for gap filling and old surrogate tools.

---

<div class="post-metadata">

**Author:** ![haohe.umcp](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haohe.umcp](https://forum.cmascenter.org/u/haohe.umcp)\
**Post date:** [April 3, 2020, 7:01pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/9 "2020-04-03T19:01:40Z")

</div>

I commented out the second line:

#!/bin/csh -f

source pg\_setup.csh  
java -classpath ./SurrogateTools-2.1.jar gov.epa.surrogate.ppg.Main control\_variables\_pg.csv

#merge and gapfilling  
#java -classpath ./SurrogateTools-2.1.jar gov.epa.surrogate.SurrogateTool control\_variables\_pg.csv

But still got the error:

Run Date: Fri Apr 03 15:00:06 EDT 2020

```
            Main Control CSV File        

```

GENERATION CONTROL FILE ./surrogate\_generation\_pg.csv  
SURROGATE SPECIFICATION FILE ./surrogate\_specification\_pg.csv  
SHAPEFILE CATALOG ./shapefile\_catalog\_pg.csv  
SURROGATE CODE FILE ./surrogate\_codes.csv  
SHAPEFILE DIRECTORY …/data/emiss\_shp2010  
SRGCREATE EXECUTABLE …/bin/64bits/srgcreate.exe  
SRGMERGE EXECUTABLE Java  
DEBUG\_OUTPUT Y  
OUTPUT\_FORMAT SMOKE  
OUTPUT\_FILE\_TYPE RegularGrid  
OUTPUT\_GRID\_NAME us12k\_444x336  
GRIDDESC ./GRIDDESC.txt  
OUTPUT\_FILE\_ELLIPSOID +a=6370000.0,+b=6370000.0  
OUTPUT DIRECTORY ./outputs/us12k\_444x336  
OUTPUT SURROGATE FILE ./outputs/agpro\_us12k.txt  
OUTPUT SRGDESC FILE ./outputs/srgdesc\_us12k.txt  
PGSCRIPT DIRECTORY ./pgscripts  
OVERWRITE OUTPUT FILES YES  
LOG FILE NAME ./LOGS/srg\_conus12k.log  
PG\_SERVER localhost  
PG\_USER pgsurg  
PGBIN /usr/bin  
SRID\_FINAL 900921  
DBNAME surrogates  
DENOMINATOR\_THRESHOLD 0.0005  
COMPUTE SURROGATES FROM SHAPEFILES NO  
COMPUTE SURROGATES YES  
MERGE SURROGATES NO  
GAPFILL SURROGATES NO

```
            Get Grid Header For Surrogate Files

```

SRGCREATE\_ERROR\>WARNING: Environment variable: MAX\_LINE\_SEG, not set  
SRGCREATE\_ERROR\>Illegal instruction (core dumped)  
ERROR IN RUNNING THE EXECUTABLE: SRGCREATE

Error: Getting Grid Header Failed, check grid description file.

End Date: Fri Apr 03 15:00:07 EDT 2020  
Elapsed time in minutes: 0.010733333333333333

ERROR – The Program Run Stopped

---

<div class="post-metadata">

**Author:** ![gwangjin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/gwangjin/32/1336_2.png) [@gwangjin](https://forum.cmascenter.org/u/gwangjin)\
**Post date:** [February 25, 2021, 2:43am UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/10 "2021-02-25T02:43:55Z")

</div>

> [@haohe.umcp](#):
>
> hanks for your suggestion, and I will try it. Another question, in the shapefile\_catalogy.csv file, I found some data from emiss\_shp2003/2010/2014. Where can I download these shapefiles?

I found the link for emiss\_shp2003:

[https://drive.google.com/uc?id=0B4Gx-y00i4D0MGoyNHRKTFNMNHc&export=download](https://drive.google.com/uc?id=0B4Gx-y00i4D0MGoyNHRKTFNMNHc&export=download)

in the page ([https://www.cmascenter.org/download/software/spatial\_allocator/spatial\_allocator\_3-6.cfm?DB=TRUE](https://www.cmascenter.org/download/software/spatial_allocator/spatial_allocator_3-6.cfm?DB=TRUE))

But, pophu2k\_tnnc.shp was not contained in the link. The pophu2k\_tnnc is necessary for running srgtools.

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [February 26, 2021, 8:43pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/11 "2021-02-26T20:43:29Z")

</div>

I was out of town for a few days, so it took me a while to respond; sorry.

Recail that there are several different generations of Intel processors, each with its own instruction set: they keep adding new arithmetic instructions that are potentially faster, but are not backwards compatible (i.e., don’t run on previous-generation processors). For example, the AVX2 vector instructions introduced with Haswell-generation processors are potentially twice as fast as the previous-generation’s AVX vector instructions for the right kind of computations, which are again potentially twice as fast as the two-generations-before-that SSE4.2 instructions.

> [@haohe.umcp](#):
>
> Illegal instruction (core dumped)

This is what happens when you try to run a program that uses later-model instructions on an earlier-model processor. What generation of processor are you using (_cat /proc/cpuinfo_ will tell you that, in rather more detail than you probably want…), and what processor-generation was the program-executable compiled for? (how to determine this varies from compiler to compiler…)

---

<div class="post-metadata">

**Author:** ![shayamila.gamage](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@shayamila.gamage](https://forum.cmascenter.org/u/shayamila.gamage)\
**Post date:** [March 15, 2022, 8:42pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/12 "2022-03-15T20:42:51Z")

</div>

Hi, I found a lot of the shapefiles listed in the US\_SpatialSurrogate\_Workbook\_v093013 in [https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial\_surrogates/shapefiles/](https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial_surrogates/shapefiles/) and in [[Google Drive - Virus scan warning](https://drive.google.com/uc?id=0B4Gx-y00i4D0MGoyNHRKTFNMNHc&export=download) ]. However, I am missing the following shapefiles.  
state\_pophu02  
drycleaner\_surrogate  
drycleaner\_surrogate\_1\_29  
drycleaner\_surrogate\_30\_56  
exits  
gas\_station\_1\_29  
gas\_station\_30\_56  
gas\_station\_surrogate  
mjrrds  
Ports\_081412  
transterm  
us\_lw2k  
us\_oilgas.

Where can I find these files and is there one place where I can download all the shapefiles listed in the surrogate\_Specification script for either 2011/2014/2016 years? Any lead is appreciated.

Thanks,  
Sham

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [March 17, 2022, 7:00pm UTC](https://forum.cmascenter.org/t/illegal-instruction-core-dumped-error/1386/13 "2022-03-17T19:00:38Z")

</div>

We have located some of these files and posted them here:

[https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial\_surrogates/shapefiles/drycleaner\_shapefiles\_12oct2012.zip](https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial_surrogates/shapefiles/drycleaner_shapefiles_12oct2012.zip)

[https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial\_surrogates/shapefiles/gas\_station\_shapefiles\_12oct2012.zip](https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial_surrogates/shapefiles/gas_station_shapefiles_12oct2012.zip)

[https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial\_surrogates/shapefiles/surfzone\_poly\_st.zip](https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial_surrogates/shapefiles/surfzone_poly_st.zip)

[https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial\_surrogates/shapefiles/us\_l2wk\_shapefile\_16apr2009.zip](https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial_surrogates/shapefiles/us_l2wk_shapefile_16apr2009.zip)

[https://gaftp.epa.gov/air/emismod/2011/v3platform/spatial\_surrogates/shapefiles/US\_oilgas\_Ports032310\_Shapefiles.zip](https://gaftp.epa.gov/air/emismod/2011/v3platform/spatial_surrogates/shapefiles/US_oilgas_Ports032310_Shapefiles.zip)

[https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial\_surrogates/shapefiles/Ports\_081412\_shapefile\_01oct2012.zip](https://gaftp.epa.gov/Air/emismod/2011/v3platform/spatial_surrogates/shapefiles/Ports_081412_shapefile_01oct2012.zip)

We don’t have the state\_pophu02 (this is probably data circa 2002), exits, mjrrds, or transterm Shapefiles available.

You could substitute newer surrogates for this where needed.
