mpich icon indicating copy to clipboard operation
mpich copied to clipboard

mpif77 emits -fallow-argument-mismatch which breaks mpif77 -fc flang

Open cfeld opened this issue 1 year ago • 2 comments

I try to use this GCC-based installation

$ mpichversion 
=== ParaStation MPI 5.9.2-1 ===
Version(PSMPI): Oct  4 2023 (5.9.2-1)+confset(gcc)+cuda+pmix
MPICH Version:      4.1.2
MPICH Release date: Wed Jun  7 15:22:45 CDT 2023
MPICH ABI:          15:1:3
MPICH Device:       psp
MPICH configure:    --prefix=/p/software/jurecadc/stages/2024/software/psmpi/5.9.2-1-GCC-12.3.0 --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --with-cuda --with-confset=gcc --with-mpichconf=--enable-static --with-file-system=ime+ufs+gpfs --enable-romio --with-pmix=/p/software/jurecadc/stages/2024/software/PMIx/4.2.6-GCCcore-12.3.0 build_alias=x86_64-pc-linux-gnu host_alias=x86_64-pc-linux-gnu CC=gcc CFLAGS=-I/opt/ddn/ime/include LDFLAGS= -L/opt/ddn/ime/lib -lim_client --with-device=psp --enable-cache --disable-static --enable-shared --enable-romio --enable-fast=O3,ndebug --enable-lib-depend --disable-rpath --enable-cxx --enable-fortran=all --with-psp-confset=gcc --with-datatype-engine=yaksa --with-psp-pscom=yes CC=gcc CXX=g++ FC=gfortran F77=gfortran --with-pmix=/p/software/jurecadc/stages/2024/software/PMIx/4.2.6-GCCcore-12.3.0 --enable-psp-cuda-awareness --with-cuda=/p/software/jurecadc/stages/2024/software/CUDA/12 --without-hwloc --with-hydra-topolib=no --without-hcoll --enable-static --with-file-system=ime+ufs+gpfs --enable-romio --disable-maintainer-mode
MPICH CC:           gcc -I/opt/ddn/ime/include   -DMPIR_CONTEXT_DYNAMIC_PROC_WIDTH=0  -DNDEBUG -DNVALGRIND -O3
MPICH CXX:          g++   -DNDEBUG -DNVALGRIND -O3
MPICH F77:          gfortran   -O3
MPICH FC:           gfortran   -O3

with flang, as in mpif77 -fc flang. This used to work with older installations, but now fails with flang: error: unknown argument: '-fallow-argument-mismatch'.

I think -fallow-argument-mismatch comes via WRAPPER_EXTRA_F77_FLAGS, introduced in 778933a.

Would it make sense to add the compiler-specific WRAPPER_EXTRA_F77_FLAGS only if test "@FC@" = "$FC" in src/env/mpifort.*?

cfeld avatar Jan 15 '24 15:01 cfeld

Yes, it makes sense.

hzhou avatar Jan 16 '24 15:01 hzhou

Reverting 778933a6ab43214471fb7729d4b592e38853dd49 makes it possible to build MPICH with the new LLVM flang. Fortunately, this still reverts cleanly.

pawosm-arm avatar May 30 '24 09:05 pawosm-arm