Skip to content

Error building MPAS-Model with IntelLLVM 2025.3 #1397

@fmahebert

Description

@fmahebert

I've tried to build MPAS-Model with IntelLLVM 2025.3, and I see several compiler errors that seem to come from preprocessing of macros in the Fortran code.

I'm on Ubuntu24.04, with IntelLLVM 2025.3.1 and modules from spack-stack 2.0 (can give specifics if helpful).

I ran the following,

git clone --branch=develop https://github.com/MPAS-Dev/MPAS-Model.git  # 447de92d4
mkdir build
cd build
cmake ../MPAS-Model
make

And I see the build fail with,

[ 14%] Building Fortran object src/framework/CMakeFiles/framework.dir/mpas_dmpar.F.o
mpas_dmpar.F(5547): #error: number of arguments doesn't match.
mpas_dmpar.F(6310): #error: number of arguments doesn't match.
mpas_dmpar.F(8165): #error: number of arguments doesn't match.
mpas_dmpar.F(8202): #error: number of arguments doesn't match.

(And similar errors in several other files)

Note the code pattern used here is, more or less,

#define COMMA ,
#define DMPAR_DEBUG_WRITE(M) !call mpas_log_write( M )
...
5547: DMPAR_DEBUG_WRITE('exch_halo nHaloLayers:$i destList halos:$i' COMMA intArgs=(/nHaloLayers COMMA size(field%recvList%halos)/))

(This pattern also in the other files)

I suspect, but have not proven, that one of two things is happening with the IntelLLVM Fortran compiler:

While this may be a compiler bug, it could still be advantageous to update MPAS-Model's macros to enable compilation with these newer Intel compilers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions