abinit / abinit_issues

Bug reports and known issues for Abinit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getwfq_filepath ignored by eph driver

tyst3273 opened this issue · comments

System

  • Abinit version = 9.4.1
  • OS version and architecture = Ubuntu 20.04, x86-64
  • Fortran compiler = gnu
  • MPI implementation (if any) = openmpi-3
  • Extra libraries activated at compile-time (e.g. mkl, fftw3, scalapack ....) = mkl, scalapack, dfti, netcdf, wannier90

Summary

When performing electron-phonon calculations using opt_driver = 7, the variable getwfq_filepath is overwritten and the code defaults to using wfk0_path (i.e. the WFK file). The filepath variable is read and printed to the log file, but then overwritten later. If getwfq or irdwfq are used, the code uses the correct WFQ file.

Error message (if any)

none

Steps to reproduce

Perform an electron-phonon calculation with opt_driver = 7 and eph_task = 2 or -2. Use getwfq_filepath to specify the WFQ file. Make sure getwfq and irdwfq == 0 in the input file.

Suggested solution (if any)

I fixed the problem and recompiled on my PC. It works as expected now, but I don't know if there are side effects... probably not. It's a simple fix.

The problem is in m_eph_driver.F90, line 247:
"use_wfq = (dtset%irdwfq /= 0 .or. dtset%getwfq /= 0 .and. dtset%eph_frohlichm /= 1)"

This only checks if irdwfq or getwfq are non-zero. If getwfq_filepath is used, use_wfq == .false. and wfq_path is set to wfq_path = wfk0_path.

I fixed the issue by replacing line 247 with:
" use_wfq = (dtset%irdwfq /= 0 .or. dtset%getwfq /= 0 .or. &
dtset%getwfq_filepath /= ABI_NOFILE .and. dtset%eph_frohlichm /= 1)"

This seems to work and I have been able to use the variable as expected.