Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

ifort: command line warning

Trupti
Beginner
1,920 Views

ifort: command line warning #10006: ignoring unknown option '-fallow-argument-mismatch'

I get the above error while using make command in CosmoMC/source directory.

Can anyone help me out with this?

0 Kudos
4 Replies
PrasanthD_intel
Moderator
1,899 Views

Hi Trupti,

 

There is a dedicated forum for handling Fortran related issues (Intel® Fortran Compiler - Intel Community), where you can get better responses whether the flag is supported or not. I am redirecting this query to that forum.

Regards

Prasanth

0 Kudos
mecej4
Honored Contributor III
1,876 Views

Trupti, you probably used a makefile that was created for use with Gfortran. Many compiler options are specific to a particular compiler. Read the Ifort documentation to find out which options will work for you.

The -fallow-argument-mismatch is discouraged even with Gfortran.  Better fix the source code in this case than search for compiler options.

0 Kudos
sternbg
Beginner
1,812 Views

User makefiles are not the culprit – The option is being stuffed into FCFLAGS by mpif90 itself, e.g., from:

<INTEL_ROOT>/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpif90

A simple mpif90 -V  unnecessarily triggers the warning:

$ env | grep I_MPI
I_MPI_F90=ifort
I_MPI_CC=icc
I_MPI_ROOT=/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi

$ mpif90 --version
ifort: command line warning #10006: ignoring unknown option '-fallow-argument-mismatch'
ifort (IFORT) 18.0.3 20180410
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.


This sure looks to be a bug in the release scripts.

Here's an execution trace, filtered for some key lines:

$ bash -x `type -p mpif90` -V |& grep -E 'FC=|ver=|major=|-fallow|-gt'
+ FC=gfortran
+ FC=ifort
+ gfort_ver=18.0.3
+ major=18
+ gver=
+ '[' 18 -gt 9 ']'
+ FCFLAGS=' -fallow-argument-mismatch'
+ eval ifort -fallow-argument-mismatch ''\''-V'\''' -I/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/include/gfortran -I/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/include -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release -Xlinker -rpath -Xlinker /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib -lmpifort -lmpi -lrt -lpthread -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Xlinker --enable-new-dtags -ldl
++ ifort -fallow-argument-mismatch -V -I/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/include/gfortran -I/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/include -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release -Xlinker -rpath -Xlinker /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib -lmpifort -lmpi -lrt -lpthread -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Xlinker --enable-new-dtags -ldl
ifort: command line warning #10006: ignoring unknown option '-fallow-argument-mismatch'


The opt stuffing is new as of version compilers_and_libraries_2020.x; the -gt version conditional inside mpif90 has been present in releases from previous years.

 

Michael

0 Kudos
Steve_Lionel
Honored Contributor III
1,800 Views

If I recall correctly, you want to use mpifort, not mpif90 (which assumes gfortran).

 
0 Kudos
Reply