# 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:** 20\
**Page:** 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:** [July 19, 2021, 8:07pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/22 "2021-07-19T20:07:40Z")

</div>

Thanks for sharing me the data promptly. Now I understand the issue of your Smrkreport run. It is not a bug in the code but current version of SMOKE Smkreport does not support to generate the temporal profile summary report for multiple pollutants at a single execution. If you see other than “1” value in the 2nd column in TSUP file, it means that pollutant-specific temporal profiles are assigned to your emission source(s). Since this is not an error, I would suggest to disable this Temporal summary report generation in your Smkreport by updating your “run\_setting.txt” input file located next to your “directory\_definition.csh” file.

Add the following command in your run\_setting.txt input file:  
all , $REGION\_ABBREV, smkreport, PART2, 0, 0, N

Sample:  
all , 36US1, smkreport, PART2, 0, 0, N  
all , 12US2, smkreport, PART2, 0, 0, N  
all , 12US1, smkreport, PART2, 0, 0, N

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 19, 2021, 8:19pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/23 "2021-07-19T20:19:45Z")

</div>

Thanks for your suggestion. I will try and let you know the result. Appreciate your valuable time and help.

Best,  
K

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 19, 2021, 8:53pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/24 "2021-07-19T20:53:38Z")

</div>

Hi Bbeak,

Update for the issue. I currently successfully run several sectors. And also got emission outputs from the SMOKE. Now I got a erroe when run the script:

log analyzer  
Getting message data (might take some time)…  
Finished getting data  
Classifying message types…  
Total number of known messages: 1194  
Total number of unknown messages: 0  
Level 3 analysis…  
Finished classifying message types  
log analyzer  
Getting message data (might take some time)…  
Finished getting data  
Classifying message types…  
Total number of known messages: 1194  
Total number of unknown messages: 0  
Level 1 analysis…  
Finished classifying message types  
Testing for exit priority \<= 1  
ERROR: At least one message’s priority is less than or equal to the exit priority: 1  
ERROR: Level 1 errors or Level 0 warnings found. Check log files, fix inputs, and rerun.

I check all log files but all show successful completed and emission output seems correct. I assume the program ran successfully but I am curious what this error message means? Is it related to the log analyzer? How to eliminate this error?

---

<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:** [July 20, 2021, 1:32am UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/25 "2021-07-20T01:32:51Z")

</div>

Yes, looks like your runs are successful. Those error messages are from log analyzer. Not quite sure how to address that until I see the actual message that triggered the exit priority 1. @eyth.alison can assist you on this matter better than I could.

---

<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:** [July 20, 2021, 3:10am UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/26 "2021-07-20T03:10:40Z")

</div>

If the log analyzer failed there is a level 1 problem in your log file that it detected.

Not sure if you’ve uploaded your std output or the log file for the program it stopped on?

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 20, 2021, 10:09pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/28 "2021-07-20T22:09:42Z")

</div>

I am running 2016 emission for July. I got log analyzer error when run the NP\_OILGAS. I got all log files (smkreport, smkmerge et al,.) successfully completed. model output is located under premerged/np\_oilgas directory but only has one day emission output, I assume there will be daily emission outputs for whole month so there could be something wrong.  
[np\_oilgas.log.txt](https://forum.cmascenter.org/uploads/short-url/mvF03Jpa003k6R1eTREG8jOwUIQ.txt) (21.2 KB)

I attached the log files here. Hope you could help me with this issue, 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:** [July 21, 2021, 3:08pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/29 "2021-07-21T15:08:31Z")

</div>

To see which is causing the log analyzer to fail, you need to review the information output from the log analyzer:

These output files are located in the reports/log\_analyzer/ directory.

You could provide that information or send us the messages in that file which have a value of 0 or 1.

You did provide the stdout which doesn’t list those messages.

We’ll note that different sectors have different treatment of representative days. It is correct for np\_oilgas to only have a single day of emissions output because the same data are used to represent the emissions throughout the month for np\_oilgas. Other sectors will have different results. The temporal settings are documented in the 2016v1 TSD – see the section on temporal profiles.

See [https://www.epa.gov/air-emissions-modeling/2016v1-platform](https://www.epa.gov/air-emissions-modeling/2016v1-platform) for a link to the TSD.

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 21, 2021, 3:14pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/30 "2021-07-21T15:14:19Z")

</div>

Thanks for your response. I attached the files in log\_analyzer directory to here. So it seems model runs well but got the analyzer issue for some reason.  
[rep\_logs\_np\_oilgas\_2016fh\_16j\_US\_12km\_all\_level1.csv](https://forum.cmascenter.org/uploads/short-url/1tpQqwWRib5NO3o0SKu7yVT2QTl.csv) (3.8 KB)  
[rep\_logs\_np\_oilgas\_2016fh\_16j\_US\_12km\_all\_level3.csv](https://forum.cmascenter.org/uploads/short-url/yBJrkWkeAMNqwKHqCaGjcQUAc3e.csv) (3.2 MB)

---

<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:** [July 21, 2021, 4:03pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/31 "2021-07-21T16:03:26Z")

</div>

We agree that the things in this log look OK. Not sure why the log analyzer is failing.

Did you visualize the processed emissions file that was produced to confirm it looks reasonable?

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 21, 2021, 5:26pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/32 "2021-07-21T17:26:40Z")

</div>

Yes I use ncview to check the output emission files and they looks normal and nothing weird in the spatial and temperal patterns. I assume the log-analyzer has error but doesn’t mean the simulation is wrong or interrupted. But I have no idea about the log-analyzer so I am wondering if it indecate the simulation has something wrong.

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 28, 2021, 10:58pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/33 "2021-07-28T22:58:25Z")

</div>

Hi cjcoats,

Thanks for reading. I had same error message (Floating-point exception - erroneous arithmetic operation.) when I try to run pfagfire3D. Error came as: Backtrace for this error:  
#0 0x2B378651B6D7  
#1 0x2B378651BD1E  
#2 0x2B3786D783FF  
#3 0x426A69 in fire\_preplm\_ at fire\_preplm.f:146 (discriminator 8)  
#4 0x415CFD in MAIN\_\_ at laypoint.f:1440

I check the fire\_preplm.f file at line 146. It is a process calculate the temperatures a full layers:  
DO L = 1, EMLAYS - 1  
DELZ = ZH( L+1 ) - ZH( L )  
TF( L ) = TV( L ) + ( TV( L+1 ) - TV( L ) ) \*  
& ( ZF( L ) - ZH( L ) ) / DELZ  
END DO

```
    DELZ = ZH( EMLAYS ) - ZH( EMLAYS-1 )
    TF( EMLAYS ) = TV( EMLAYS ) - (TV( EMLAYS-1 ) - TV( EMLAYS )) *
 & ( ZF( EMLAYS ) - ZH( EMLAYS ) ) / DELZ

    THV1 = TF( 1 ) * ( 1000. / PRES( 1 ) )**0.286
    DTHDZ( 1 ) = ( THV1 - THETG ) / ZF( 1 )

    DO L = 2, EMLAYS

        IF ( HMIX > ZF( L-1 ) ) LPBL = L
        IF ( HTS > ZF( L-1 ) ) LSTK = L

        THVK = TF( L ) * ( 1000. / PRES( L ) )**0.286
        DTHDZ( L ) = DDZF( L ) * ( THVK - THV1 )
        THV1 = THVK

        ZZF( L ) = ZF( L )

    END DO

```

Do I need to initiate any variables or how to solve this problem?

Thanks your time and hope to receive your help.

Best,  
K

---

<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:** [July 29, 2021, 1:29pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/34 "2021-07-29T13:29:07Z")

</div>

Sure, you can initialize these local variables to see whether that fixes the issue or not.

```
    REAL :: THVK = 0.0
    REAL :: TV( EMLAYS ) = 0.0 ! virtual temperature
    REAL :: TF( EMLAYS ) = 0.0 ! full-layer height temperatures
    REAL :: DELZ = 0.0

```

If this does not fix, you can add a compiler flag that allows you to initialize a class of variables to zero or to various numeric exceptional values. As an example, ifort has an option “init” that does exactly that. Please check out the option for your compiler and add that flag into the Makeinclude file.

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 29, 2021, 9:12pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/35 "2021-07-29T21:12:25Z")

</div>

Thanks for reply. I tried either way (intial the variables in the source code and add the flags in the makeinclude file) but still got same error message. std log file show the error from fire\_preplm.f file and same lines. what should I do at this moment?

---

<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:** [July 29, 2021, 9:36pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/36 "2021-07-29T21:36:46Z")

</div>

Are you processing np\_oilgas sector? Np\_oilgas sector is categorized as area source which means you do not need to vertically allocate the emissions. So, you should not run Laypoint program since it is only designed for point sources which come with latitude and longitude location coordinate.  
Also, the routine you are having a problem is for fire inventory sources.

Please check your run script to make sure you are not running Laypoint and treat it as Area sources.

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 29, 2021, 9:58pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/37 "2021-07-29T21:58:52Z")

</div>

I am running ptagfire3D at this moment thus I will have the Laypoint program in this simulation.

---

<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:** [July 30, 2021, 1:41am UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/38 "2021-07-30T01:41:27Z")

</div>

Good to know. I got confused from previous messages. Are you running for 12US1 domain or your own domain? Laypoint gives sometime an error when there is no fire to process within the domain. Were you able to run Laypoint for other date(s)?

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 30, 2021, 4:33pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/39 "2021-07-30T16:33:32Z")

</div>

I am running a domain created by myself that cover whole U.S. but not using the provided 12US1 domain. I am running the July emission so I believe there are several fires during this period.

---

<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:** [July 30, 2021, 4:53pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/40 "2021-07-30T16:53:26Z")

</div>

Have you tried to run other months to see whether Laypoint runs successfully without any issue? If you have, then you need to add a fake fire into your daily inventory with very small emissions in your modeling domain for Laypoint to pass this issue.

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 30, 2021, 5:04pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/41 "2021-07-30T17:04:47Z")

</div>

Thanks for your suggestion. I will try to run the August emission and will let you know if it works.

---

<div class="post-metadata">

**Author:** ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)\
**Post date:** [July 30, 2021, 9:48pm UTC](https://forum.cmascenter.org/t/segmentation-fault-of-running-ptfire3d/2514/42 "2021-07-30T21:48:21Z")

</div>

Hi Beak,

I run the ptagfire3d for the august and still has same error. Do you think it is due to the inventory itself that has no data on July and August or still the Laypoint program that I used?  
Following is the error from the std log file:  
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:  
#0 0x2AE304CD96D7  
#1 0x2AE304CD9D1E  
#2 0x2AE3055363FF  
#3 0x4272D1 in fire\_preplm\_ at fire\_preplm.f:152 (discriminator 8)  
#4 0x4163CE in MAIN\_\_ at laypoint.f:1440  
Floating exception

If I need to add a fake agfire data to test if it works, what should I do for the input file?

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

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