[Q-e-developers] ppc64 and xlc vs. gfortran

Paolo Giannozzi p.giannozzi at gmail.com
Sat Sep 24 21:11:37 CEST 2016


Currently the only occurrence of __XLF is in Modules/parser.f90:
#if defined (__XLF)
    ! ... with the IBM xlf compiler some combination of flags lead to
    ! ... variables being defined as static, hence giving a conflict
    ! ... with PURE function. We then force the variable to be AUTOMATIC
    CHARACTER(LEN=1), AUTOMATIC             :: sep1, sep2
    INTEGER, AUTOMATIC                      :: j
#else
    CHARACTER(LEN=1)                        :: sep1, sep2
    INTEGER                                 :: j
#endif
So we may
- remove the PURE statement (it is the only one in QE: are all others
IMPURE?) and related #ifdef and -D__XLF
- figure out if the xlf compiler automatically #defines some suitable
variable, like e.g. __xlf_compiler
- make the safe assumption that there is nobody on the planet using
gfortran on a powerpc to run QE
- remove only the above #ifdef, and see what happens

Any solution is fine for me as soon as it takes less time to implement it
than to write this message. I prefer the first one.

Paolo


On Sat, Sep 24, 2016 at 12:37 PM, Michael Banck <mbanck at debian.org> wrote:

> Hi,
>
> I noticed that QE fails to build on Debian ppc64:
>
> |mpif90 -O3 -g -x f95-cpp-input -D__XLF -D__GFORTRAN -D__STD_F95
> |-D__FFTW3 -D__MPI -D__PARA -D__SCALAPACK -D__ELPA  -I../include
> |-I/usr/include/elpa/modules  -I../iotk/src -I../ELPA/src -I../FFTXlib
> |-I../LAXlib -I. -c parser.f90
> |f951: Warning: Nonexistent include directory '../ELPA/src'
> |[-Wmissing-include-dirs]
> |parser.f90:65:21:
> |
> |     CHARACTER(LEN=1), AUTOMATIC             :: sep1, sep2
> |                     1
> |Error: Invalid character in name at (1)
>
> Note thet -D__XLF which makes it use a different codepath in parser.f90.
> This seems to be due to this in configure:
>
> |case $arch in
> |[...]
> |ppc64 )
> |        try_mpif90="mpxlf90_r mpf90_r mpif90"
> |        try_f90="xlf90_r $try_f90"
> |        try_dflags="-D__XLF"
> |        ;;
>
> So QE assumes XLC to be used on ppc64, but gfortran appears to be a
> valid choice to me as well.
>
>
> Michael
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers
>



-- 
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20160924/25f0ea4b/attachment.html>


More information about the developers mailing list