Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Questions and doubts about features of non linear optic in Yambo (yamb_nl)

Moderators: Davide Sangalli, claudio, myrta gruning

Post Reply
Scat
Posts: 6
Joined: Sat Jul 15, 2023 5:14 pm

Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Scat » Sun Jul 16, 2023 2:10 am

Greeting!

This post is to ask help for an error when calculating SHG. Recently I am trying to use Quantum ESPRESSO + Yambo 5.1.2 to calculate SHG susceptibility for KH2PO4 (KDP) as a benchmark.

My procedure follows the tutorial of https://www.yambo-code.eu/wiki/index.ph ... with_Yambo and https://www.yambo-code.eu/wiki/index.ph ... r_response, and the code was run with the command

Code: Select all

mpirun -np 36 yambo_nl -F yambo.in -J SHG
.

The process succeeded in writing the "dipoles header" but it seems failed Overlap files.

Code: Select all

<02h-10m> [DIP] Writing dipoles header


 <02h-10m> [DIP] Writing overlaps header
[ERROR] STOP signal received while in[04] Dipoles
[ERROR] Writing File ./SHG//ndb.Overlap; Variable  NOT DEFINED; Permission denied
I have checked the file permissions, and the error file "ndb.Overlap" is "-rw-rw-r--", seemingly with no problems. I also found posts reporting similar errors in the forum, but they don't seem to help.

I would highly appreciate it if anyone could offer me any help!

Best regards,
Ming-Yu Guo
Ming-Yu Guo
School of Chemistry
Sun Yat-sen University
Guangzhou, China

User avatar
Davide Sangalli
Posts: 622
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Davide Sangalli » Tue Jul 18, 2023 7:51 am

Dear Ming-Yu Guo,
from the few info provided it is hard to say which is the issue.

This kind of error generally appears when the code tries to write a variable into a database (ndb.Overlap in this case) which was not correctly initialized.
This is done via specific calls to netcdf subroutines inside the source code.

Two suggestion
a) try running on fewer mpi tasks, to see if the issue remains there
b) try compiling the branch bug-fixes (https://github.com/yambo-code/yambo/tree/bug-fixes), to see if the issue was fixed in this more recent version of the code

Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

Scat
Posts: 6
Joined: Sat Jul 15, 2023 5:14 pm

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Scat » Tue Jul 18, 2023 8:30 am

Dear Dr. Sangalli,

Thank you very much for your reply. I will try your suggestions.

Best regards,
M.Y.G.
Ming-Yu Guo
School of Chemistry
Sun Yat-sen University
Guangzhou, China

Scat
Posts: 6
Joined: Sat Jul 15, 2023 5:14 pm

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Scat » Tue Jul 18, 2023 5:26 pm

Davide Sangalli wrote: Tue Jul 18, 2023 7:51 am Dear Ming-Yu Guo,
from the few info provided it is hard to say which is the issue.

This kind of error generally appears when the code tries to write a variable into a database (ndb.Overlap in this case) which was not correctly initialized.
This is done via specific calls to netcdf subroutines inside the source code.

Two suggestion
a) try running on fewer mpi tasks, to see if the issue remains there
b) try compiling the branch bug-fixes (https://github.com/yambo-code/yambo/tree/bug-fixes), to see if the issue was fixed in this more recent version of the code

Best,
D.
Dear Dr. Davide Sangalli

I succeeded in solve the problem by reduce the mpi tasks. Thank you again!

However, I am encountering aother error.

Code: Select all

[ERROR] STOP signal received while in[05] NL Initialization
[ERROR] Use ypp -y to repair the symmetry group and restart Yambo
I followed the tutorial and my file content of ypp.in is

Code: Select all

fixsyms                          # [R] Remove symmetries not consistent with an external perturbation
% Efield1
 1.000000 | 1.000000 | 0.000000 |        # First external Electric Field
%
% Efield2
 0.000000 | 0.000000 | 0.000000 |        # Additional external Electric Field
%
#BField= 0.000000           T     # [MAG] Magnetic field modulus
#Bpsi= 0.000000             deg   # [MAG] Magnetic field psi angle [degree]
#Btheta= 0.000000           deg   # [MAG] Magnetic field theta angle [degree]
#RmAllSymm                     # Remove all symmetries
RmTimeRev                     # Remove Time Reversal
#RmSpaceInv                    # Remove Spatial Inversion
#KeepKGrid                     # Do not expand the k-grid
The file was generated via "ypp -y" command. And "ypp" command and "yambo_nl" command in FixSymm folder were subsequently executed as instructions of the tutorial.

Would you please tell me how to solve this problem? Thank you!

Best regards,
M.Y.G.
Ming-Yu Guo
School of Chemistry
Sun Yat-sen University
Guangzhou, China

User avatar
Davide Sangalli
Posts: 622
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Davide Sangalli » Wed Jul 19, 2023 10:28 am

Please check that the direction of the electric field(s) selected in the input file for yambo_nl is consistent with the direction used in the input file for ypp.

This should be the reason for your warning message.

Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

Scat
Posts: 6
Joined: Sat Jul 15, 2023 5:14 pm

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Scat » Wed Jul 19, 2023 10:44 am

Davide Sangalli wrote: Wed Jul 19, 2023 10:28 am Please check that the direction of the electric field(s) selected in the input file for yambo_nl is consistent with the direction used in the input file for ypp.

This should be the reason for your warning message.

Best,
D.
Dr. Davide Sangalli

Thank you for your reply. But I have checked my input file of yambo_nl, of which contents are

Code: Select all

nloptics
NLstep=0.0100 fs                         # [R] Non-linear spectroscopy
% NLBands
   150 | 250 |                         # [NL] Bands range
%
NLverbosity= "high"              # [NL] Verbosity level (low | high)
NLtime=-1.000000           fs    # [NL] Simulation Time
NLintegrator= "INVINT"           # [NL] Integrator ("EULEREXP/RK2/RK4/RK2EXP/HEUN/INVINT/CRANKNIC")
NLCorrelation= "IPA"             # [NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX")
NLLrcAlpha= 0.000000             # [NL] Long Range Correction
% NLEnRange
 0.200000 | 8.000000 |         eV    # [NL] Energy range
%
NLEnSteps= 1                     # [NL] Energy steps
NLDamping= 0.200000        eV    # [NL] Damping (or dephasing)
Field1_kind= "SOFTSIN"           # [RT Field1] Kind(SIN|RES|ANTIRES|GAUSS|DELTA|QSSIN
% Field1_Dir
 1.000000 | 1.000000 | 0.000000 |        # [RT Field1] Versor
%
To my understanding, the "Field1_Dir" section is consistent with the part:

Code: Select all

% Efield1
 1.000000 | 1.000000 | 0.000000 |        # First external Electric Field
%
in file ypp.in

I have also tried to comment out the Efield2 part in ypp.in, but the same error was given.

So maybe electric field is not the problem. Is there any other possibilities? Thanks!

Best regards,
M.Y.G.
Ming-Yu Guo
School of Chemistry
Sun Yat-sen University
Guangzhou, China

User avatar
claudio
Posts: 470
Joined: Tue Mar 31, 2009 11:33 pm
Location: Marseille
Contact:

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by claudio » Wed Jul 19, 2023 1:43 pm

Deat Ming-Yu Guo

notice that when you run ypp to remove the symmetries,
the new wave-function without symmetries are in a new folder FixSymm.
You have to run calculations there and not in the main folder, that still contain symmetric wave-functions

best
Claudio
Claudio Attaccalite
[CNRS/ Aix-Marseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

Scat
Posts: 6
Joined: Sat Jul 15, 2023 5:14 pm

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Scat » Thu Jul 20, 2023 7:23 am

claudio wrote: Wed Jul 19, 2023 1:43 pm Deat Ming-Yu Guo

notice that when you run ypp to remove the symmetries,
the new wave-function without symmetries are in a new folder FixSymm.
You have to run calculations there and not in the main folder, that still contain symmetric wave-functions

best
Claudio
Dear Claudio,

Thank you for your kind information! This problem is now solved.

I also tried to re-compile the code with Davide's link because the error "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied" still occurs in my other systems. My re-compiling commands are

Code: Select all

make disclean
./configure CC=icc MPICC=mpiicc CXX=icpc F77=ifort FC=ifort --enable-memory-profile --disable-open-mp --enable-iotk --with-blas-libs="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core"  --with-lapack-libs="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core" --with-blacs-libs="-lmkl_blacs_intelmpi_lp64" --with-scalapack-libs="-lmkl_scalapack_lp64"
make all
However, now when I run "ypp" after "ypp -y" to create ypp.in, the error of the following occurred.

Code: Select all

[ERROR] STOP signal received while in[04] K-point grid
[ERROR] Error reading K-point grid, please run setup again!
The procedures were the same as before. I also tried to re-run QE codes, but the error still occurs.

Sorry for my so many questions. Thank you for your patient replies.

Best,
M.Y.G.
Ming-Yu Guo
School of Chemistry
Sun Yat-sen University
Guangzhou, China

User avatar
Davide Sangalli
Posts: 622
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Davide Sangalli » Thu Jul 20, 2023 6:11 pm

It means you need to first run yambo without any input to perform the setup.
After that you should be able to run ypp.

Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

Scat
Posts: 6
Joined: Sat Jul 15, 2023 5:14 pm

Re: Consultation on an error when calculating SHG: "Writing file ndb.Overlap; Variable NOT DEFINED; Permission denied"

Post by Scat » Wed Jul 26, 2023 11:54 am

Dr. Davide Sangalli,

My problems are solved. I am enjoying studying Yambo code now.

Thank you very much!

Cheers,
M.Y.G.
Ming-Yu Guo
School of Chemistry
Sun Yat-sen University
Guangzhou, China

Post Reply