CSC calculation hanging with solid dmft

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
jchoi110
Newbie
Newbie
Posts: 9
Joined: Fri Aug 15, 2025 4:12 pm

CSC calculation hanging with solid dmft

#1 Post by jchoi110 » Mon Dec 29, 2025 6:57 pm

Hello!

I am currently running the NiO example of DFT+DMFT (https://vasp.at/wiki/DFT%2BDMFT_calcula ... p_tutorial) -- step4 CSC calculation. I am using the unstable branch of TRIQS along with VASP 6.5.0 compiled with hdf5.

I initially had trouble getting the output file to get past entering the main loop where it got stuck and did not produce any thing past the below.

Code: Select all

POSCAR found type information on POSCAR NiO
 POSCAR found :  2 types and       2 ions
 Reading from existing POTCAR
 scaLAPACK will be used
 Reading from existing POTCAR
 LDA part: xc-table for (Slater+CA(PZ)), standard interpolation
 found WAVECAR, reading the header
 POSCAR, INCAR and KPOINTS ok, starting setup
 FFT: planning ... GRIDC
 FFT: planning ... GRID_SOFT
 FFT: planning ... GRID
 reading WAVECAR
 the WAVECAR file was read successfully
 charge-density read from file: NiO
 entering main loop
       N       E                     dE             d eps       ncg     rms          rms(c)

I have tried modifying the VASP source code including:
1. fileio.F line ~1710: Wrapped "reading density matrix" print in IF (IO%IU0>=0)
2. electron.F line ~644: Commented out LPRJ_LDApU call
3. electron.F line ~580: Added flush(17) after STOP_TIMING
4. locproj.F: EFERMI patch already present (line 2940)

but this does not seem to change the hanging issue. I have also tried to run the vasp script instead of the solid dmft mpi script to see if it was vasp that was being the issue; it seems that vasp completes its calculation just fine but the error comes when I try to run solid dmft.

I lastly tried to use n_core = 1 in my config file along with mpirun -np 1 solid_dmft. This does yield the following:

Code: Select all

 POSCAR found type information on POSCAR NiO
 POSCAR found :  2 types and       2 ions
 Reading from existing POTCAR
 scaLAPACK will be used
 Reading from existing POTCAR
 LDA part: xc-table for (Slater+CA(PZ)), standard interpolation
 found WAVECAR, reading the header
 POSCAR, INCAR and KPOINTS ok, starting setup
 FFT: planning ... GRIDC
 FFT: planning ... GRID_SOFT
 FFT: planning ... GRID
 reading WAVECAR
 the WAVECAR file was read successfully
 charge-density read from file: NiO
 entering main loop
       N       E                     dE             d eps       ncg     rms          rms(c)

MPI executable for Vasp: /cm/shared/software/intel/2023.1/mpi/2021.9.0/bin/mpirun
[WARNING]: vaspout.h5 has no locproj, using text files
Read parameters: LOCPROJ
0  ->  {'label': 'dxy', 'isite': 1, 'l': 2, 'm': 0}
1  ->  {'label': 'dyz', 'isite': 1, 'l': 2, 'm': 1}
2  ->  {'label': 'dz2', 'isite': 1, 'l': 2, 'm': 2}
3  ->  {'label': 'dxz', 'isite': 1, 'l': 2, 'm': 3}
4  ->  {'label': 'dx2-y2', 'isite': 1, 'l': 2, 'm': 4}
  Found POSCAR, title line: NiO
  Total number of ions: 2
  Number of types: 2
  Number of ions for each type: [1, 1]

    Total number of k-points: 3375
   Total number of tetrahedra: 20250
[WARNING]: Error reading from EIGENVAL, trying LOCPROJ...
[WARNING]: Error reading Efermi from DOSCAR, trying LOCPROJ...
eigvals from LOCPROJ

  Unorthonormalized density matrices and overlaps:
  Spin: 1
  Site: 1
  Density matrix                                                  Overlap
   1.8209670   0.0000106   0.0000687   0.0000180  -0.0000197       0.9728022  -0.0000007  -0.0000048  -0.0000008  -0.0000003
   0.0000106   1.8209724  -0.0000515   0.0000128   0.0000776      -0.0000007   0.9728019   0.0000022  -0.0000007  -0.0000038
   0.0000687  -0.0000515   1.2392740  -0.0000173  -0.0000902      -0.0000048   0.0000022   0.9714112   0.0000021   0.0000001
   0.0000180   0.0000128  -0.0000173   1.8209648  -0.0000578      -0.0000008  -0.0000007   0.0000021   0.9728013   0.0000040
  -0.0000197   0.0000776  -0.0000902  -0.0000578   1.2393171      -0.0000003  -0.0000038   0.0000001   0.0000040   0.9714115

  Generating 1 shell...

    Shell         : 1
    Orbital l     : 2
    Number of ions: 1
    Dimension     : 5
    Correlated    : True
    Ion sort      : [1]
Density matrix:
  Shell 1
Site diag : True
    Site 1
     1.9523437     0.0000057     0.0000798     0.0000138    -0.0000213
     0.0000057     1.9523495    -0.0000584     0.0000080     0.0000886
     0.0000798    -0.0000584     1.2964535    -0.0000214    -0.0000957
     0.0000138     0.0000080    -0.0000214     1.9523413    -0.0000672
    -0.0000213     0.0000886    -0.0000957    -0.0000672     1.2964993
      trace:  8.449987235097787

  Impurity density: 8.449987235097787

Overlap:
  Site 1
[[ 1.  0.  0. -0. -0.]
 [ 0.  1. -0.  0.  0.]
 [ 0. -0.  1. -0. -0.]
 [-0.  0. -0.  1.  0.]
 [-0.  0. -0.  0.  1.]]

Local Hamiltonian:
  Shell 1
    Site 1 (real | complex part)
    -1.1373809    -0.0000468     0.0000057    -0.0000453     0.0000002 |     0.0000000     0.0000000     0.0000000     0.0000000     0.0000000
    -0.0000468    -1.1373813    -0.0000024    -0.0000463     0.0000044 |    -0.0000000    -0.0000000     0.0000000    -0.0000000    -0.0000000
     0.0000057    -0.0000024    -1.0085510    -0.0000032     0.0000019 |    -0.0000000    -0.0000000     0.0000000     0.0000000    -0.0000000
    -0.0000453    -0.0000463    -0.0000032    -1.1373810    -0.0000051 |    -0.0000000     0.0000000    -0.0000000     0.0000000     0.0000000
     0.0000002     0.0000044     0.0000019    -0.0000051    -1.0085519 |    -0.0000000     0.0000000     0.0000000    -0.0000000    -0.0000000

Evaluating DOS...
  Shell 1
    Total number of states: [[[1.952807   1.95285502 1.99551039 1.95278129 1.99553134]]]
  Storing ctrl-file...
  Storing PLO-group file 'vasp.pg1'...
  Density within window: 13.999999999856408
Reading input from vasp.ctrl...
{
    "ngroups": 1,
    "nk": 3375,
    "nkibz": 3375,
    "ns": 1,
    "kvec1": [
        -0.23980815347721823,
        0.23980815347721823,
        0.23980815347721823
    ],
    "kvec2": [
        0.23980815347721823,
        -0.23980815347721823,
        0.23980815347721823
    ],
    "kvec3": [
        0.23980815347721823,
        0.23980815347721823,
        -0.23980815347721823
    ],
    "nc_flag": 0
}

  No. of inequivalent shells: 1
  solid_dmft: DFT cycle took    166.857 seconds

but with an error :

Code: Select all

  File "/g1/hdd/gchoi/triqs-build/unstable/lib/python3.9/site-packages/solid_dmft/dft_managers/vasp_manager.py", line 204, in read_dft_energy
    raise ValueError("Could not read DFT energy from OSZICAR or OUTCAR")
ValueError: Could not read DFT energy from OSZICAR or OUTCAR

I also wanted to mention that I get the output files including vasp.ctrl,vaspout.h5,vasp.pg1, etc but not any gamma file..

I would truly appreciate help on this!

Thank you.

Gwyn


pedro_melo
Global Moderator
Global Moderator
Posts: 217
Joined: Thu Nov 03, 2022 1:03 pm

Re: CSC calculation hanging with solid dmft

#2 Post by pedro_melo » Tue Dec 30, 2025 11:02 am

Dear Gwyn,

From what you wrote this seems to be an issue with solid_dmft, not with VASP. We do not develop for them, so you might want to contact their team. I will try to reproduce your issue to be sure whether or not VASP is the responsible, but I must install TRIQS first, so please have some patience.

Kind regards,
Pedro


jchoi110
Newbie
Newbie
Posts: 9
Joined: Fri Aug 15, 2025 4:12 pm

Re: CSC calculation hanging with solid dmft

#3 Post by jchoi110 » Mon Jan 05, 2026 2:08 am

Hi Pedro,

Thank you for your response. I got it sorted through some more modifications to VASP!

Gwyn


pedro_melo
Global Moderator
Global Moderator
Posts: 217
Joined: Thu Nov 03, 2022 1:03 pm

Re: CSC calculation hanging with solid dmft

#4 Post by pedro_melo » Mon Jan 05, 2026 8:31 am

Dear Gwyn,

Thank you for your message. Would you mind sharing your modifications?

Kind regards,
Pedro


ahampel
Global Moderator
Global Moderator
Posts: 197
Joined: Tue Feb 16, 2016 11:41 am

Re: CSC calculation hanging with solid dmft

#5 Post by ahampel » Mon Jan 05, 2026 8:54 am

Hi Gwyn Hi Pedro,

sry for jumping in here, but I did not notice this issue. Gwyn has another open topic: https://vasp.at/forum/viewtopic.php?t=20466 where we tried to debug this as well.

Actually the problem you are facing now can be circumvented by using the dft_tools unstable branch together with the hdf5 interface in VASP 6.5.0 . Then no modifications of VASP are necessary.

However, if you want to really use the text based interface between triqs and VASP you need to do the modifications you described. But as you found there might be still another issue. I also noticed that sometimes the OSCIZAR file is not correctly written to disk when ICHARG=5 calculations are running. This is exactly the problem you are facing here: ValueError: Could not read DFT energy from OSZICAR or OUTCAR . If you did overcome this problem please let me know. I could not figure out why sometimes the buffer for the OSCIAR is not correctly flushed and I was not 100% reproducible.

Best,
Alex


jchoi110
Newbie
Newbie
Posts: 9
Joined: Fri Aug 15, 2025 4:12 pm

Re: CSC calculation hanging with solid dmft

#6 Post by jchoi110 » Wed Jan 07, 2026 7:20 pm

Hello everyone,

I wanted to update here finally that what worked for me was to compile the dft_tools unstable branch with the hdf5 interface in VASP 6.5.0 as Alex has commented. Along with that I added another suppression logic

Code: Select all

INQUIRE(FILE='vasp.suppress_projs', EXIST=LSUPPRESS_PROJS_EXISTS)
IF (.NOT. LSUPPRESS_PROJS_EXISTS) THEN
   ! ... projector writing code ...
ENDIF

in electron.F of VASP (Also including the modifications mentioned in my first post).

I made some additions in INCAR as well :

Code: Select all

SYSTEM  = NiO

 ALGO = Normal
 ISYM = -1
 ISMEAR = -5
 SIGMA = 0.01
 EDIFF = 1.E-10
 ISTART = 1
 NELM = 100
 NELMIN = 4
 NELMDL = -5

 AMIX    = 0.2
 BMIX    = 0.0001
 AMIX_MAG = 0.8
 BMIX_MAG = 0.0001
 ICHARG  = 5

 LSYNCH5 = .TRUE.


 NBANDS = 32
 LORBIT = 14
 LMAXMIX = 4
 EMIN = -6
 EMAX = 18
 NEDOS = 5001

 # project to Ni d and O p states
 LORBIT = 14
 LOCPROJ = 1 : d : Pr
~

I need to test out if any of these aren't completely necessary to get the CSC calculation to work, but this solved it for me ..

Sincerely,

Gwyn


ahampel
Global Moderator
Global Moderator
Posts: 197
Joined: Tue Feb 16, 2016 11:41 am

Re: CSC calculation hanging with solid dmft

#7 Post by ahampel » Thu Jan 08, 2026 10:25 am

Hi Gwyn,

thank you for reporting back. The flag LSYNCH5 = .TRUE. is very much necessary. I may have forgotten to mention this more clearly but this one is very important. Apart from that I do not see any specific flag that would be necessary. The vasp.suppress_projs changes should not be strictly necessary I believe. Maybe you can confirm otherwise I need to recheck things. Happy that it works now for you!

Best,
Alex


Post Reply