# Segmentation Fault running MCIP 5.0

**URL:** <https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989>\
**Category:** MCIP\
**Created:** [October 1, 2019, 9:40pm UTC](https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989 "2019-10-01T21:40:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thayna.gomes](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@thayna.gomes](https://forum.cmascenter.org/u/thayna.gomes)\
**Post date:** [October 1, 2019, 9:40pm UTC](https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989/1 "2019-10-01T21:40:00Z")

</div>

Dear all,

I’m having issues in running MCIP5.0. (with WRF4.1.3 inputs)  
Apparently, it starts running, but at some point I get an error.

Log file (part of it)

> forrtl: severe (174): SIGSEGV, segmentation fault occurred  
> Image PC Routine Line Source  
> mcip.exe 0000000000729174 Unknown Unknown Unknown  
> libpthread-2.12.s 0000003165E0F710 Unknown Unknown Unknown  
> mcip.exe 000000000044F016 gridproc\_ 53 gridproc.f90  
> mcip.exe 000000000040EB07 MAIN\_\_ 165 mcip.f90  
> mcip.exe 000000000040E79E Unknown Unknown Unknown  
> libc-2.12.so 000000316521ED5D \_\_libc\_start\_main Unknown Unknown  
> mcip.exe 000000000040E6A9 Unknown Unknown Unknown  
> Error running mcip

I checked all the names that I could be miswriting, and everything was ok.

If somebody has some input, please let me know.

**Note:** I changed **IfGeo** to **.TRUE.** instead of “T” because it’s not working with the latter (no idea why because it works with “F”). I posted this to answer @Catalyst2682 in another post about MCIP and it worked. ([https://forum.cmascenter.org/t/mcip-version-5-0-release-august-2019/890/17](https://forum.cmascenter.org/t/mcip-version-5-0-release-august-2019/890/17))

Thanks in advance!!

[run\_mcip.csh](https://forum.cmascenter.org/uploads/short-url/yT61i1EaZIUVHirqKRiTiuNTO49.csh) (18.5 KB) [mcip\_log.txt](https://forum.cmascenter.org/uploads/short-url/rKV0mDhRONDaeKEOFyWylh1y5PG.txt) (13.7 KB) [namelist\_mcip.txt](https://forum.cmascenter.org/uploads/short-url/dlSS0tOpV8A9pEQORjCa2mNzf4H.txt) (611 Bytes)

---

<div class="post-metadata">

**Author:** ![fliu](https://avatars.discourse-cdn.com/v4/letter/f/77aa72/32.png) [@fliu](https://forum.cmascenter.org/u/fliu)\
**Post date:** [October 1, 2019, 11:15pm UTC](https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989/2 "2019-10-01T23:15:27Z")

</div>

Thayna,  
You can keep set IfGeo = “T” in you run-script. Just replace file\_ter = “$InGeo” with file\_geo = “$InGeo” in your script because geofile defined in the fortran code such as setup\_wrfem.f90 and rdwrfem.f90, etc is file\_geo rather than file\_ter used in the original script we downloaded.  
I hope it is helpful.

Thanks.  
Fliu

---

<div class="post-metadata">

**Author:** ![thayna.gomes](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@thayna.gomes](https://forum.cmascenter.org/u/thayna.gomes)\
**Post date:** [October 2, 2019, 12:19am UTC](https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989/3 "2019-10-02T00:19:55Z")

</div>

@fliu

Thank you for your reply.

I changed as suggested, but I only found it in line 375 in my run\_script.  
And, unfortunately, I got the same error 😢

Is there any other thing or line you think I should change?

Thank you anyway!

[mcip.log.txt](https://forum.cmascenter.org/uploads/short-url/mXhXcUDJDyPWsjVnMGwIUg9IUJg.txt) (13.8 KB) [namelist.mcip.txt](https://forum.cmascenter.org/uploads/short-url/7LE44SIeTV6MMYrBFjdL30ILnun.txt) (689 Bytes) [run\_mcip.csh](https://forum.cmascenter.org/uploads/short-url/kDa9WdP6RZmtspEiNbkweC13w4.csh) (18.5 KB)

---

<div class="post-metadata">

**Author:** ![fliu](https://avatars.discourse-cdn.com/v4/letter/f/77aa72/32.png) [@fliu](https://forum.cmascenter.org/u/fliu)\
**Post date:** [October 2, 2019, 5:58pm UTC](https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989/4 "2019-10-02T17:58:17Z")

</div>

Thayna,  
I now know what happened to your case. Just comment line 286 in readnml.f90 and line 447 in chkwrfhdr.f90 which perhaps unnecessarily restrictive. Then try to run mcip again after recompile its source code.

! CALL graceful\_stop (pname)

Do not forget to correct line 759 of the ctmproc.f90 routine according to [Mcipv5.0 bug detected](https://forum.cmascenter.org/t/mcipv5-0-bug-detected/988)

---

<div class="post-metadata">

**Author:** ![thayna.gomes](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@thayna.gomes](https://forum.cmascenter.org/u/thayna.gomes)\
**Post date:** [October 3, 2019, 1:15am UTC](https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989/5 "2019-10-03T01:15:24Z")

</div>

@fliu

Thank you for the reply. I’ll make the changes suggested and try again.  
I’ll let you know how it was.

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [October 3, 2019, 4:55pm UTC](https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989/6 "2019-10-03T16:55:59Z")

</div>

Dear @fliu,

I just tried your suggestion and it works very fine. And to my dear friend @thayna.gomes kindly try and recompile your mcip as suggested to you and lets know how it goes.

Thanks

Catalyst

---

<div class="post-metadata">

**Author:** ![thayna.gomes](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@thayna.gomes](https://forum.cmascenter.org/u/thayna.gomes)\
**Post date:** [October 9, 2019, 10:33pm UTC](https://forum.cmascenter.org/t/segmentation-fault-running-mcip-5-0/989/7 "2019-10-09T22:33:56Z")

</div>

@fliu@Catalyst2682

Thank you so much! It has run perfectly.

😃
