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

Filippo Spiga spiga.filippo at gmail.com
Tue Sep 15 22:40:09 CEST 2015


Dear Samuel,

thank you very much for the patch! I suggest not to commit anything too destruptive this week because we are going to release a minor on Saturday/Sunday. Better be safe.  In the meanwhile I will also try to sort out a temporary NAG license for testing, we do not have it in Cambridge at the moment...

This "NAG thing" is top list next Monday.

--
Mr. Filippo SPIGA, M.Sc.
Quantum ESPRESSO Foundation
http://fspiga.github.io ~ skype: filippo.spiga

*****
Disclaimer: "Please note this message and any attachments are CONFIDENTIAL and may be privileged or otherwise protected from disclosure. The contents are not to be disclosed to anyone other than the addressee. Unauthorized recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission."

> On Sep 15, 2015, at 8:24 PM, Samuel Poncé <samuel.pon at gmail.com> wrote:
> 
> 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
> 
> <diff-nag.patch>





More information about the developers mailing list