<div dir="ltr"><div><div>Dear QE-developers,<br><br></div>I further worked on QE with NAG for the following part of the code:<br><br>----------------------------------------------------------------------------------------------------------------------------------<br></div>QE/atomic<br>----------------------------------------------------------------------------------------------------------------------------------<br><br>1) Error: find_qi.F90: Argument RJ (no. 2) in reference to COMPUTE_LOG from FIND_QI is not an array<br>I guess that the function should be changed to <br>function compute_log(j1,rj,dx)<br>  use kinds, only : DP<br>  implicit none<br>  real(DP) ::   &<br>       compute_log, &<br>       deriv_7pts,  &<br>       dx,          &<br>       j1(7),       &<br>       rj<br><br>  !      compute_log=(j1(2)-j1(1))*2.0_dp/( (rj(2)-rj(1))*(j1(2)+j1(1)) )<br>  compute_log=deriv_7pts(j1,4,rj,dx)/j1(4)<br><br>  return<br>end function compute_log<br><br>2) Error: grad_log.F90, line 46: Implicit type for NX<br>  ! dimensions, method used<br>  integer :: nx, method<br>  ! input/output variables<br>  real(DP), intent(in) :: v(nx), rm1(nx), dx<br>  ! function, 1/r, dx (step of the log. mesh)<br>  real(DP), intent(out) :: dv(nx)<br><br>3) Error: write_results.F90, line 281: Unrecognised statement<br>Error: write_results.F90, line 281: Syntax error<br><br>     write(stdout,'(5x,''Ekinc='',f15.6,'' Ry,'',f15.6,'' Ha,'',f15.6,'' eV'')') &<br>                   ekinc, ekinc*0.5_dp,  ekinc*rytoev_fact<br>     write(stdout,'(5x,''Ekinv='',f15.6,'' Ry,'',f15.6,'' Ha,'',f15.6,'' eV'')') &<br>                   ekinv, ekinv*0.5_dp,  ekinv*rytoev_fact<br><br>4) Error: write_results.F90, line 89: Missing comma in format specification<br>  if (rel==0 .and. .not.relpert) then<br>     write(stdout,'(5x, "1 Ry = ",f12.8, " eV" )') rytoev_fact<br>  else<br>     write(stdout,'(5x, "1 Ry = ",f12.8, " eV, c = ",f12.8 )') rytoev_fact, &<br><div><br><br>----------------------------------------------------------------------------------------------------------------------------------<br>QE/PP<br>----------------------------------------------------------------------------------------------------------------------------------<br><br>1) Error: cube.F90, line 129: Implicit type for NAT<br><br>  integer, intent(in)  :: nat, ityp(nat), ounit, nx, ny, nz<br>  real(dp), intent(in) :: alat, tau(3,nat)<br><br>2) Error: partialdos.F90, line 199: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>WRITE (4,'("#")',advance="no")<br><br>There are 23 errors like that.<br><br>3) Error: projwfc_box.F90, line 459: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br>:%s/,$)'/)',advance="no"<br><br>4) Error: wannier_umatrix_subroutines.F90, line 162: Unknown intrinsic function DFLOAT<br>change dfloat by float<br>!   INTRINSIC dfloat<br><br>5) Error: plotband.F90, line 199: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br>:%s/,$)'/)',advance="no"<br><br>6) Error: plotproj.F90, line 148: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br>7) Error: plotrho.F90, line 101: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>8) sumpdos.008481.008481.c:(.text+0x6d): undefined reference to `iargc_'<br>USE F90_UNIX_ENV, ONLY : IARGC,GETARG<br><br>9) Error: pw2gw.F90, line 1216: Implicit type for NPW<br>  integer, intent(in) :: ik, npw<br>  real(DP), intent(inout) ::vkb0(1:npw)<br><br>10) Error: pw2gw.F90, line 829: Implicit type for DFLOAT<br>replace dfloat by float<br><br>11) Error: wannier_ham.F90, line 288: Implicit type for CDEXP<br>Replace cdexp by exp<br><br>12) Error: molecularpdos.F90, line 335: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>----------------------------------------------------------------------------------------------------------------------------------<br>QE/upftools<br>----------------------------------------------------------------------------------------------------------------------------------<br><br>Note that there is usually more than one occurence of the same issue in each file.<br><br><br>1) Error: cpmd2upf.F90, line 415: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>2) Error: fhi2upf.F90, line 274: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>3) Error: oldcp2upf.F90, line 168: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>4) Error: read_upf_tofile.F90, line 75: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>5) Error: read_upf.F90, line 107: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>6) Error: virtual.F90, line 125: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br><br>7) Error: interpolate.F90, line 113: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br>:%s/,$)/),advance="no"<br><br><br><br></div><div>I now have all the required module that compile with NAG and I can start working on EPW.<br><br></div><div>Cheers, <br><br></div><div>Samuel. <br></div><div><br><br><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 September 2015 at 14:34, Samuel Poncé <span dir="ltr"><<a href="mailto:samuel.pon@gmail.com" target="_blank">samuel.pon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br></div><div><br>I forgot to mention that the intrinsic function 'system' is non-standard in Fortran and should be replace by standard 'execute_command_line' (see <a href="http://www.nag.co.uk/nagware/np/doc/faq.asp" target="_blank">http://www.nag.co.uk/nagware/np/doc/faq.asp</a>)<br><pre></pre>For example in PHonon/FD/fd.f90:<br>    call system('mkdir '//trim(fd_outfile_dir))<br><br></div>should be replace by<br>call execute_command_line('mkdir '//trim(fd_outfile_dir))<br><br></div>Best, <br><br></div>Samuel<br><div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 16 September 2015 at 13:58, Samuel Poncé <span dir="ltr"><<a href="mailto:samuel.pon@gmail.com" target="_blank">samuel.pon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Dear QE-developers, <br><br></div>I've now debug the PH part of QE using NAG. There was only 8 'bugs' therefore I did not do a patch. There should all be safe and minor.<br><br>1) Error: find_mode_sym.F90, line 63: Implicit type for NAT<br>==> swap after definition<br><br>  INTEGER, INTENT(IN) ::             &<br>       nat,         &     ! number of atoms<br>       nsym,        &     ! number of symmetries<br>       flag,        &     ! if 1 u are displacements, if 0 u are eigenvectors<br>       ntyp,        &     ! number of atomic types<br>       ityp(nat),   &     ! the type of each atom<br>       irt(48,nat)        ! the rotated of each atom<br><br>  INTEGER, INTENT(OUT) :: num_rap_mode ( 3 * nat )<br><br>2) Error: io_pattern.F90, line 55: Implicit type for NAT<br>  INTEGER :: nirr, nat, npert(3*nat), iflag<br><br>3) Error: obsolete.F90, line 1737: Implicit type for NAT<br>  INTEGER, INTENT(IN) ::             &<br>       nat,         &<br>       nsym,        &<br>       flag,        &<br>       ntyp,        &<br>       ityp(nat),   &<br>       irt(48,nat)<br><br>  CHARACTER(15), INTENT(OUT) :: name_rap_mode( 3 * nat )<br>  INTEGER, INTENT(OUT) :: num_rap_mode ( 3 * nat )<br>  INTEGER, INTENT(IN) :: nspin_mag<br><br>4) Error: transform_int_so.F90, line 203: Implicit type for NPERT<br>INTEGER :: na, npert<br>COMPLEX(DP) :: int3(nhm,nhm,npert,nat,nspin_mag)<br><br>5) Error: transform_int_nc.F90, line 162: Implicit type for NPERT<br>INTEGER :: na, npert<br>COMPLEX(DP) :: int3(nhm,nhm,npert,nat,nspin_mag)<br><br>6) Error: transform_dbecsum_so.F90, line 61: Implicit type for MODES<br>INTEGER :: na, modes<br>COMPLEX(DP) :: dbecsum_nc( nhm, nhm, nat, nspin, modes)<br>COMPLEX(DP) :: dbecsum( nhm*(nhm+1)/2, nat, nspin_mag, modes)<br><br>7) Error: fqha.F90, line 54: Nonstandard format field $: please use the ADVANCE='NO' specifier instead<br>+ other errors (comma missing):<br>  write (*,"('File containing the dos >>> ')",advance="no")<br>  write (*,"('Output file for the Free energy >>> ')",advance="no")<br>  write (*,"('Temperature (K) >>> ')",advance="no")  <br>  write(*,"('Check: 3*Nat = ',f8.4,5x,'zero-point energy (Ry)=',f15.8)") norm,F0<br><br>8) q2qstar.028286.028286.c:(.text+0x73): undefined reference to `iargc_'<br>q2qstar.028286.028286.c:(.text+0xde): undefined reference to `getarg_'<br><br>Intrinsic functions should not be declared:<br>USE F90_UNIX_ENV,       ONLY : iargc, getarg<br>!  INTEGER :: iargc ! intrinsic function<br><br></div>Best Regards, <br><br></div>Samuel <br><div><div><br></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 15 September 2015 at 21:40, Filippo Spiga <span dir="ltr"><<a href="mailto:spiga.filippo@gmail.com" target="_blank">spiga.filippo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Samuel,<br>
<br>
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...<br>
<br>
This "NAG thing" is top list next Monday.<br>
<br>
--<br>
Mr. Filippo SPIGA, M.Sc.<br>
Quantum ESPRESSO Foundation<br>
<a href="http://fspiga.github.io" rel="noreferrer" target="_blank">http://fspiga.github.io</a> ~ skype: filippo.spiga<br>
<br>
*****<br>
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."<br>
<div><div><br>
> On Sep 15, 2015, at 8:24 PM, Samuel Poncé <<a href="mailto:samuel.pon@gmail.com" target="_blank">samuel.pon@gmail.com</a>> wrote:<br>
><br>
> Dear QE developer,<br>
><br>
> We've recently purchase a NAG licence (latest version) and ran it on QE.<br>
><br>
> Here is a list of changes/bug fix to make NAG happy (we have only solve the error, not<br>
> the warnings).<br>
><br>
> 1) lapack-3.2/make.inc<br>
> Although my environment is set up for nagfor, the configure is not able to modify<br>
> the install/make_lapack.inc correctly. Therefore we have to change manually the following:<br>
> FORTRAN  = nagfor<br>
> OPTS     = -O0 -kind=byte -dcfuns -mismatch<br>
> DRVOPTS  = -O0 -kind=byte -dcfuns -mismatch<br>
> NOOPT    = -O0 -g<br>
> LOADER   = nagfor<br>
> LOADOPTS = -g<br>
><br>
> The same has to be done for install/make_blas.inc<br>
><br>
> 2) The "pthread" option is not accepted by NAG.<br>
> This is not really a bug, just to say we had to remove this option from the make.sys file<br>
> of QE.<br>
><br>
> Additionally, NAG doesn't have a great internal fortran preprocessor,<br>
> so use CPP (from make.sys):<br>
> .f90.o:<br>
>         $(CPP) $(CPPFLAGS) $< -o $*.F90<br>
>         $(MPIF90) $(F90FLAGS) -c $*.F90 -o $*.o<br>
><br>
> Also on the make.sys file, NAG does not support -x options, therefore change<br>
> to. Also notice the -kind=byte option to tell NAG that KIND(4) and KIND(8) is<br>
> the convention in QE.<br>
> The -mismatch option is to make NAG less strict and -dcfuncs  is to allow non standard casting variable like dcmplx<br>
><br>
> CFLAGS         = -O0 $(DFLAGS) $(IFLAGS)<br>
> F90FLAGS       = $(FFLAGS) $(FDFLAGS) $(IFLAGS) $(MODFLAGS)<br>
> FFLAGS         = -O0 -kind=byte -dcfuns -mismatch<br>
><br>
> 3) It would be usefull to have a macro<br>
> !#ifdef NAG<br>
>   USE F90_UNIX_ENV, ONLY : IARGC,GETARG<br>
><br>
> The Wannier90 code does have a ifdef NAG macro.<br>
><br>
> 4) The main corrections are related to<br>
> - change $ which is depreciated by advance="NO"<br>
> - small bug (an interface was defined with optional argument but the subroutine<br>
> called was not)<br>
> - swapping order of variable declaration so that the variable is first declared<br>
> and then used<br>
> - Change X by 1X<br>
><br>
> Join to this email is a patch of the difference (to be applied on the QE-r11723):<br>
><br>
> patch -p1 < diff-nag.patch<br>
><br>
> Note: This only solves the problems to "make pw". Other parts like ph are not done yet.<br>
><br>
> Best Regards,<br>
><br>
> Samuel and Henry<br>
><br>
</div></div>> <diff-nag.patch><br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>