# Segmentation fault of running ptfire3d

**URL:** <https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514>\
**Category:** SMOKE\
**Created:** [July 16, 2021, 8:08pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514 "2021-07-16T20:08:44Z")\
**Posts on this page:** 12\
**Page:** 4

<div class="post-metadata">

**Author:** ![Jsward](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@Jsward](https://forum.cmascenter.org/u/Jsward)\
**Post date:** [March 4, 2022, 3:18pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/63 "2022-03-04T15:18:05Z")

</div>

Thanks for the info. Both Temoral and Smkreport are Version SMOKEv4.8\_Oct2020

---

<div class="post-metadata">

**Author:** ![Jsward](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@Jsward](https://forum.cmascenter.org/u/Jsward)\
**Post date:** [March 4, 2022, 8:32pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/64 "2022-03-04T20:32:22Z")

</div>

After getting similar errors when trying to run the `ptegu` sector, I decided to compile SMOKEv4.7, which required both [this post](https://forum.cmascenter.org/t/error-when-compile-smokev4-7/1155/2) and [this post](https://forum.cmascenter.org/t/compiling-smokev4-7/2140/6) to successfully compile on my system. With v4.7 both the `ptegu` and `ptertac` sectors finished successfully. Thanks!

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [May 22, 2023, 6:57pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/65 "2023-05-22T18:57:14Z")

</div>

Hi @bbaek

I have a similar issue. I did try your suggestions, but still getting the same error. Please see my errors here [Source: Too many arguments, While Running Daily PTNONIPM Script 2016V3 - #16 by Iqbal](https://forum.cmascenter.org/t/source-too-many-arguments-while-running-daily-ptnonipm-script-2016v3/4129/16)

Would you please look at it? and provide any suggestions.

Thanks in advance

---

<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:** [May 22, 2023, 7:14pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/66 "2023-05-22T19:14:51Z")

</div>

It seems you need to make sure you are using tcsh. On EPA’s system /bin/csh is linked to tcsh.

Removing REPCONFIG\_TEMP from the run script should fix your new issue.

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [May 22, 2023, 7:55pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/67 "2023-05-22T19:55:38Z")

</div>

Hi @eyth.alison@lizadams@bbaek

So, after commenting out REPCONFIG\_TEMP, looks like daily scripts ran successfully (but with an error of ILLEGAL VARIABLE name ERROR: running m3stat\_chk for 20160101]. The script only creates 1 output file only.

Pleas see the terminal output (last part):

> 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  
> key.
> 
> ```
> at time 0:00:00
> at time 1:00:00
> at time 2:00:00
> at time 3:00:00
> at time 4:00:00
> at time 5:00:00
> at time 6:00:00
> at time 7:00:00
> at time 8:00:00
> at time 9:00:00
> at time 10:00:00
> at time 11:00:00
> at time 12:00:00
> at time 13:00:00
> at time 14:00:00
> at time 15:00:00
> at time 16:00:00
> at time 17:00:00
> at time 18:00:00
> at time 19:00:00
> at time 20:00:00
> at time 21:00:00
> at time 22:00:00
> at time 23:00:00
> at time 0:00:00
> 
> ```
> 
> 3.030u 0.094s 0:03.12 100.0% 0+0k 0+20240io 0pf+0w  
> now checking log file /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/smkmerge\_ptnonipm\_jan\_2023gf\_16j\_20160101\_12US2\_WC\_cmaq\_cb6ae7.log  
> Now running M3STAT  
> Illegal variable name.  
> ERROR: running m3stat\_chk for 20160101  
> log analyzer  
> Getting message data (might take some time)…  
> grep: /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs: Is a directory  
> grep: /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs: Is a directory  
> Finished getting data  
> Classifying message types…  
> Total number of known messages: 58  
> Total number of unknown messages: 0  
> Level 3 analysis…  
> Finished classifying message types  
> log analyzer  
> Getting message data (might take some time)…  
> grep: /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs: Is a directory  
> grep: /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs: Is a directory  
> Finished getting data  
> Classifying message types…  
> Total number of known messages: 58  
> Total number of unknown messages: 0  
> Level 1 analysis…  
> Finished classifying message types  
> Testing for exit priority \<= 1  
> All message priorities \> 1

Then I looked at the smoke\_out folder, where I can see only one output file “inln\_mole\_ptnonipm\_20160101\_12US2\_WC\_cmaq\_cb6ae7\_2023gf\_16j.ncf”.

Then I looked at the level 1 and level 3 errors from log\_analyzer:

> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_onetime\_level3.csv:3,‘Value for SMK\_MAXERROR:’,156,‘Value for SMK\_MAXERROR: 10000’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/smkinven\_ptnonipm\_2023gf\_16j.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_onetime\_level3.csv:3,‘Value for SMK\_MAXERROR:’,368,‘Value for SMK\_MAXERROR: 10000’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/spcmat\_ptnonipm\_2023gf\_16j\_cmaq\_cb6ae7.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_onetime\_level3.csv:3,‘Value for DEFAULT\_CONV\_FAC\_ERROR: ._',370,‘Value for DEFAULT\_CONV\_FAC\_ERROR: Y returning TRUE’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/spcmat\_ptnonipm\_2023gf\_16j\_cmaq\_cb6ae7.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_onetime\_level1.csv:3,True,2,‘Value for SMK\_MAXERROR:’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/smkinven\_ptnonipm\_2023gf\_16j.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_onetime\_level1.csv:3,True,1,'Value for DEFAULT\_CONV\_FAC\_ERROR: ._’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/spcmat\_ptnonipm\_2023gf\_16j\_cmaq\_cb6ae7.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_byday\_level1.csv:3,True,3,‘Value for SMK\_MAXERROR:’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/temporal\_ptnonipm\_jan\_2023gf\_16j\_20160101.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_byday\_level1.csv:3,True,1,‘Value for DEFAULT\_CONV\_FAC\_ERROR: ._',/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/spcmat\_ptnonipm\_2023gf\_16j\_cmaq\_cb6ae7.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_byday\_level3.csv:3,‘Value for SMK\_MAXERROR:’,328,‘Value for SMK\_MAXERROR: 10000’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/temporal\_ptnonipm\_jan\_2023gf\_16j\_20160101.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_byday\_level3.csv:3,‘Value for SMK\_MAXERROR:’,156,‘Value for SMK\_MAXERROR: 10000’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/smkinven\_ptnonipm\_2023gf\_16j.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_byday\_level3.csv:3,‘Value for SMK\_MAXERROR:’,368,‘Value for SMK\_MAXERROR: 10000’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/spcmat\_ptnonipm\_2023gf\_16j\_cmaq\_cb6ae7.log  
> ./rep\_logs\_ptnonipm\_2023gf\_16j\_12US2\_WC\_byday\_level3.csv:3,'Value for DEFAULT\_CONV\_FAC\_ERROR: ._’,370,‘Value for DEFAULT\_CONV\_FAC\_ERROR: Y returning TRUE’,/Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/spcmat\_ptnonipm\_2023gf\_16j\_cmaq\_cb6ae7.log

All the errors are either DEFUALT\_CONV\_FAC or SMK\_MAXERROR, and these can be ignored, Am I right?

If so, Why smoke\_out created only 1 output file?

Any suggestions would be greatly appreciated.

---

<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:** [May 23, 2023, 2:30pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/68 "2023-05-23T14:30:59Z")

</div>

We think this could be due to another type of anomaly related to csh on your system.

M3stat is used for some error checking.

However, its failing is keeping the rest of the script/ year from running.

We recommend you turn m3stat off via the run\_settings.txt file:

ptnonipm, 12US1, m3stat, ALL, 0, 0, N

If you are running a domain other than 12US1, put your domain name there in place of 12US1

[Noting this may impact other sectors that you run, if any].

Please let us know if this allows the script to run to completion.

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [May 23, 2023, 3:01pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/69 "2023-05-23T15:01:04Z")

</div>

Hi @eyth.alison

Using the run\_settings.txt

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/e/e034a0a28eba80e0a9fd4a850b89eebe66c8223e.png)

I am still getting same error. I checked /intermed/ptnonipm/log to see if SMOKE programs ran successfully. All the programs (smkinven, spcmat, grdmat, smkreport,elevpoint, temporal, and smkmerge) ran successfully.

Here is the terminal output which is showing mtstat error (last part):

> ```
> at time 21:00:00
> 
> ```

```
    at time 22:00:00
    at time 23:00:00
    at time 0:00:00

```

2.559u 0.043s 0:02.64 98.1% 0+0k 0+20232io 0pf+0w  
SCRIPT NOTE: timetracker is replacing line 2 of the TIMELOG file  
now checking log file /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs/smkmerge\_ptnonipm\_jan\_2023gf\_16j\_20160101\_12US2\_WC\_cmaq\_cb6ae7.log  
Now running M3STAT  
Illegal variable name.  
ERROR: running m3stat\_chk for 20160101  
log analyzer  
Getting message data (might take some time)…  
grep: /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs: Is a directory  
grep: /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs: Is a directory  
Finished getting data  
Classifying message types…  
Total number of known messages: 65  
Total number of unknown messages: 0  
Level 3 analysis…  
Finished classifying message types  
log analyzer  
Getting message data (might take some time)…  
grep: /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs: Is a directory  
grep: /Air/emismod/2016/v3/EV\_TRIAL/2023gf\_16j/intermed/ptnonipm/logs: Is a directory  
Finished getting data  
Classifying message types…  
Total number of known messages: 65  
Total number of unknown messages: 0  
Level 1 analysis…  
Finished classifying message types  
Testing for exit priority \<= 1  
All message priorities \> 1

_NOTE:_

I added ‘source’ command before the last line ($RUNSCRIPTS \*\*) of the ‘daily’ script.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/f/fa541f8808eb26a06c3c03f889af11a3aef0d440.png)

without ‘source’ command ‘daily’ script does not run. It gives following error

/bin/ls: No match.  
source: Too many arguments.

---

<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:** [May 23, 2023, 3:25pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/70 "2023-05-23T15:25:44Z")

</div>

We suggest changing run settings grid to 12US2\_WC

Also, just double checking – is this for ptnonipm or ptfire?

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [May 23, 2023, 3:42pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/71 "2023-05-23T15:42:13Z")

</div>

Hi @eyth.alison

Changing run settings grid didn’t solve the issue. I used following run\_settings

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/8/8ab55711d0e6b89e182b5f9495ed071d441cc015.png)

This is ‘ptnonipm’ run.

The initial problem was ‘too many arguments’,

> [@Source: Too many arguments, While Running Daily PTNONIPM Script 2016V3](https://forum.cmascenter.org/t/source-too-many-arguments-while-running-daily-ptnonipm-script-2016v3/4129/16):
>
> Hello @eyth.alison@lizadams I tried changing the shebang line to #!/usr/bin/tcsh And modified terminal to tcsh, Looks like it’s running. I don’t see “too many arguments” error anymore. But I am seeing error in /intermed/. In the script , I modified following to get rid of smkreport error ( [https://forum.cmascenter.org/t/error-abort-in-subroutine-formlist/4127/8?u=iqbal](https://forum.cmascenter.org/t/error-abort-in-subroutine-formlist/4127/8)) Use the same REPCONFIG\_INV as the canada\_ag sector Remove REPCONFIG\_INV3 from the ptnonipm run script In the terminal,…

---

<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:** [May 23, 2023, 4:05pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/72 "2023-05-23T16:05:37Z")

</div>

OK – we are unsure why the m3stat is still running.

Try changing the m3state script to use /bin/tcsh in the m3stat script, since that’s the script that is failing here:

INSTALL\_DIR/smoke4.9/scripts/run/m3stat\_chk\_v6.csh

If that doesn’t work, edit INSTALL\_DIR/smoke4.9/scripts/emf/smk\_pt\_annual\_byday\_emf.csh and set run\_m3stat = N.

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [May 23, 2023, 5:16pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/73 "2023-05-23T17:16:23Z")

</div>

Hi @eyth.alison ,

Success!  
Changing m3stat script to /usr/bin/tcsh solves the issue. Now , ptnonipm script is running without any problems.

To get smoke\_out file for EACH DAY:

I modified L\_TYPE and M\_TYPE to ‘all’ , removed setenv MRG\_BYDAY “P” line, and

modified this line  
$RUNSCRIPTS/emf/smk\_pt\_annual\_byday\_emf.csh $REGION\_ABBREV $REGION\_IOAPI\_GRIDNAME -m “$RUN\_MONTHS” $SPINUP\_DURATION byday

with this:

$RUNSCRIPTS/emf/smk\_pt\_daily\_emf.csh $REGION\_ABBREV $REGION\_IOAPI\_GRIDNAME -m “$RUN\_MONTHS” $SPINUP\_DURATION daily

and replaced ‘mwdss\_Y’ to ‘all’ in the SECTORLIST file.

Are these correct modifications?

Thanks

---

<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:** [May 23, 2023, 5:42pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/74 "2023-05-23T17:42:11Z")

</div>

Your changes will work to produce emissions every day. The 2016 platform uses representative days because the emissions will not vary for every day of the month.

This is described in the 2016v3 TSD. We are not sure if you expect different emission values each day using your own input data.

FYI, if you don’t have custom day of month profiles and are using the ones that came with 2016v2 platform, a more efficient approach is to only change M\_TYPE to ‘all’ and the SECTORLIST to ‘all’, and kept everything else (L\_TYPE, MRG\_BYDAY, and the annual\_byday run script) the same as before. Then, Temporal would still only run for representative days instead of daily (which is all that is needed from a temporalization perspective), but Smkmerge would run daily and create daily emissions.

[Previous page](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514.md?page=3)
