<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 19 Mar 2016, at 17:52, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Sat, Mar 19, 2016 at 11:49 AM, Satish Balay<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:balay@mcs.anl.gov" target="_blank" class="">balay@mcs.anl.gov</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">On Sat, 19 Mar 2016, Matthew Knepley wrote:<br class=""><br class="">> On Sat, Mar 19, 2016 at 11:29 AM, Satish Balay <<a href="mailto:balay@mcs.anl.gov" class="">balay@mcs.anl.gov</a>> wrote:<br class="">><br class="">> > This code is a bit convoluted..<br class="">> ><br class="">> > There is CPP, CPPFLAGS, CXXCPP, CXXCPPFLAGS. But then no FPP or FPPFLAGS..<br class="">> ><br class="">><br class="">> Is this really true? Is the Fortran preprocessors not the C preprocessor? I<br class="">> have never encountered this.<br class="">> If you want flags which are different for C, use CFLAGS. Am I missing<br class="">> something?<br class=""><br class=""></span>Even if we assume CPPFLAGS are -D only - it wont' work with all FC<br class="">compilers.  For ex: xlf does not recognize -D option - its -WF,-D.<br class="">So we cannont assume FC always uses CPP [or CPPFLAGS]<br class=""><br class="">And some flags have to be used at compile time only - and some can be<br class="">used at both compile & linktime - and some at linktime only.<br class=""><br class="">So we have CPPFLAGS, CFLAGS, LDFLAGS [not compiler specific?]<br class=""><br class="">In this case -Qunused-arguments can go into CFLAGS - but presumably<br class="">there are other compiler flags that cannot be used at link time - so<br class="">have to use with CPPFLAGS only?<br class=""><br class="">And this whole thread started with clang barfing on using a link flag during compile time..<br class=""><span class=""><br class="">Executing: /Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/bin/mpicc -c -o<br class="">/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-8RPaEA/config.setCompilers/conftest.o<br class="">-I/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-8RPaEA/config.setCompilers<br class="">/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-8RPaEA/config.setCompilers/conftest.c<br class="">Possible ERROR while running compiler:<br class="">stderr:<br class="">clang: warning: argument unused during compilation:<br class="">'-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/boost-1.60.0-eo7nn3v27nxa7lxqv5tttjzikshwt56i/lib'<br class="">clang: warning: argument unused during compilation:<br class="">'-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/bzip2-1.0.6-leelnsg3humpngfeofkrdpgtsofrm5ya/lib'<br class="">clang: warning: argument unused during compilation:<br class="">'-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/lib'<br class=""><br class=""><br class=""></span>So having proper support for CFLAGS, CPPFLAGS, FLAGS, FPPFLAGS might be the correct thing to do..</blockquote><div class=""><br class=""></div><div class="">Won't that be incredibly confusing for the 99% of people who use Fortran that uses the C preprocessor?</div></div></div></div></div></blockquote><div><br class=""></div>one can always set FPPFLAGS to CPPFLAGS inside if the former is not specified.</div><div>Not confusion for anyone in that case.</div><div><br class=""></div><div>Regards,</div><div>Denis.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">   Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="HOEnZb"><font color="#888888" class=""><br class="">Satish<br class=""></font></span><div class="HOEnZb"><div class="h5"><br class="">><br class="">>    Matt<br class="">><br class="">><br class="">> > And then base.py has: [which is wrong for 'Cxx', 'FC'?]<br class="">> ><br class="">> >   def getPreprocessorFlagsName(self, language):<br class="">> >     if language in ['C', 'Cxx', 'FC']:<br class="">> >       flagsArg = 'CPPFLAGS'<br class="">> >     elif language == 'CUDA':<br class="">> >       flagsArg = 'CUDAPPFLAGS'<br class="">> >     else:<br class="">> >       raise RuntimeError('Unknown language: '+language)<br class="">> >     return flagsArg<br class="">> ><br class="">> > And config/compile/FC.py has [which reuses CPP,CPPFLAGS for FC]:<br class="">> ><br class="">> > class Preprocessor(config.compile.C.Preprocessor):<br class="">> >   '''The Fortran preprocessor, which now is just the C preprocessor'''<br class="">> >   def __init__(self, argDB):<br class="">> >     config.compile.C.Preprocessor.__init__(self, argDB)<br class="">> ><br class="">> > Matt - should we have FPP,FPPFLAGS supported here?<br class="">> ><br class="">> > Perhaps using CPPFLAGS with FC is a bug? So we should atleast do:<br class="">> ><br class="">> > diff --git a/config/BuildSystem/config/compile/FC.py<br class="">> > b/config/BuildSystem/config/compile/FC.py<br class="">> > index 3d0bf74..7bae24d 100644<br class="">> > --- a/config/BuildSystem/config/compile/FC.py<br class="">> > +++ b/config/BuildSystem/config/compile/FC.py<br class="">> > @@ -13,6 +13,7 @@ class Preprocessor(config.compile.C.Preprocessor):<br class="">> >      config.compile.C.Preprocessor.__init__(self, argDB)<br class="">> >      self.language        = 'FC'<br class="">> >      self.targetExtension = '.F'<br class="">> > +    self.flagsName       = ''<br class="">> >      self.includeDirectories = sets.Set()<br class="">> >      return<br class="">> ><br class="">> > And then [I'm not sure where this gets used..]<br class="">> ><br class="">> > $ git diff config/BuildSystem/config/base.py |cat<br class="">> > diff --git a/config/BuildSystem/config/base.py<br class="">> > b/config/BuildSystem/config/base.py<br class="">> > index b18a173..8b1129d 100644<br class="">> > --- a/config/BuildSystem/config/base.py<br class="">> > +++ b/config/BuildSystem/config/base.py<br class="">> > @@ -454,8 +454,12 @@ class Configure(script.Script):<br class="">> ><br class="">> >    # Should be static<br class="">> >    def getPreprocessorFlagsName(self, language):<br class="">> > -    if language in ['C', 'Cxx', 'FC']:<br class="">> > +    if language == 'C':<br class="">> >        flagsArg = 'CPPFLAGS'<br class="">> > +    elif language == 'Cxx':<br class="">> > +      flagsArg = 'CXXCPPFLAGS'<br class="">> > +    elif language == 'FC':<br class="">> > +      flagsArg = ''<br class="">> >      elif language == 'CUDA':<br class="">> >        flagsArg = 'CUDAPPFLAGS'<br class="">> >      else:<br class="">> ><br class="">> ><br class="">> > Satish<br class="">> ><br class="">> > On Sat, 19 Mar 2016, Denis Davydov wrote:<br class="">> ><br class="">> > > Hi Satish,<br class="">> > ><br class="">> > > I think you have a bug in you config system as<br class="">> > "CPPFLAGS=-Qunused-arguments" propagate to fortran compiler even when I try<br class="">> > to explicitly specify "FPPFLAGS=" to nothing :<br class="">> > ><br class="">> > > TEST checkFortranCompiler from<br class="">> > config.setCompilers(/private/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/davydden/spack-stage/spack-stage-jNBTET/petsc-3.6.3/config/BuildSystem/config/setCompilers.py:919)<br class="">> > > TESTING: checkFortranCompiler from<br class="">> > config.setCompilers(/private/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/davydden/spack-stage/spack-stage-jNBTET/petsc-3.6.3/config/BuildSystem/config/setCompilers.py:919)<br class="">> > >   Locate a functional Fortran compiler<br class="">> > > Checking for program<br class="">> > /Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/bin/mpif90...found<br class="">> > >                 Defined make macro "FC" to<br class="">> > "/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/bin/mpif90"<br class="">> > >                 Pushing language FC<br class="">> > > Executing:<br class="">> > /Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/bin/mpif90<br class="">> > -c -o<br class="">> > /var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-zwyqnZ/config.setCompilers/conftest.o<br class="">> > -I/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-zwyqnZ/config.setCompilers<br class="">> > -Qunused-arguments<br class="">> > /var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-zwyqnZ/config.setCompilers/conftest.F<br class="">> > > Possible ERROR while running compiler: exit code 256<br class="">> > > stderr:<br class="">> > > gfortran: error: unrecognized command line option '-Qunused-arguments’<br class="">> > ><br class="">> > > Kind regards,<br class="">> > > Denis<br class="">> > ><br class="">> > > > On 18 Mar 2016, at 19:13, Satish Balay <<a href="mailto:balay@mcs.anl.gov" class="">balay@mcs.anl.gov</a>> wrote:<br class="">> > > ><br class="">> > > > Or you can workarround by using additional PETSc configure option:<br class="">> > > ><br class="">> > > > CPPFLAGS=-Qunused-arguments<br class="">> > > > [or CFLAGS?]<br class="">> > > ><br class="">> > > > Satish<br class="">> > > ><br class="">> > > ><br class="">> > > > On Fri, 18 Mar 2016, Satish Balay wrote:<br class="">> > > ><br class="">> > > >> your mpicc is barfing stuff on stderr - thus confusing petsc<br class="">> > configure.<br class="">> > > >><br class="">> > > >> I don't see this issue with the old openmpi I have access to..<br class="">> > > >><br class="">> > > >> What do you have for:<br class="">> > > >><br class="">> > > >><br class="">> > /Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/bin/mpicc<br class="">> > -show<br class="">> > > >> touch foo.c<br class="">> > > >><br class="">> > /Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/bin/mpicc<br class="">> > -c foo.c -show<br class="">> > > >><br class="">> > > >> I'm not sure what to suggest.. Perhaps you can use --download-mpich<br class="">> > > >> [or --download-openmpi] - but then I see you are building all these<br class="">> > > >> packages using spack - so perhaps you should check with 'spack' folk..<br class="">> > > >><br class="">> > > >> Satish<br class="">> > > >><br class="">> > > >> ---------<br class="">> > > >><br class="">> > > >> Executing:<br class="">> > /Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/bin/mpicc<br class="">> > -c -o<br class="">> > /var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-8RPaEA/config.setCompilers/conftest.o<br class="">> > -I/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-8RPaEA/config.setCompilers<br class="">> >  /var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/petsc-8RPaEA/config.setCompilers/conftest.c<br class="">> > > >> Possible ERROR while running compiler:<br class="">> > > >> stderr:<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/boost-1.60.0-eo7nn3v27nxa7lxqv5tttjzikshwt56i/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/bzip2-1.0.6-leelnsg3humpngfeofkrdpgtsofrm5ya/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openmpi-1.10.2-37xieeupgsteaq6btru6wmhxfi44xqtn/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/hwloc-1.11.2-pxsmp4nhfdjc3jb7odj5lhppu7wqna5b/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/libpciaccess-0.13.4-erc6tr3ghndi5ed3gbj6wtvw6zl4vobf/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/zlib-1.2.8-cyvcqvrzlgurne424y55hxvfucvz2354/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/hdf5-1.8.16-diujq2w7ew4qviquh67b3lkcqsxtf77y/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/hypre-2.10.1-4kql32qmjpp7ict2qczkyyv6a4mbrgbl/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openblas-0.2.16-qplsxnxlbaqnz2iltdo7fdhlayvuaxel/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/metis-5.1.0-i5y5b6r5ca4f77u5tketagpkn6joxasp/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/ncurses-6.0-sabhdwxbdbbapfo6wodglfmyo6u3c3hj/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/openssl-1.0.2g-answvmhu3lodpmgulgzryygkkimmsn34/lib'<br class="">> > > >> clang: warning: argument unused during compilation:<br class="">> > '-L/Users/davydden/spack/opt/spack/darwin-x86_64/clang-7.0.2-apple/parmetis-4.0.3-auubrjcwhqmqnpoqjwgwgz4bcjnxzunx/lib'<br class="">> > > >><br class="">> > > >> On Fri, 18 Mar 2016, Denis Davydov wrote:<br class="">> > > >><br class="">> > > >>> Dear all,<br class="">> > > >>><br class="">> > > >>> Although I saw this issue on the mailing list, that was related to<br class="">> > broken compilers, i don’t think it’s the case here as `mpicc -E` seems to<br class="">> > be ok.<br class="">> > > >>> Log is attached.<br class="">> > > >>><br class="">> > > >>> Kind regards,<br class="">> > > >>> Denis<br class="">> > > >>><br class="">> > > >>><br class="">> > > >><br class="">> > ><br class="">> > ><br class="">> ><br class="">><br class="">><br class="">><br class="">><span class="Apple-converted-space"> </span></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div></div></div></div></blockquote></div><br class=""></body></html>