[Q-e-developers] [Pw_forum] Bug fix after NAG compilation of QE

Samuel Poncé samuel.pon at gmail.com
Tue Sep 15 21:24:19 CEST 2015


Dear QE developer,

We've recently purchase a NAG licence (latest version) and ran it on QE.

Here is a list of changes/bug fix to make NAG happy (we have only solve the
error, not
the warnings).

1) lapack-3.2/make.inc
Although my environment is set up for nagfor, the configure is not able to
modify
the install/make_lapack.inc correctly. Therefore we have to change manually
the following:
FORTRAN  = nagfor
OPTS     = -O0 -kind=byte -dcfuns -mismatch
DRVOPTS  = -O0 -kind=byte -dcfuns -mismatch
NOOPT    = -O0 -g
LOADER   = nagfor
LOADOPTS = -g

The same has to be done for install/make_blas.inc

2) The "pthread" option is not accepted by NAG.
This is not really a bug, just to say we had to remove this option from the
make.sys file
of QE.

Additionally, NAG doesn't have a great internal fortran preprocessor,
so use CPP (from make.sys):
.f90.o:
        $(CPP) $(CPPFLAGS) $< -o $*.F90
        $(MPIF90) $(F90FLAGS) -c $*.F90 -o $*.o

Also on the make.sys file, NAG does not support -x options, therefore change
to. Also notice the -kind=byte option to tell NAG that KIND(4) and KIND(8)
is
the convention in QE.
The -mismatch option is to make NAG less strict and -dcfuncs  is to allow
non standard casting variable like dcmplx

CFLAGS         = -O0 $(DFLAGS) $(IFLAGS)
F90FLAGS       = $(FFLAGS) $(FDFLAGS) $(IFLAGS) $(MODFLAGS)
FFLAGS         = -O0 -kind=byte -dcfuns -mismatch

3) It would be usefull to have a macro
!#ifdef NAG
  USE F90_UNIX_ENV, ONLY : IARGC,GETARG

The Wannier90 code does have a ifdef NAG macro.

4) The main corrections are related to
- change $ which is depreciated by advance="NO"
- small bug (an interface was defined with optional argument but the
subroutine
called was not)
- swapping order of variable declaration so that the variable is first
declared
and then used
- Change X by 1X

Join to this email is a patch of the difference (to be applied on the
QE-r11723):

patch -p1 < diff-nag.patch

Note: This only solves the problems to "make pw". Other parts like ph are
not done yet.

Best Regards,

Samuel and Henry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20150915/9268bb85/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-nag.patch
Type: text/x-patch
Size: 25168 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20150915/9268bb85/attachment.bin>


More information about the developers mailing list