Inconsistency in the directory where the binary files are written

Post here questions linked with issue while running the EPW code

Moderators: hlee, hlee

Post Reply
jaemo.lihm
Posts: 4
Joined: Tue Jun 16, 2020 3:47 am
Affiliation: Seoul National University

Inconsistency in the directory where the binary files are written

Post by jaemo.lihm »

Dear developers,

I would like to report an inconsistency in the directory where the binary files are written.

In ephwann_shuffle, the prefix.epmatwe1 file is opened as

Code: Select all

CALL diropn(iunepmatwe, 'epmatwe', lrepmatw, exst)
By default, diropn opens prefix.epmatwe1 file at tmp_dir, which is set by the input parameter outdir.
However, in bloch2wan.f90, the prefix.epmatwe1 files are read from the current directory:

Code: Select all

filint = TRIM(prefix)//'.epmatwe1'
This causes error when outdir is not the current directory.

The error can be reproduced by running the epw_base test, with outdir = './tmp/' and etf_mem = 1 added in epw1.in. The error is

Code: Select all

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine ephbloch2wanp_mem (1):
     error in MPI_FILE_OPEN epmatwe
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Before running epw.x, diam.save and diam.xml should be moved from ./ to ./tmp/.
(Note that outdir for scf.x or ph.x should not be changed, because pp.py assumes outdir == './'. I personally use a modified version of pp.py.)

It seems that a similar problem exists for the prefix.epmatwp files, but I am not sure about this one.

It would be good to unify the directory where all the large binary files are written/read, maybe as tmp_dir.
I might be overlooking some MPI-IO related problems. Then, at least the files should be written and read from the same directory to prevent crashes.

Regards,
Jae-Mo

hlee
Posts: 364
Joined: Thu Aug 03, 2017 12:24 pm
Affiliation: The University of Texas at Austin

Re: Inconsistency in the directory where the binary files are written

Post by hlee »

Dear Jae-Mo:

Thank you for reporting this bug.

You are right; TRIM(tmp_dir) should be added as in EPW/src/io_eliashberg.f90.

Code: Select all

      ! read frequencies from file
      dirname = TRIM(tmp_dir) // TRIM(prefix) // '.ephmat'
      filfreq = TRIM(dirname) // '/' // 'freq'
Sincerely,

H. Lee

wuyu
Posts: 4
Joined: Wed May 04, 2022 9:18 pm
Affiliation: phd student

Re: Inconsistency in the directory where the binary files are written

Post by wuyu »

I got a similar problem when i running epw.in. Could you tell me how to deal with this problem?

Error in routine ephbloch2wanp_mem (1):
error in MPI_FILE_READ_AT

hlee
Posts: 364
Joined: Thu Aug 03, 2017 12:24 pm
Affiliation: The University of Texas at Austin

Re: Inconsistency in the directory where the binary files are written

Post by hlee »

Dear wuyu:

Could you provide us with your full epw.in and epw.out?

Sincerely,

H. Lee

Post Reply