# Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation

**URL:** <https://forum.cmascenter.org/t/program-received-signal-sigfpe-floating-point-exception-erroneous-arithmetic-operation/5221>\
**Category:** CMAQ\
**Tags:** cmaq\
**Created:** [September 16, 2024, 4:54am UTC](https://forum.cmascenter.org/t/program-received-signal-sigfpe-floating-point-exception-erroneous-arithmetic-operation/5221 "2024-09-16T04:54:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hasibul](https://avatars.discourse-cdn.com/v4/letter/h/838e76/32.png) [@Hasibul](https://forum.cmascenter.org/u/Hasibul)\
**Post date:** [September 16, 2024, 4:54am UTC](https://forum.cmascenter.org/t/program-received-signal-sigfpe-floating-point-exception-erroneous-arithmetic-operation/5221/1 "2024-09-16T04:54:47Z")

</div>

Hello all,

I am using CMAQ for 4km FL grid to simulate concentration from Feb 1,2023 through May 1,2023. I am facing error as below:  
Processing Day/Time [YYYYDDD:HHMMSS]: 2023032:010000  
Which is Equivalent to (UTC): 1:00:00 Wednesday, Feb. 1, 2023  
Time-Step Length (HHMMSS): 000500

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:  
#0 0x14ffee06e171 in ???  
#1 0x14ffee06d313 in ???  
#2 0x14ffed4fcb7f in ???  
#3 0x8b2e39 in m3dry\_  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/m3dry.F:652  
#4 0x685858 in _depv\_defn\_MOD\_get\_depv  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/DEPV\_DEFN.F:544  
 #5 0x8988ec in vdiff  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/vdiffproc.F:411  
 #6 0x7f7b0a in sciproc_  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/sciproc.F:233  
#7 0x7e6f6c in cmaq\_driver\_  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/driver.F:717  
#8 0x7e1ee5 in cmaq  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/cmaq\_main.F:97  
#9 0x7e21f4 in main  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/cmaq\_main.F:32  
#0 0x145df6f0a171 in ???  
#1 0x145df6f09313 in ???  
#2 0x145df6398b7f in ???  
#3 0x8b2e39 in m3dry\_  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/m3dry.F:652  
#4 0x685858 in _depv\_defn\_MOD\_get\_depv  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/DEPV\_DEFN.F:544  
 #5 0x8988ec in vdiff  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/vdiffproc.F:411  
 #6 0x7f7b0a in sciproc_  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/sciproc.F:233  
#7 0x7e6f6c in cmaq\_driver\_  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/driver.F:717  
#8 0x7e1ee5 in cmaq  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/cmaq\_main.F:97  
#9 0x7e21f4 in main  
at /lustre/fs1/home/mhasan/Parallel/Build\_CMAQ/CMAQ\_Project/CCTM/scripts/BLD\_CCTM\_v532\_gcc/cmaq\_main.F:32

I am attaching my run file along with some log files. Thanks for your help.  
[run\_cctm\_202302\_4FL\_log.txt](https://forum.cmascenter.org/uploads/short-url/AblksuszpitQQyCI2DlMkKKdpte.txt) (57.5 KB)  
[CTM\_LOG\_000.v532\_gcc\_4MIDFLA1\_87X81\_20230201.txt](https://forum.cmascenter.org/uploads/short-url/nKJuFozbHqIVB3obrdoFpl2wCAq.txt) (72.1 KB)  
[run\_cctm\_202302\_4FL.txt](https://forum.cmascenter.org/uploads/short-url/lu0YCq1qps18Ezmr7ZfDxb8Kkes.txt) (35.7 KB)

Hasibul

---

<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:** [September 16, 2024, 9:44am UTC](https://forum.cmascenter.org/t/program-received-signal-sigfpe-floating-point-exception-erroneous-arithmetic-operation/5221/2 "2024-09-16T09:44:36Z")

</div>

This looks like a variant of [https://cjcoats.github.io/ioapi/ERRORS.html#inst](https://cjcoats.github.io/ioapi/ERRORS.html#inst): some model-component is compiled for a newer/different processor than you’re actually running the model on. It is not the case that you can just say, “I’m running on Intel XEON.”

What does _cat /proc/cpuinfo_ say? …and where did the executable come from?

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [September 16, 2024, 11:30am UTC](https://forum.cmascenter.org/t/program-received-signal-sigfpe-floating-point-exception-erroneous-arithmetic-operation/5221/3 "2024-09-16T11:30:20Z")

</div>

Hello Hasibul,

Line 652 which the backtrace is pointing to in the m3dry.F code is this one:

```
           rstom = MET_DATA%RS( c,r ) * dwat / dif0( l )
 & + 1.0 / ( heff_ap / 3000.0 + 100.0 * meso( l ) ) / laicr

```

My suspicion is that there is some inconsistency in your WRF fields between the LWMASK or VEGF fields and the LAI fields. Specifically, I suspect your WRF fields may have grid cells where LAI is zero (causing a divide-by-zero error) despite having a non-zero VEGF value and/or a LWMASK indicating land.

Stomatal resistance (rstom) in line 652 is only calculated over land cells.

Line 502 determines whether a grid cell should be treated as all water (unvegetated)

```
        IF ( ( NINT(GRID_DATA%LWMASK( c,r )) .EQ. 0 ) .OR. ( vegcr .EQ. 0.0 ) ) THEN ! water

```

Line 563 then starts the “else” branch of that “if” condition with the land-based calculations, including the calculation of rstom that assumes LAI to be non-zero.

The issue you are encountering seems similar to the one in this thread:

> [@CCTM5.3.3 run error: Program received signal SIGFPE: Floating-point exception](https://forum.cmascenter.org/t/cctm5-3-3-run-error-program-received-signal-sigfpe-floating-point-exception/3297):
>
> Hi, I got following error when I run CMAQv5.3.3: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation. Backtrace for this error: #0 0x2AC6866D4697 #1 0x2AC6866D4CDE #2 0x2AC6871673FF #3 0x9381DA in m3dry\_ #4 0x6CC539 in \_\_depv\_defn\_MOD\_get\_depv at DEPV\_DEFN.F:544 #5 0x91E7E4 in vdiff\_ at vdiffproc.F:411 #6 0x86810D in sciproc\_ at sciproc.F:237 #7 0x8566DD in cmaq\_driver\_ at driver.F:717 #8 0x8510C4 in MAIN\_\_ at cmaq\_main.F:97 =====================…

Similar to the discussion in that thread, you would want to perform a careful analysis of your LWMASK, VEGF, and LAI fields to identify and hopefully resolve any inconsistencies that currently exist.
