Skip to content

dependency('mpi') find wront wrappers with LLVM based Intel compilers. #15259

@dcbaker

Description

@dcbaker

Discussed in #15247

Originally posted by kentonwho November 15, 2025
I am a newbie trying to port an old Fortran MPI code to build with Meson. I am trying to use my install from Intel OneAPI, so I am telling meson to use ifx:

(base) wukenton@Lupky:~/dagswem$ cat intel.ini                                                                                                                                      
[binaries]
fortran = 'ifx'
[properties]
#fortran_args = ['-w', '-fPIE', '-fPIC']

I thought by declaring mpi as a dependency for a target, it would find the correct mpi wrapper based on the Fortran compiler to build the target. However, it just seems to find the gfortran wrapper and then use the regular ifx compiler to build, which obviously fails.

What am I missing?

Project name: dagswem
Project version: undefined
Fortran compiler for the host machine: ifx (intel-llvm 2025.2.1 "ifx (IFX) 2025.2.1 20250806")
Fortran linker for the host machine: ifx ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for Fortran supports arguments -132: YES 
Compiler for Fortran supports arguments -ffixed-line-length-132: NO 
mpifort found: YES (/opt/intel/oneapi/2025.2/bin/mpif90) 2021.16
Run-time dependency MPI for fortran found: YES 2021.16

... 

[204/229] Linking target adcprep
FAILED: adcprep 
ifx  -o adcprep adcprep.p/prep_adcprep.F.o adcprep.p/prep_cfl_prep.F.o adcprep.p/prep_decomp.F.o adcprep.p/prep_interp.F.o adcprep.p/prep_machdep.F.o adcprep.p/prep_metis.F.o adcprep.p/prep_metis2.F.o adcprep.p/prep_picomsg.F.o adcprep.p/prep_pre_global.F.o adcprep.p/prep_prep.F.o adcprep.p/prep_presizes.F.o adcprep.p/prep_read_global.F.o -Wl,--as-needed -Wl,--no-undefined '-Wl,-rpath,$ORIGIN/subprojects/metis' -Wl,--start-group subprojects/metis/libmetis.so -lifcore -limf -Wl,--end-group
```</div>

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