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

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

 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!

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

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.

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.

1 Like

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!