# 'Excessive looping' abort error in subroutine AQCHEM

**URL:** <https://forum.cmascenter.org/t/excessive-looping-abort-error-in-subroutine-aqchem/1957>\
**Category:** Run Time Errors and Issues\
**Created:** [December 1, 2020, 5:12pm UTC](https://forum.cmascenter.org/t/excessive-looping-abort-error-in-subroutine-aqchem/1957 "2020-12-01T17:12:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [December 1, 2020, 5:12pm UTC](https://forum.cmascenter.org/t/excessive-looping-abort-error-in-subroutine-aqchem/1957/1 "2020-12-01T17:12:30Z")

</div>

After the maximum number of iterations was reached on AQCHEM subroutine for one (core number 001) of 176 cores used for CMAQ simulation, I changed the max. iterations from default 60,000 to 100,000 in aqchem.F and recompiled CMAQ and ran it again. Now a new abort error - excessive looping - occurs in the AQCHEM subroutine:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/280d89f544601bd2758e403914d434c513ca20d1.png)

Going back to the original max. iterations reached error,

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/43f2981d117700c723a5eff4b07b7ab30e9289a9.png)  
I am seeing that the two errors took place at the same timestamp in the same cpu! Should I be looking at the mcip and emission file data at 2014192:200000 timestamp for possible errors?

---

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [December 6, 2020, 12:02am UTC](https://forum.cmascenter.org/t/excessive-looping-abort-error-in-subroutine-aqchem/1957/2 "2020-12-06T00:02:45Z")

</div>

When run on the debug mode, an error in the first hour of the first day of simulation occurs in the standard output:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/b8a3b888f8b6386c8888727cdfae96b1fbb5f2a9.png)  
This is an error I mentioned in another post at ['Could not write CTM\_DEPV\_DIAG file' error](https://forum.cmascenter.org/t/could-not-write-ctm-depv-diag-file-error/1948/6)

I could not reach the aqchem.F iterations related error at HH:MM:SS=20:45:00 in the debug mode because another error was caught at 00:00:00 of the day 2014192.

---

<div class="post-metadata">

**Author:** ![cgnolte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/cgnolte/32/53_2.png) [@cgnolte](https://forum.cmascenter.org/u/cgnolte)\
**Post date:** [December 6, 2020, 4:31pm UTC](https://forum.cmascenter.org/t/excessive-looping-abort-error-in-subroutine-aqchem/1957/3 "2020-12-06T16:31:49Z")

</div>

Error in AQCHEM almost always have another ultimate cause. I would advise tracking down and correcting this error in m3dry and see if that corrects the issue in AQCHEM.
