Error in routine readwfc

Post here questions linked with issue while running the EPW code

Moderator: stiwari

Post Reply
epwfonda

Error in routine readwfc

Post by epwfonda »

Dear Friends,

We came up with the following error message:
"Error in routine readwfc (20): error opening wfc file"
when running EPW 5.0 after QE 6.3.

Could you please tell us what could go wrong. Thanks in advance.

More informations on the code and compiler:
QE 6.3 + EPW 5.0
Intel compiler and libraries: 2016.3.210

Input file:
-------------------
--
&inputepw
system_2d = .true.
lpolar = .true.
lifc = .true.
asr_typ = 'simple'
prefix = 'MoS2'
amass(1) = 95.96
amass(2) = 32.065
outdir = './'
dvscf_dir = './save'
filukk = 'MoS2.ukk'

iverbosity = 0
etf_mem = 0

ep_coupling = .true.
elph = .true.
num_iter = 5000
iprint = 2
proj(1) = 'Mo:l=2'
proj(2) = 'S:l=1'
nbndsub = 22
nbndskip = 12
dis_win_min = -10
dis_win_max = 5
dis_froz_min= -5
dis_froz_max= 5


efermi_read = .false.
fermi_energy= 0.0
fsthick = 4 ! eV
eptemp = 300 ! K (same as PRB 76, 165108)
degaussw = 0.01 ! eV
degaussq = 0.05 ! meV

wdata(1) = 'guiding_centres=.true.'
wdata(2) = 'dis_mix_ratio = 0.2'
wdata(3) = 'dis_num_iter = 5000'
wdata(4) = 'conv_window = 3'
wdata(5) = 'trial_step = 1.0'


epbwrite = .true.
epbread = .false.
epwwrite = .true.
epwread = .false.
kmaps = .false.
wannierize = .true.

prtgkk = .true.


nkf1 = 45
nkf2 = 45
nkf3 = 1
nqf1 = 45
nqf2 = 45
nqf3 = 1

nk1 = 14
nk2 = 14
nk3 = 1
nq1 = 7
nq2 = 7
nq3 = 1
/
8 {cartesian}
0.000000000000000E+00 0.000000000000000E+00 0.000000000000000E+00
0.000000000000000E+00 0.164957219768453E+00 0.000000000000000E+00
0.000000000000000E+00 0.329914439536906E+00 0.000000000000000E+00
0.000000000000000E+00 0.494871659305358E+00 0.000000000000000E+00
0.142857142857143E+00 0.247435829652679E+00 0.000000000000000E+00
0.142857142857143E+00 0.412393049421132E+00 0.000000000000000E+00
0.142857142857143E+00 0.577350269189585E+00 0.000000000000000E+00
0.285714285714286E+00 0.494871659305358E+00 0.000000000000000E+00
sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: Error in routine readwfc

Post by sponce »

Hello,

This error is usually if you have a nscf run before the epw run that is incorrect. Make sure the prefix of the calculation is the same.
The grid is homogenous and in the range [0,1[.

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
epwfonda

Re: Error in routine readwfc

Post by epwfonda »

Dear Dr. Samuel:

Thanks for your kind reply.

Using the same input files, we have succeeded in running in our own workstation computer, but failed in
supercomputer. We wonder if epw code is incompatible with some version of compiler or something? Is
there any other reports on similar running problem when running in different compilation environment?
Thank you again, and look forward to your reply.

Best,
Teng


sponce wrote:Hello,

This error is usually if you have a nscf run before the epw run that is incorrect. Make sure the prefix of the calculation is the same.
The grid is homogenous and in the range [0,1[.

Best,
Samuel
piotr
Posts: 5
Joined: Wed Dec 26, 2018 8:57 am
Affiliation:

Re: Error in routine readwfc

Post by piotr »

Teng, I Have the same problem with readwfc at cluster. Have not try if it related to starting nscf calculation before epw, but currently fixed it as follows:

1. Initially the fall was at the call of OPEN statement (readwfc.f90 line 57), seems something is wrong with the unit 'iuwfc', the fix is to change `iuwfc` to some other number (anyway this unit is closed after reading)
2. After this fix readwfc start falling while reading (fall out of file border). I use Intel Compiler 2017, $arhc environment is 'intel64' (have not found something similar in makefile), in my case the DIRECT_IO_FACTOR should be equal 2 (as if $arch is alpha)
3. The same manual change of DIRECT_IO_FACTOR is in readdvscf.f90 line 65


Regards,
Petr
jqhuang
Posts: 12
Joined: Mon Jan 07, 2019 2:24 pm
Affiliation:

Re: Error in routine readwfc

Post by jqhuang »

Hi ,piotr,
Thank you for your reply.
I have tried to recompile with the modified code as you suggest, but i fail with "forrtl: severe (67): input statement requires too much data, unit 10, file ..../graphene/epw/./graphene.wfc12", "forrtl: severe (67): input statement requires too much data, unit 10, file ....graphene/epw/./graphene.wfc14" and so on.
The running falls even before trying to open the wfc files.

As i understand, the unit 'iuwfc' in the original code is OK, because in another file "openfilepw.f90", which is called before the "readwfc.f90" file, it is said " iuwfc = 20
lrwfc = 2 * nbnd * npwx * npol ". So the unit has already be fixed as 20, that's why i get the previous error"Error in routine readwfc (20): error opening wfc file". I should say, in this modified code , i have changed it to 10 (unit 10), but i don't think it affects a lot.


For the DIRECT_IO_FACTOR parameter, i tried to fix it as 2 as what you have done. By the way, I use Intel Compiler 2016.3.210. But as you can see in the above error, it seems not match the data length in the wfc files. I check the source code, it comments :" DIRECT_IO_FACTOR for intel compiler reverted to 8", and after i change it to 8, it can continue run till the previous error emerge.

So i think maybe for some other reasons, such as CPU difference, i didn't make it as you did. Thank you a lot. Could you give me some more suggests, i really appreciate it.
piotr
Posts: 5
Joined: Wed Dec 26, 2018 8:57 am
Affiliation:

Re: Error in routine readwfc

Post by piotr »

Hi, jghuang,
I don't get where did you changed the unit. I ment to change it inside readwfc.f90 in the sense that instead of all iuwfc put some hardcoded number.
As for DIRECT_IO_FACTOR, for sure, it is platform specific, the best way is to use inquire statement, something like this

Code: Select all

inquire(IOLENGTH=direct_io_factor) dummy

Interestingly, in other io routines this way is used.
Post Reply