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

trouble with fpp

ggassmann
Beginner
1,134 Views
I have trouble compiling a piece of software that has C-style preprocessor commands, such as

#if ! defined(PP_VAR)

From the command line I can use

-fpp:"-fcom=no"

but my make command swallows the quotes. I have tried several variations, including -Qoption,fpp,-fcom=no , but to no avail. What should I do.

I am running a trial version of Intel Composer 2011 SP1.

0 Kudos
3 Replies
mecej4
Honored Contributor III
1,134 Views
Running fpp /help gives

[bash]/f_com=     If value is 'yes', Fortran style end-of-line comments are
                    recognized by fpp on preprocessor lines and will be ignored[/bash]

Note the '_' after 'f' and before 'com'.
0 Kudos
ggassmann
Beginner
1,134 Views
Yes, thanks for correcting. I mistyped that. I had the underscore. However, my problem is not solved. Online documentation indicates that I have to enclose the entire expression in double quotes and preface it with /fpp:

http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/copts/fortran_options/option_fpp.htm#option_fpp

Just to be sure: I read this page to say that the entire option should read

/fpp:"/f_com=no"

This works; my tests indicate that slashes and hyphens work equally well, even. However, I am having trouble getting my makefile to put the quotes in place. I saw another part of the documentation that suggested it should be possible to use a non-quoted variant, as follows:

/Qoption,fpp,/f_com=no

unfortunately, that fails to work for me, even from the command line. I am probably misinterpreting the instructions at http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/copts/common_options/option_qoption.htm

Any ideas what else I can try?

Thanks

gus
0 Kudos
ggassmann
Beginner
1,134 Views
I found the solution by trial and errpr (mostly error!)

Since it is not documented in the on-line reference, I post it here as a record for posterity.

-fpp:'-f_com=no'

The single quotes mean that I can put this stuff into a configuration file (where the entire command must be quoted), from whence it finds its way into the makefile (double quotes stripped) and onto the command line, which accepts the single quotes just fine.

Wow! What a fun way to spend three days.
0 Kudos
Reply