yambo_rt trapped in the collisions calculation

Questions and doubts about features of real-time Yambo (yamb_rt)

Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano

Post Reply
User avatar
jasonhan0710
Posts: 67
Joined: Wed Dec 23, 2020 6:48 am
Location: China

yambo_rt trapped in the collisions calculation

Post by jasonhan0710 » Tue Oct 14, 2025 3:53 am

Dear Yambo developers,

I have followed the tutorial to calculate the SHG for a 2D material. The calculations are trapped in the collision part. The processor neither quits nor continues, but with the log file

Code: Select all

 <01h-24m> P1-c8: Collisions |#########################               | [062%] 01h-23m(E) 02h-13m(X)
and have no further output or error message.

The job has been running for several days.
The same situation happens for both 5.2 and 5.3 versions. Here is the input file for yambo_rt

Code: Select all

em1s                             # [R][Xs] Statically Screened Interaction
collisions                       # [R] Collisions
rim_cut                          # [R] Coulomb potential
dipoles                          # [R] Oscillator strenghts (or dipoles)
NLogCPUs=1                       # [PARALLEL] Live-timing CPU`s (0 for all)
#DegFix                        # Force the code to impose the energy levels to respect their degeneracy
PAR_def_mode= "balanced"         # [PARALLEL] Default distribution mode ("balanced"/"memory"/"workload"/"KQmemory")
DIP_CPU= "4 16 2"                      # [PARALLEL] CPUs for each role
DIP_ROLEs= "k c v"                    # [PARALLEL] CPUs roles (k,c,v)
DIP_Threads=8                    # [OPENMP/X] Number of threads for dipoles
X_and_IO_CPU= "1 1 4 16 2"                 # [PARALLEL] CPUs for each role
X_and_IO_ROLEs= "q g k c v"               # [PARALLEL] CPUs roles (q,g,k,c,v)
X_and_IO_nCPU_LinAlg_INV=-1      # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)
X_Threads=8                      # [OPENMP/X] Number of threads for response functions
RT_CPU= "16 2 2 2"                       # [PARALLEL] CPUs for each role
RT_ROLEs= "k b q qp"                     # [PARALLEL] CPUs roles (k,b,q,qp)
RT_Threads=8                     # [OPENMP/RT] Number of threads for real-time
RandQpts= 1000000                # [RIM] Number of random q-points in the BZ
RandGvec= 101              RL    # [RIM] Coulomb interaction RS components
CUTGeo= "box z"                  # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere/ws/slab X/Y/Z/XY..
% CUTBox
  0.00000 |  0.00000 | 47.00000 |        # [CUT] [au] Box sides
%
CUTRadius= 0.000000              # [CUT] [au] Sphere/Cylinder radius
CUTCylLen= 0.000000              # [CUT] [au] Cylinder length
CUTwsGvec= 0.700000              # [CUT] WS cutoff: number of G to be modified
Chimod= "HARTREE"                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc
% BndsRnXs
    1 |  330 |                       # [Xs] Polarization function bands
%
NGsBlkXs= 9000                mRy    # [Xs] Response block size
% LongDrXs
 1.000000 | 1.000000 | 0.000000 |        # [Xs] [cc] Electric Field
%
% COLLBands
    32 |  37 |                       # [COLL] Bands for the collisions
%
HXC_Potential= "SEX+HARTREE"     # [SC] SC HXC Potential
HARRLvcs=  3000          mHa    # [HA] Hartree     RL components
EXXRLvcs=  3000          mHa    # [XX] Exchange    RL components
CORRLvcs=  3000          mHa    # [GW] Correlation RL components
Is there anyone who can help me solve this problem?

Thank you!

Jason
Jason Han

Assistant Professor
Department of Physics
National University of Defense Technology
Hunan, China

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

Re: yambo_rt trapped in the collisions calculation

Post by Davide Sangalli » Thu Oct 16, 2025 10:22 pm

Dear Jason,
this is a known issue we have experienced in some cases also in the past.

viewtopic.php?t=2852

As reported at the end of the above link, a quick (although not clean) solution is to kill the run, and re-run it with exactly the same input and options, but reducing the number of MPI tasks. It might hang again, than you kill it and re-run in serial. Each time, the code will read the ndb.collisions file produced and restart from the point where it was interrupted.

The issue is due to bad synchronization of different MPI tasks when doing parallel I/O, which make it hags. Discussion and fix here:
https://gitlab.com/lumen-code/lumen/-/i ... 2533738604

If you do not like the above solution, you can also try the develop branch of the lumen code, that is free from the above mentioned issue. Lumen is a "non official" fork maintained by some of the yambo developers. Tip: `HXC_Potential= "HARTREE+SEX CVONLY"` can be used. It will neglect CC and VV collision.

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/

Post Reply