About error in p2y

Come here to discuss issues with using the p2y converter from PWscf to Yambo, how to best run PWscf , link with the IOTK library, and so on.

Moderators: andrea.ferretti, Conor Hogan

Forum rules
Before posting, make sure to first read carefully all the detailed steps and suggestions given in the main documentation:
https://www.yambo-code.eu/learn/#learn-forum
Post Reply
Bo Peng
Posts: 9
Joined: Tue Feb 04, 2020 5:47 pm

About error in p2y

Post by Bo Peng » Wed Feb 05, 2020 1:55 pm

Dear Yambo team,

I received an error message when running p2y (attached below). I think that is related to the format of my pseudopotential (I tried both PBE and PBEsol fr-nc pp from Pseudo Dojo). Could you please help me with that? Thank you very much and I am looking forward to your reply!


Best regards,
Bo

error message:

Code: Select all

<24s> == DB3 (PseudoPotential) ...########################################################################################################################
# WARNING: there are pending errors
# PENDING ERROR (ierr=1)
# ERROR IN: iotk_open_read (iotk_files.F:663)
# CVS Revision: 1.20
# unit
file=.//data-file.xml
binary=F
iostat=29
# PENDING ERROR (ierr=2)
# ERROR IN: iotk_scan_empty (iotk_scan.F:440)
# CVS Revision: 1.23
# Tag not found
namel=fft_grid
# PENDING ERROR (ierr=3)
# ERROR IN: iotk_scan_empty (iotk_scan.F:440)
# CVS Revision: 1.23
# Tag not found
namel=fft_smooth
# FROM IOTK LIBRARY, VERSION 1.2.0
# UNRECOVERABLE ERROR (ierr=4)
# ERROR IN: iotk_getline (iotk_scan.F:1010)
# CVS Revision: 1.23
#
iostat=-1
# ERROR IN: iotk_scan_tag (iotk_scan.F:745)
# CVS Revision: 1.23
# ERROR IN: iotk_scan (iotk_scan.F:934)
# CVS Revision: 1.23
# ERROR IN: iotk_scan_begin (iotk_scan.F:94)
# CVS Revision: 1.23
########################################################################################################################
Bo Peng
PhD student in Physics
Cavendish Laboratory, University of Cambridge, UK

andrea.ferretti
Posts: 206
Joined: Fri Jan 31, 2014 11:13 am

Re: About error in p2y

Post by andrea.ferretti » Wed Feb 05, 2020 2:10 pm

Dear Bo,

this error is typically related to a mistake in the parsing of the pseudopot file.
Which version of yambo are you using ? Recently we have fixed a similar problem with v4.5.
If you are using an older version, perhaps 4.5 already fixes the problem.

Otherwise, can you post the pseudopot you are using ? (ideally also a scf input file that generates the problematic dft data).

best
Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it

Bo Peng
Posts: 9
Joined: Tue Feb 04, 2020 5:47 pm

Re: About error in p2y

Post by Bo Peng » Wed Feb 05, 2020 5:43 pm

Dear Andrea,

Thank you for your kind help! In fact I used Yambo 4.5. Please find my pseudopotential (and input) below. Thanks once again!


Cheers,
Bo
You do not have the required permissions to view the files attached to this post.
Bo Peng
PhD student in Physics
Cavendish Laboratory, University of Cambridge, UK

Bo Peng
Posts: 9
Joined: Tue Feb 04, 2020 5:47 pm

Re: About error in p2y

Post by Bo Peng » Fri Feb 07, 2020 12:52 pm

Dear Andrea,

I think in the input file the encut and k-sampling is very large. Please feel free to reduce them. Sorry I just realized that. Thank you very much!


Best regards,
Bo
Bo Peng
PhD student in Physics
Cavendish Laboratory, University of Cambridge, UK

andrea.ferretti
Posts: 206
Joined: Fri Jan 31, 2014 11:13 am

Re: About error in p2y

Post by andrea.ferretti » Fri Feb 07, 2020 4:08 pm

Thanks,
I was indeed able to reproduce the problem. Looking now into it.
Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it

andrea.ferretti
Posts: 206
Joined: Fri Jan 31, 2014 11:13 am

Re: About error in p2y

Post by andrea.ferretti » Fri Feb 07, 2020 6:09 pm

Dear Bo,

while version 4.5.0 compiled from the release tarball shows the problem, a fresh clone of the yambo-gpl repository
(which should be pretty identical) doesn't.
Moreover, in both cases (including the one that fails), all files are properly written in the SAVE directory, and then yambo initializes the DBs correctly.

I think the reading error that gives the problem is probably related to the closing of some UPF files and seems to be harmless (still to be investigated since should clearly not appear).

Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it

elena.mol
Posts: 17
Joined: Mon Oct 04, 2010 10:04 am

Re: About error in p2y

Post by elena.mol » Tue Mar 07, 2023 10:24 am

Hello,
I have just encountered a p2y error similar to the one found by Bo Peng: also in my case it looks like a problem in parsing the pseudopotential files, but in my case it is not completely harmless: p2y does not create the ns.kb_pp* files in the SAVE folder.

More in detail:
I am using yambo 5.1.1. on CINECA Marconi100, and I find a p2y error when in the QE run I use norm-conserving TM pseudopotentials from the pslibrary.1.0.0.

The last lines of the l_p2y file are like this:
<31s> ... Database done
<31s> == DB2 (wavefunctions) ...
<31s> [p2y] WF I/O | | [000%] --(E) --(X)
<35s> [p2y] WF I/O |########################################| [100%] 03s(E) 03s(X)

i.e. p2y stops when it should read the PsP.


The output of the slurm batch script I use to submit the p2y run gives this error:
# WARNING: there are pending errors
# PENDING ERROR (ierr=1)
# ERROR IN: iotk_open_read (iotk_files.spp:487)
# CVS Revision: 1.20
# unit
file=./data-file.xml
binary=F
iostat=209
# PENDING ERROR (ierr=2)
# ERROR IN: iotk_scan_empty (iotk_scan.spp:364)
# CVS Revision: 1.23
# Tag not found
namel=fft_grid
# PENDING ERROR (ierr=3)
# ERROR IN: iotk_scan_empty (iotk_scan.spp:364)
# CVS Revision: 1.23
# Tag not found
namel=fft_smooth
# FROM IOTK LIBRARY, VERSION 1.2.0
# UNRECOVERABLE ERROR (ierr=4)
# ERROR IN: iotk_tag_parse (iotk_misc.spp:625)
# CVS Revision: 1.39
# Wrong syntax in tag
tag=![CDATA[ Generated using "atomic" code by A. Dal Corso v.6.6 Author: TM Generation date: 28Feb2023 Pseudopotential
# ERROR IN: iotk_scan (iotk_scan.spp:719)
# CVS Revision: 1.23
# direction
control=2
# ERROR IN: iotk_scan_end (iotk_scan.spp:211)
# CVS Revision: 1.23
# foundl

The p2y run has created a SAVE folder, with ns.db1, ns.wf* files, but without ns.kb_pp* files.
Then I have run the yambo setup and it runs correctly, creating the ndb.gops and ndb.kindx files in the SAVE,
but then an Independent Particle optics run creates all the expected files (including spectra), but it gives the following warning in the report file:
[WARNING] [r,Vnl^pseudo] not included in position and velocity dipoles



The system is bulk nickel oxide, the QE scf run is with Hubbard correction, but I have removed the Hubbard-related lines in the data-file-schema.xml (and previously verified in other tests that yambo optics runs with Covariant Dipoles, which should somehow take into account the otherwise missing Hubbard part, yield spectra similar to runs with G space dipoles), and the same system runs smoothly when using different NC PsP, i.e. those from the DoJo library.

I am attaching a .zip containing the following files:
bulk_NiO_4L_unitcell_EM_feb2023.scf.in --> QE scf input
Ni.pbe-n-nc.UPF --> the PsP used for Ni (the one for O is of the same type and format)
l_p2y --> p2y log file
yambo_IP_test.in --> yambo IP optics input
r-test_IP_optics_dipoles_bse --> report file of the IP run


Is there a way to allow yambo to correctly read the above-mentioned pseudpotentials, e.g. by somehow creating them with a different format (if the format is the problem...) ...?
Thanks a lot in advance
Best
Elena Molteni
You do not have the required permissions to view the files attached to this post.

User avatar
Daniele Varsano
Posts: 3773
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: About error in p2y

Post by Daniele Varsano » Wed Mar 08, 2023 7:53 am

Dear Elena,
thanks for reporting, most probably we need to reproduce your error.
1. Can you check if the error is triggered by the hacking of the data-file-schema.xml, ie trying to generate the SAVE with the original file?
2. Please note that if you are going to use the Covariant you do not need the ns.kb_pp* files.

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

elena.mol
Posts: 17
Joined: Mon Oct 04, 2010 10:04 am

Re: About error in p2y

Post by elena.mol » Wed Mar 08, 2023 3:46 pm

Dear Daniele,
thanks for your reply.
in the meantime I have realized the problem in my case was less serious than I had thought: it was merely a format problem of the PsP files, and, more importantly, it could be solved by performing very small changes to the PsP files.

I report here some details, in case this may be helpful for other users:
Indeed the pseudopotential files I had generated by using the pslibrary 1.0.0 "make_ps" script were in .html format, i.e. their first part was like this:

<?xml version="1.0" encoding="UTF-8"?>
<UPF version="2.0.1">
<PP_INFO><![CDATA[
Generated using "atomic" code by A. Dal Corso v.6.6
Author: TM
(.....)
]]>
<PP_INPUTFILE><![CDATA[
(...)

]]></PP_INPUTFILE>



By simply removing the 1st line ( <?xml version="1.0" encoding="UTF-8"?>) and the other parts highlighted in bold above in the pseudopotential files (Ni.pbe-n-nc.UPF and O.pbe-nc.UPF in my case) written by the QE run in my /tmp/*save folder, i.e. the folder where I then launch p2y and all yambo runs, thus making these files assume the same format as "standard" PsP files present e.g. in the PsP pages of the QuantumEspresso site, p2y succeeded in reading the pseudopotentials (no error messages, no warning about the missing [r,Vnl] term in the report files of subsequent optics runs, etc).

I am attaching a .zip which contains the original PsP file, not recognized by p2y (Ni.pbe-n-nc.UPF_BACK) and the "corrected" one (Ni.pbe-n-nc.UPF) for the case of nickel;
I made the same changes in the oxygen PsP file.


Thanks,
Best,
Elena

Elena Molteni
Dipartimento di Fisica "Aldo Pontremoli''
Universita' degli Studi di Milano
Via Celoria 16, 20133 Milano, Italy
You do not have the required permissions to view the files attached to this post.

User avatar
Daniele Varsano
Posts: 3773
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: About error in p2y

Post by Daniele Varsano » Wed Mar 08, 2023 5:40 pm

Many thanks!!

Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Post Reply