# AGRIF doesn't compile with gcc15 due to conflicting types

**URL:** <https://nemo-ocean.discourse.group/t/agrif-doesnt-compile-with-gcc15-due-to-conflicting-types/1022>\
**Category:** Versions\
**Tags:** AGRIF\
**Created:** [12 May 2026 06:26 UTC](https://nemo-ocean.discourse.group/t/agrif-doesnt-compile-with-gcc15-due-to-conflicting-types/1022 "2026-05-12T06:26:34Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Franziska](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Franziska](https://nemo-ocean.discourse.group/u/Franziska)\
**Post date:** [12 May 2026 09:21 UTC](https://nemo-ocean.discourse.group/t/agrif-doesnt-compile-with-gcc15-due-to-conflicting-types/1022/5 "2026-05-12T09:21:27Z")

</div>

To turn type mismatches into warnings, I use `-fallow-argument-mismatch`  
Below I share my full list of compiler options, which I’ve been already using with gcc14 and older versions (that did not yet complain about the conflicting types).  
Particularly zero-initialization and fcommon were mandatory (see my [earlier ticket](https://nemo-ocean.discourse.group/t/agrif-memory-allocation-errors-when-compiled-with-gnu-nemo-5/984/4)).

The type mismatches occur in ext/AGRIF/AGRIF\_FILES/ `modmpp.F90`, `modinterp.F90` and `modupdate.F90` with

```auto
.../nemo/cfgs/AGRIF_DEMO/BLD/ppsrc/agrif/modmpp.f90:348:22:

  348 | call MPI_SEND(sendtoproc(k),1,MPI_LOGICAL,k,etiquette,Agrif_mpi_comm,code)
      | 1
......
  683 | call MPI_SEND( tab3D( imin(1):imax(1), &
      | 2   
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/REAL(8)).
...nemo/cfgs/AGRIF_DEMO/BLD/ppsrc/agrif/modmpp.f90:361:22:

  361 | call MPI_RECV(res,1,MPI_LOGICAL,k,etiquette,Agrif_mpi_comm,statut,code)
      | 1
......
  523 | call MPI_RECV(temprecv%array1,datasize,Agrif_MPI_prec,k,etiquette, &
      | 2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/REAL(8)).

```

```auto
.../nemo/cfgs/AGRIF_DEMO/BLD/ppsrc/agrif/modinterp.f90:732:27:

  711 | call MPI_ALLGATHER(tab3,4*nbdim,MPI_INTEGER,tab4,4*nbdim,MPI_INTEGER,Agrif_mpi_comm,code)
      | 2
......
  732 | call MPI_ALLGATHER(memberin1,1,MPI_LOGICAL,memberinall,1,MPI_LOGICAL,Agrif_mpi_comm,code)
      | 1
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/INTEGER(4)).
.../nemo/cfgs/AGRIF_DEMO/BLD/ppsrc/agrif/modinterp.f90:732:51:

  711 | call MPI_ALLGATHER(tab3,4*nbdim,MPI_INTEGER,tab4,4*nbdim,MPI_INTEGER,Agrif_mpi_comm,code)
      | 2
......
  732 | call MPI_ALLGATHER(memberin1,1,MPI_LOGICAL,memberinall,1,MPI_LOGICAL,Agrif_mpi_comm,code)
      | 1
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/INTEGER(4)).

```

```auto
.../nemo/cfgs/AGRIF_DEMO/BLD/ppsrc/agrif/modupdate.f90:677:27:

  665 | call MPI_ALLGATHER(tab3,4*nbdim,MPI_INTEGER,tab4,4*nbdim,MPI_INTEGER,Agrif_mpi_comm,code)
      | 2
......
  677 | call MPI_ALLGATHER(memberin1,1,MPI_LOGICAL,memberinall,1,MPI_LOGICAL,Agrif_mpi_comm,code)
      | 1
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/INTEGER(4)).
.../nemo/cfgs/AGRIF_DEMO/BLD/ppsrc/agrif/modupdate.f90:677:51:

  665 | call MPI_ALLGATHER(tab3,4*nbdim,MPI_INTEGER,tab4,4*nbdim,MPI_INTEGER,Agrif_mpi_comm,code)
      | 2
......
  677 | call MPI_ALLGATHER(memberin1,1,MPI_LOGICAL,memberinall,1,MPI_LOGICAL,Agrif_mpi_comm,code)
      | 1
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/INTEGER(4)).

```

arch.fcm

```auto
%NCDF_INC -I%NCDF_HOME/include -I%HDF5_HOME/include
%NCDF_LIB -L%HDF5_HOME/lib -L%NCDF_HOME/lib -L%NCDF_C_HOME/lib -lnetcdf -lnetcdff -lhdf5 -lz
%XIOS_INC -I%XIOS_HOME/inc
%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++

# key_nosignedzero required by NEMO5
%CPP cpp -P -Dkey_nosignedzero
%FC mpif90
%FCFLAGS -O1 -fdefault-real-8 -ffree-line-length-none -fallow-argument-mismatch -finit-local-zero -finit-integer=0 -finit-real=zero -g -fbacktrace

%FFLAGS %FCFLAGS
%LD mpif90
%FPPFLAGS -P -traditional
%LDFLAGS -Wl,--allow-multiple-definition 
%AR ar
%ARFLAGS -r
%MK gmake
%USER_INC %XIOS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %NCDF_LIB

%CC mpicc
%CFLAGS -O0 -fcommon 

```

I’m using gcc 15.2.0, openmpi 5.0.10, netcdf-fortran 4.6.2

---

_[View the full topic](https://nemo-ocean.discourse.group/t/agrif-doesnt-compile-with-gcc15-due-to-conflicting-types/1022)._
