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

Preprocessing flags -P for ifort 19.0.5 causes the configure step to fail

efnacy
New Contributor I
969 Views

 

 

I am installing a program called Octopus and having an issue with, apparently, preprocessing of Fortran code. The Fortran compiler I am using is mpiifort based on intel 19.0.5.281 compiler version. During configure, I set, among others

 

FC=/path/to/mpiifort  FCFLAGS="-O3"

 

and during the subsequent make I got the following warning:

 

/usr/local/compilers/Intel/parallel_studio_xe_2019.5/compilers_and_libraries_2019.5.281/linux/mpi/intel64/bin/mpiifort -O3 -I ../../src/basic -I ../../src/math -I ../../src/species -I ../../src/ions -I ../../src/grid -I ../../src/poisson -I ../../src/frozen -I ../../src/basis_set -I ../../src/states -I ../../src/system -I ../../src/hamiltonian -I ../../src/scf -I ../../src/td -I ../../src/opt_control -I ../../src/sternheimer -I ../../external_libs/bpdn -I ../../external_libs/dftd3 -I ../../external_libs/spglib-1.9.9/src/ -I /home/myname/bin/libxc-4.3.4/intel-19.0.5/include   -I/home/myname/bin/fftw-3.3.8/intel-19.0.5_impi-2019.5.281/include  -c  -o gauss_legendre.o gauss_legendre_oct.f90
<command-line>(1): warning #5117: Bad # preprocessor line
# 1 "/usr/include/stdc-predef.h" 1 3 4

 

So, it looks like it's due to the compiler not preprocessing those #lines before compilation. Therefore I try to repeat the configure process by setting

 

FCFLAGS="-O3 -fpp"

 

then make, and I got another similarly looking warnings

 

/usr/local/compilers/Intel/parallel_studio_xe_2019.5/compilers_and_libraries_2019.5.281/linux/mpi/intel64/bin/mpiifort -O3 -fpp -I ../../src/basic -I ../../src/math -I ../../src/species -I ../../src/ions -I ../../src/grid -I ../../src/poisson -I ../../src/frozen -I ../../src/basis_set -I ../../src/states -I ../../src/system -I ../../src/hamiltonian -I ../../src/scf -I ../../src/td -I ../../src/opt_control -I ../../src/sternheimer -I ../../external_libs/bpdn -I ../../external_libs/dftd3 -I ../../external_libs/spglib-1.9.9/src/ -I /home/myname/bin/libxc-4.3.4/intel-19.0.5/include   -I/home/myname/bin/fftw-3.3.8/intel-19.0.5_impi-2019.5.281/include  -c  -o io.o io_oct.f90
/usr/include/stdc-predef.h(1): warning #5117: Bad # preprocessor line
# 1 "<command-line>" 2 

 

The inclusion of preprocessing flag -fpp seems to do something but does not entirely solve the issue.

Then finally, I used

 

FCFLAGS="-O3 -fpp -P"

 

But this time the configure step failed complaining that

 

checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files

 

But how come? -P flag is a valid flag for ifort, and how to solve this issue in general. For your information, I have successfully installed the same program previously without any preprocessing flags using ifort 18.0.0.

0 Kudos
0 Replies
Reply