read dvscf error

Post here questions linked with issue while running the EPW code

Moderator: stiwari

jiachen
Posts: 22
Joined: Sun Sep 11, 2016 3:17 am
Affiliation:

read dvscf error

Post by jiachen »

Dear All,

I had an error when reading dvscf file as following
=====================================
from readdvscf : error # 80
../phonon/save/prefix.dvscf_q1 too short, check ecut
======================================
I don't think ecut is an input variable, so I don't know what does check ecut mean in this case. Appreciate you help.

sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: read dvscf error

Post by sponce »

Dear jiachen,

This means that you have done the calculations of the phonon (the way you obtained the dvscf files) with an ecut and
then you are using a different ecut in the scf and nscf calculations before EPW.

Both ecut have to be the same.

Best,

Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com

jiachen
Posts: 22
Joined: Sun Sep 11, 2016 3:17 am
Affiliation:

Re: read dvscf error

Post by jiachen »

Dear Sponce,

Thank you very much! If ecut here means ecutwfc, I am positive that I kept the same ecutwfc in pwscf calculations, phonon calculation after and the nscf calculation for epw after that. I checked data-file.xml to make sure. I noticed some difference in maximum number of G vectors, but epw seems to be fine with that in examples. So, I still don't know what is the issue here.

sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: read dvscf error

Post by sponce »

Hello,

Yes I mean ecutwfc indeed.

This warning just says that the size of the file is too small with respect to what the code expects. There could be multiple reasons
but the most current one is a different ecutwfc.

If that is not the issue, then it could be different byte record length. Did you compute the dvscf file on the same machine and same compilation flags (you need -bytrecl)?

Are you able to correctly do the EPW examples or test-suite?
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com

jiachen
Posts: 22
Joined: Sun Sep 11, 2016 3:17 am
Affiliation:

Re: read dvscf error

Post by jiachen »

Dear Sponce,

Yes, dvscf files were generated by the same machine, and other epw calculations on the same machine are fine. I used simply configure - make, how should I use -bytrecl? BTW, the system I am having issue with is large, more than 100 atoms. Is that going to be a problem?

sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: read dvscf error

Post by sponce »

Hello,

Yes it is very large ...

What is the size of your dvscf files?

You should use the etf_mem = .false. option of EPW to reduce memory but it is still going to be very challenging I think.

Best,

Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com

jiachen
Posts: 22
Joined: Sun Sep 11, 2016 3:17 am
Affiliation:

Re: read dvscf error

Post by jiachen »

thank you for your adivce.

size of dvscf file is 9842MB, is that something just impossible?

sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: read dvscf error

Post by sponce »

Hello,

It should be in principle possible. The largest I ever done was ~50 atoms and dvscf of size 4.1 Gb.

It was doable but expansive and I had to use the high memory nodes on my cluster.

Best,

Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com

jiachen
Posts: 22
Joined: Sun Sep 11, 2016 3:17 am
Affiliation:

Re: read dvscf error

Post by jiachen »

Dear Sponce,

I still hope that I can figure out this problem. So, I did some more tests. For one system, I found if ecutwfc is small, then the code runs fine; however, if it is large, I had this dvscf reading error. Then, I looked into the code raising the error:

Code: Select all

#if ! defined(__NAG)
  ios = fstat ( iudvscf, statb)
  IF (recn * unf_recl .gt. statb(8)) call errore('readdvscf', &
       trim(tempfile)//' too short, check ecut', iudvscf)
#endif


To pin down the error, I let the code print statb(8), which is supposed to be the size of dvscf file. For the large file, I got a negative integer: -1906180096. The actual file size from ll is 2388787200. First of all, a negative statb(8) raises the error. Secondly, 2388787200-(-1906180096) = 2^32. So, I guess when a file size is larger than 2^31, for some systems, statb(8) is negative. I had this dvscf file error on three different machines, so, I guess this is not very rare.

I grep the code, and statb is only used in readdvscf. now my question is, can I assume this error is not important? Appreciate it.

sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: read dvscf error

Post by sponce »

Hello,

You are correct. This is due to the max size of integer kind 4. Since this is linked with QE, I cannot directly change it. However, you can introduce a temporary kind 8 variable like this:

Code: Select all

  INTEGER(kind=8) :: mult_unit

  CALL set_ndnmbr ( 0, iq, 1, nqc, filelab)
  tempfile = trim(dvscf_dir) // trim(prefix) // '.dvscf_q' // filelab
  unf_recl = DIRECT_IO_FACTOR * lrdrho

  mult_unit = unf_recl
  mult_unit = recn * mult_unit

  open  (iudvscf, file = tempfile, form = 'unformatted', &
          access = 'direct', iostat=ios,recl = unf_recl,status='old')
  IF (ios /= 0) call errore ('readdvscf','error opening ' // tempfile, iudvscf)

#if defined(__NAG)
  CALL fstat( iudvscf, statb, errno=ios)
  IF (mult_unit .gt. statb%st_size) call errore('readdvscf', &
       trim(tempfile)//' too short, check ecut', iudvscf)
#endif
#if ! defined(__NAG)
  ios = fstat ( iudvscf, statb)
  !IF (recn * unf_recl .gt. statb(8)) call errore('readdvscf', &
  IF (mult_unit .gt. statb(8)) call errore('readdvscf', &
       trim(tempfile)//' too short, check ecut', iudvscf)
#endif
  !
  read  (iudvscf, rec = recn) dvscf
  close (iudvscf, status = 'keep')
  !
  !
  end subroutine readdvscf


Let me know if this works for you.

Best,

Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com

Post Reply