# MCIP v5.3.1 segmentation fault with WRF 4.5 netCDF-4 files

**URL:** <https://forum.cmascenter.org/t/mcip-v5-3-1-segmentation-fault-with-wrf-4-5-netcdf-4-files/6099>\
**Category:** MCIP\
**Created:** [December 15, 2025, 3:56am UTC](https://forum.cmascenter.org/t/mcip-v5-3-1-segmentation-fault-with-wrf-4-5-netcdf-4-files/6099 "2025-12-15T03:56:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbolanjara](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/mbolanjara/32/5174_2.png) [@mbolanjara](https://forum.cmascenter.org/u/mbolanjara)\
**Post date:** [December 15, 2025, 3:56am UTC](https://forum.cmascenter.org/t/mcip-v5-3-1-segmentation-fault-with-wrf-4-5-netcdf-4-files/6099/1 "2025-12-15T03:56:40Z")

</div>

Hello everyone,

I am a new CMAQ user and I am currently trying to run MCIP v5.3.1 with WRF4.5 output files.

My system uses gcc. I compiled MCIP successfully, but when I run it, I always get a segmentation fault.

Here is the log:

###############################

Compiler is set to gcc  
lun. 15 déc. 2025 06:02:50 +04

```auto
 This program uses the EPA-AREAL/MCNC-EnvPgms/BAMS/ UNC IE       
 Models-3 I/O Applications Programming Interface, [I/O API]      
 which is built on top of the netCDF I/O library (Copyright      
 993, 1996 University Corporation for Atmospheric Research       
 Unidata Program) and the PVM parallel-programming library       
 (from Oak Ridge National Laboratory).                           
 Copyright (C) 1992-2002 MCNC,                                   
 (C) 1992-2018 Carlie J. Coats, Jr.,                             
 (C) 2003-2012 Baron Advanced Meteorological Systems, LLC, and   
 (C) 2014-2023 UNC Institute for the Environment.                
 Released under the GNU LGPL License, version 2.1. See URL     
                                                                 
     https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html     
                                                                 
 for conditions of use.                                          
                                                                 
 ioapi-3.2: $Id: init3.F90 247 2023-03-22 15:59:19Z coats $
 $Tag: 2023075 $
 Version 3.2.74 with PARMS3.EXT/PARAMETER::MXVARS3= 2048
 netCDF version 4.9.0 of Aug 7 2022 23:41:41 $
  
  
 EXECUTION_ID: mcip

```

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:  
#0 0x148aea6218c2 in ???  
#1 0x148aea620a55 in ???  
#2 0x148aea36104f in ???  
#3 0x148aead11c31 in _netcdf\_MOD\_nf90\_open_  
#4_0x556eda43675e in setup_  
#5 0x556eda378bce in MAIN\_  
#6 0x556eda378a4e in main  
Erreur de segmentation  
Error running mcip

###########################

I would really appreciate any help to understand why MCIP crashes.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![mmallard](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mmallard](https://forum.cmascenter.org/u/mmallard)\
**Post date:** [December 16, 2025, 1:20pm UTC](https://forum.cmascenter.org/t/mcip-v5-3-1-segmentation-fault-with-wrf-4-5-netcdf-4-files/6099/2 "2025-12-16T13:20:27Z")

</div>

Which version of netcdf are you using? Was it also compiled with gcc?

BTW, you can use the command nc-config --all to get info on how it was compiled if needed

---

<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:** [December 16, 2025, 1:35pm UTC](https://forum.cmascenter.org/t/mcip-v5-3-1-segmentation-fault-with-wrf-4-5-netcdf-4-files/6099/3 "2025-12-16T13:35:15Z")

</div>

It could be useful to compile and re-run with a MCIP executable compiled for debug/traceback – use the flags from the I/O API’s _Makeinclude.Linux2\_x86\_64gfort10dbg_

That would give subroutine/file/line-number information about where the seg-fault occurs, instead of that relatively useless

> #0 0x148aea6218c2 in ???  
> #1 0x148aea620a55 in ???  
> etc…  
> backtrace that you get from an optimized executable.

---

<div class="post-metadata">

**Author:** ![mbolanjara](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/mbolanjara/32/5174_2.png) [@mbolanjara](https://forum.cmascenter.org/u/mbolanjara)\
**Post date:** [December 20, 2025, 6:08am UTC](https://forum.cmascenter.org/t/mcip-v5-3-1-segmentation-fault-with-wrf-4-5-netcdf-4-files/6099/4 "2025-12-20T06:08:16Z")

</div>

Hi,  
Thank you very much for your guidance.  
I checked the NetCDF version and found that MCIP was previously using NetCDF from my conda environment. I recompiled MCIP using the system NetCDF.  
This solved the segmentation fault issue.  
I really appreciate your help. Always thanks.

---

<div class="post-metadata">

**Author:** ![mbolanjara](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/mbolanjara/32/5174_2.png) [@mbolanjara](https://forum.cmascenter.org/u/mbolanjara)\
**Post date:** [December 20, 2025, 6:10am UTC](https://forum.cmascenter.org/t/mcip-v5-3-1-segmentation-fault-with-wrf-4-5-netcdf-4-files/6099/5 "2025-12-20T06:10:40Z")

</div>

Hi,  
I also want to thank you for the suggestion to use the debug/traceback compilation flags.

I now have a working MCIP executable and I can successfully run it.

Always thanks!
