Bug report psio

This is the log file, the compiler was asking me to report this bug


    -----------------------------------------------------------------------
          Psi4: An Open-Source Ab Initio Electronic Structure Package
                               Psi4 1.9.1 release

                         Git: Rev {HEAD} f53cdd7 


    D. G. A. Smith, L. A. Burns, A. C. Simmonett, R. M. Parrish,
    M. C. Schieber, R. Galvelis, P. Kraus, H. Kruse, R. Di Remigio,
    A. Alenaizan, A. M. James, S. Lehtola, J. P. Misiewicz, M. Scheurer,
    R. A. Shaw, J. B. Schriber, Y. Xie, Z. L. Glick, D. A. Sirianni,
    J. S. O'Brien, J. M. Waldrop, A. Kumar, E. G. Hohenstein,
    B. P. Pritchard, B. R. Brooks, H. F. Schaefer III, A. Yu. Sokolov,
    K. Patkowski, A. E. DePrince III, U. Bozkaya, R. A. King,
    F. A. Evangelista, J. M. Turney, T. D. Crawford, C. D. Sherrill,
    J. Chem. Phys. 152(18) 184108 (2020). https://doi.org/10.1063/5.0006002

                            Additional Code Authors
    E. T. Seidl, C. L. Janssen, E. F. Valeev, M. L. Leininger,
    J. F. Gonthier, R. M. Richard, H. R. McAlexander, M. Saitow, X. Wang,
    P. Verma, M. H. Lechner, A. Jiang, S. Behnle, A. G. Heide,
    M. F. Herbst, and D. L. Poole

             Previous Authors, Complete List of Code Contributors,
                       and Citations for Specific Modules
    https://github.com/psi4/psi4/blob/master/codemeta.json
    https://github.com/psi4/psi4/graphs/contributors
    http://psicode.org/psi4manual/master/introduction.html#citing-psifour

    -----------------------------------------------------------------------


    Psi4 started on: Thursday, 06 March 2025 02:06PM

    Process ID: 8706
    Host:       suri
    PSIDATADIR: /home/suri/psi4/build/stage/share/psi4
    Memory:     500.0 MiB
    Threads:    1
    
  ==> Input File <==

--------------------------------------------------------------------------
 # fragment:           1
set {
basis aug-cc-pVTZ    
reference rhf
maxiter 100 }
molecule {
    0  1
    units ang
   F01 -0.0020000001  1.2539000511 -0.4093999863
   C01  0.0000000000  0.0000000000  0.0002000000
   F02 -1.0951999426 -0.2369000018  0.6962000132
   F03  1.0582000017 -0.2133000046  0.7581999898
   F04  0.0390000008 -0.8036999702 -1.0450999737
}
[e_tar, wfn] = energy('ccsd',return_wfn=True)
print('e_tar =', e_tar)2590
molden(wfn, 'target.molden')
clean()
set {
basis aug-cc-pVTZ    
reference rhf
maxiter 100 }
molecule {
    0  1
    units ang
    symmetry C1
 
   F01 -0.0020000001  1.2539000511 -0.4093999863
   C01  0.0000000000  0.0000000000  0.0002000000
   F02 -1.0951999426 -0.2369000018  0.6962000132
   F03  1.0582000017 -0.2133000046  0.7581999898
   F04  0.0390000008 -0.8036999702 -1.0450999737
}
[e_tar, wfn] = energy('ccsd',return_wfn=True)
print('e_tar =', e_tar)
wfn.basisset().print_detail_out()
orbs=wfn.Ca()
orbs.add(wfn.Cb())
kin=core.MintsHelper(wfn.basisset()).ao_kinetic()
kin.transform(orbs)
kin.print_out()
properties('ccsd', properties=['polarizability'])
clean()
set {
basis aug-cc-pVTZ    
reference uhf
maxiter 100 }
molecule {
    1  2
    units ang
   F01 -0.0020000001  1.2539000511 -0.4093999863
   C01  0.0000000000  0.0000000000  0.0002000000
   F02 -1.0951999426 -0.2369000018  0.6962000132
   F03  1.0582000017 -0.2133000046  0.7581999898
   F04  0.0390000008 -0.8036999702 -1.0450999737
}
e_par = energy('ccsd')
print('e_par =', e_par)
#e_par is the parent ion energy
clean()
  
set {
basis aug-cc-pVTZ    
reference uhf
maxiter 100 }
molecule {
    0  1
    units ang
   F01  -0.0020000001  1.2539000511 -0.4093999863
   C01   0.0000000000  0.0000000000  0.0002000000
   F02  -1.0951999426 -0.2369000018  0.6962000132
   F03   1.0582000017 -0.2133000046  0.7581999898
   F04   0.0390000008 -0.8036999702 -1.0450999737
}
e_neu = energy('ccsd')
print('e_neu =', e_neu)
#e_neu is 1 neutral fragment energy
clean()
  
#for vertical ionisation energy, no need for BSSE
toev = 27.2114079527
better_de = (e_neu - e_par)*toev
print_out(f' SETTING BETTER_DE      =       {str(better_de)}')
clean()
--------------------------------------------------------------------------

Scratch directory: /tmp/
   => Libint2 <=

    Primary   basis highest AM E, G, H:  6, 6, 3
    Auxiliary basis highest AM E, G, H:  7, 7, 4
    Onebody   basis highest AM E, G, H:  -, -, -
    Solid Harmonics ordering:            Gaussian

*** tstart() called on suri
*** at Thu Mar  6 14:06:05 2025

   => Loading Basis Set <=

    Name: AUG-CC-PVTZ
    Role: ORBITAL
    Keyword: BASIS
    atoms 1, 3-5 entry F          line   377 file /home/suri/psi4/build/stage/share/psi4/basis/aug-cc-pvtz.gbs 
    atoms 2      entry C          line   239 file /home/suri/psi4/build/stage/share/psi4/basis/aug-cc-pvtz.gbs 


         ---------------------------------------------------------
                                   SCF
               by Justin Turney, Rob Parrish, Andy Simmonett
                          and Daniel G. A. Smith
                              RHF Reference
                        1 Threads,    500 MiB Core
         ---------------------------------------------------------

  ==> Geometry <==

    Molecular point group: c1
    Full point group: C1

    Geometry (in Angstrom), charge = 0, multiplicity = 1:

       Center              X                  Y                   Z               Mass       
    ------------   -----------------  -----------------  -----------------  -----------------
         F           -0.002000013011     1.253900035015    -0.409405679629    18.998403162730
         C           -0.000000012911    -0.000000016085     0.000194306671    12.000000000000
         F           -1.095199955511    -0.236900017885     0.696194319871    18.998403162730
         F            1.058199988789    -0.213300020685     0.758194296471    18.998403162730
         F            0.038999987889    -0.803699986285    -1.045105667029    18.998403162730

  Running in c1 symmetry.

  Rotational constants: A =      0.19127  B =      0.19122  C =      0.19121 [cm^-1]
  Rotational constants: A =   5733.98707  B =   5732.77673  C =   5732.25178 [MHz]
  Nuclear repulsion =  206.045258285600340

  Charge       = 0
  Multiplicity = 1
  Electrons    = 42
  Nalpha       = 21
  Nbeta        = 21

  ==> Algorithm <==

  SCF Algorithm Type is PK.
  DIIS enabled.
  MOM disabled.
  Fractional occupation disabled.
  Guess Type is SAD.
  Energy threshold   = 1.00e-08
  Density threshold  = 1.00e-08
  Integral threshold = 1.00e-12

  ==> Primary Basis <==

  Basis Set: AUG-CC-PVTZ
    Blend: AUG-CC-PVTZ
    Number of shells: 70
    Number of basis functions: 230
    Number of Cartesian functions: 275
    Spherical Harmonics?: true
    Max angular momentum: 3

  ==> Integral Setup <==

  Using integral reordering PK algorithm.
  Sizing the integral batches needed.
  Building batch lookup table.
   Calculation information:
      Number of atoms:                   5
      Number of AO shells:              70
      Number of primitives:            150
      Number of atomic orbitals:       275
      Number of basis functions:       230

      Integral cutoff                 1.00e-12
      Number of threads:                 1

	Batch   1 pq = [       0,    9405] index = [             0,44231715] size =     44231715
	Batch   2 pq = [    9405,   13301] index = [      44231715,88464951] size =     44233236
	Batch   3 pq = [   13301,   16290] index = [      88464951,132690195] size =     44225244
	Batch   4 pq = [   16290,   18810] index = [     132690195,176917455] size =     44227260
	Batch   5 pq = [   18810,   21030] index = [     176917455,221140965] size =     44223510
	Batch   6 pq = [   21030,   23037] index = [     221140965,265363203] size =     44222238
	Batch   7 pq = [   23037,   24883] index = [     265363203,309594286] size =     44231083
	Batch   8 pq = [   24883,   26565] index = [     309594286,352862895] size =     43268609
  Task number: 32
  Buffer size: 11059200
  Buffer per thread: 2
  We computed 5828162 shell quartets total.
  Whereas there are 3088855 unique shell quartets.
    88.68 percent of shell quartets recomputed by reordering.

  ==> DiskJK: Disk-Based J/K Matrices <==

    J tasked:                  Yes
    K tasked:                  Yes
    wK tasked:                  No
    Memory [MiB]:              375
    Schwarz Cutoff:          1E-12

    OpenMP threads:              1

  Minimum eigenvalue in the overlap matrix is 2.5203803675E-04.
  Reciprocal condition number of the overlap matrix is 2.9216308522E-05.
    Using symmetric orthogonalization.

  ==> Pre-Iterations <==

  SCF Guess: Superposition of Atomic Densities via on-the-fly atomic UHF (no occupation information).

   -------------------------
    Irrep   Nso     Nmo    
   -------------------------
     A        230     230 
   -------------------------
    Total     230     230
   -------------------------

  ==> Iterations <==

                        Total Energy        Delta E     RMS |[F,P]|

   @RHF iter SAD:  -435.26871074058408   -4.35269e+02   0.00000e+00 
   @RHF iter   1:  -435.68553676809665   -4.16826e-01   2.73979e-03 DIIS/ADIIS
   @RHF iter   2:  -435.77612542275841   -9.05887e-02   1.76607e-03 DIIS/ADIIS
   @RHF iter   3:  -435.81984672580273   -4.37213e-02   1.60755e-04 DIIS/ADIIS
   @RHF iter   4:  -435.82088843780417   -1.04171e-03   4.54276e-05 DIIS
   @RHF iter   5:  -435.82096382107619   -7.53833e-05   1.06555e-05 DIIS
   @RHF iter   6:  -435.82096881086164   -4.98979e-06   1.05617e-06 DIIS
   @RHF iter   7:  -435.82096885132989   -4.04683e-08   1.31070e-07 DIIS
   @RHF iter   8:  -435.82096885196597   -6.36078e-10   1.38842e-08 DIIS
   @RHF iter   9:  -435.82096885197080   -4.83169e-12   3.11730e-09 DIIS
  Energy and wave function converged.


  ==> Post-Iterations <==

    Orbital Energies [Eh]
    ---------------------

    Doubly Occupied:                                                      

       1A    -26.377086     2A    -26.377064     3A    -26.377009  
       4A    -26.376964     5A    -11.610624     6A     -1.806196  
       7A     -1.681033     8A     -1.680951     9A     -1.680906  
      10A     -1.011852    11A     -0.890322    12A     -0.890283  
      13A     -0.890267    14A     -0.765145    15A     -0.765112  
      16A     -0.712937    17A     -0.712895    18A     -0.712868  
      19A     -0.685229    20A     -0.685191    21A     -0.685171  

    Virtual:                                                              

      22A      0.067064    23A      0.076218    24A      0.076219  
      25A      0.076221    26A      0.183294    27A      0.183300  
      28A      0.188940    29A      0.188944    30A      0.188956  
      31A      0.264262    32A      0.275747    33A      0.275753  
      34A      0.275759    35A      0.290977    36A      0.290983  
      37A      0.290986    38A      0.310501    39A      0.359962  
      40A      0.360071    41A      0.360136    42A      0.423617  
      43A      0.423630    44A      0.423650    45A      0.481935  
      46A      0.481966    47A      0.482047    48A      0.495717  
      49A      0.526803    50A      0.526830    51A      0.692941  
      52A      0.692971    53A      0.693023    54A      0.713931  
      55A      0.884953    56A      0.884989    57A      0.974208  
      58A      0.974224    59A      0.974256    60A      1.029712  
      61A      1.029754    62A      1.029831    63A      1.064501  
      64A      1.064506    65A      1.064509    66A      1.072820  
      67A      1.072834    68A      1.072841    69A      1.167494  
      70A      1.167596    71A      1.182466    72A      1.221620  
      73A      1.221684    74A      1.221737    75A      1.231679  
      76A      1.231723    77A      1.231764    78A      1.319412  
      79A      1.319489    80A      1.338787    81A      1.587212  
      82A      1.587301    83A      1.587360    84A      1.622221  
      85A      1.622279    86A      1.633970    87A      1.634146  
      88A      1.634315    89A      1.733206    90A      1.733233  
      91A      1.733266    92A      1.762810    93A      1.763102  
      94A      1.763190    95A      1.830790    96A      1.830940  
      97A      1.831019    98A      2.150614    99A      2.472791  
     100A      2.586563   101A      2.586665   102A      2.586739  
     103A      2.657286   104A      2.657287   105A      2.657297  
     106A      2.793500   107A      2.793561   108A      2.836623  
     109A      2.836693   110A      2.836743   111A      2.869118  
     112A      2.869149   113A      2.869164   114A      2.894442  
     115A      2.894466   116A      2.894537   117A      3.077046  
     118A      3.077110   119A      3.077178   120A      3.077268  
     121A      3.113230   122A      3.113352   123A      3.113373  
     124A      3.137226   125A      3.137320   126A      3.265241  
     127A      3.354675   128A      3.354803   129A      3.354866  
     130A      3.358049   131A      3.358136   132A      3.394568  
     133A      3.394636   134A      3.394718   135A      3.418244  
     136A      3.558884   137A      3.558942   138A      3.559040  
     139A      3.692644   140A      3.692677   141A      3.692776  
     142A      3.811636   143A      3.811759   144A      3.903185  
     145A      3.903567   146A      3.903649   147A      3.916908  
     148A      4.094533   149A      4.094580   150A      4.094625  
     151A      4.205356   152A      4.205476   153A      4.205774  
     154A      4.464336   155A      4.464382   156A      4.588923  
     157A      4.604561   158A      4.604886   159A      4.605007  
     160A      4.798647   161A      4.798751   162A      4.798866  
     163A      4.800435   164A      4.800506   165A      4.800548  
     166A      5.660947   167A      5.661238   168A      5.730310  
     169A      5.730666   170A      5.730847   171A      5.825115  
     172A      5.825344   173A      5.825636   174A      6.388470  
     175A      7.294366   176A      7.294407   177A      7.294506  
     178A      8.845280   179A      8.845356   180A      8.845404  
     181A      8.887341   182A      8.918506   183A      8.918622  
     184A      8.918686   185A      8.924482   186A      8.924561  
     187A      8.943356   188A      9.191453   189A      9.191483  
     190A      9.191503   191A      9.220327   192A      9.220339  
     193A      9.237128   194A      9.237254   195A      9.237302  
     196A      9.289627   197A      9.289839   198A      9.289868  
     199A      9.317448   200A      9.338829   201A      9.338860  
     202A      9.338946   203A      9.348370   204A      9.348396  
     205A      9.401375   206A      9.401390   207A      9.401418  
     208A      9.512006   209A      9.512062   210A      9.512199  
     211A      9.587933   212A      9.600906   213A      9.601088  
     214A      9.601395   215A      9.628139   216A      9.628507  
     217A      9.628559   218A      9.746718   219A      9.746747  
     220A      9.746766   221A      9.876498   222A      9.876544  
     223A      9.876561   224A     10.160736   225A     10.160831  
     226A     13.937308   227A     15.618179   228A     15.619565  
     229A     15.620126   230A     18.239111  

    Final Occupation by Irrep:
              A 
    DOCC [    21 ]
    NA   [    21 ]
    NB   [    21 ]

  @RHF Final Energy:  -435.82096885197080

   => Energetics <=

    Nuclear Repulsion Energy =            206.0452582856003403
    One-Electron Energy =               -1016.9822446903189075
    Two-Electron Energy =                 375.1160175527477918
    Total Energy =                       -435.8209688519708038

Computation Completed


Properties will be evaluated at   0.000000,   0.000000,   0.000000 [a0]

Properties computed using the SCF density matrix


 Multipole Moments:

 ------------------------------------------------------------------------------------
     Multipole            Electronic (a.u.)      Nuclear  (a.u.)        Total (a.u.)
 ------------------------------------------------------------------------------------

 L = 1.  Multiply by 2.5417464519 to convert [e a0] to [Debye]
 Dipole X            :          0.0000491           -0.0000000            0.0000491
 Dipole Y            :          0.0000004           -0.0000000            0.0000004
 Dipole Z            :          0.0005552            0.0001158            0.0006710
 Magnitude           :                                                    0.0006728

 ------------------------------------------------------------------------------------

*** tstop() called on suri at Thu Mar  6 14:07:48 2025
Module time:
	user time   =      61.30 seconds =       1.02 minutes
	system time =      44.25 seconds =       0.74 minutes
	total time  =        103 seconds =       1.72 minutes
Total time:
	user time   =      61.30 seconds =       1.02 minutes
	system time =      44.25 seconds =       0.74 minutes
	total time  =        103 seconds =       1.72 minutes
 MINTS: Wrapper to libmints.
   by Justin Turney

   Calculation information:
      Number of threads:                 1
      Number of atoms:                   5
      Number of AO shells:              70
      Number of SO shells:              70
      Number of primitives:            150
      Number of atomic orbitals:       275
      Number of basis functions:       230

      Number of irreps:                  1
      Integral cutoff                 1.00e-12
      Number of functions per irrep: [ 230 ]

 OEINTS: Overlap, kinetic, potential, dipole, and quadrupole integrals
         stored in file 35.

      Computing two-electron integrals...done
      Computed 342745875 non-zero two-electron integrals.
        Stored in file 33.


*** tstart() called on suri
*** at Thu Mar  6 14:08:12 2025


	Wfn Parameters:
	--------------------
	Wavefunction         = CCSD
	Number of irreps     = 1
	Number of MOs        = 230
	Number of active MOs = 230
	AO-Basis             = NONE
	Semicanonical        = false
	Reference            = RHF
	Print Level          = 1

	IRREP	# MOs	# FZDC	# DOCC	# SOCC	# VIRT	# FZVR
	-----	-----	------	------	------	------	------
	 A	   230	    0	    21	    0	    209	    0
	Transforming integrals...
	IWL integrals will be deleted.
	(OO|OO)...
	Presorting SO-basis two-electron integrals.
	Sorting File: SO Ints (nn|nn) nbuckets = 11
	Constructing frozen core operators
	Starting first half-transformation.
	Sorting half-transformed integrals.
	First half integral transformation complete.
	Starting second half-transformation.
	Two-electron integral transformation complete.
	(OO|OV)...
	Starting second half-transformation.
	Two-electron integral transformation complete.
	(OO|VV)...
	Starting second half-transformation.
	Two-electron integral transformation complete.
	(OV|OO)...
	Starting first half-transformation.
	Sorting half-transformed integrals.
	First half integral transformation complete.
	Starting second half-transformation.
	Two-electron integral transformation complete.
	(OV|OV)...
	Starting second half-transformation.
	Two-electron integral transformation complete.
	(OV|VV)...
	Starting second half-transformation.
	Two-electron integral transformation complete.
	(VV|OO)...
	Starting first half-transformation.
	Sorting half-transformed integrals.
	First half integral transformation complete.
	Starting second half-transformation.
	Two-electron integral transformation complete.
	(VV|OV)...
	Starting second half-transformation.
	Two-electron integral transformation complete.
	(VV|VV)...
	Starting second half-transformation.
	Two-electron integral transformation complete.
	Frozen core energy     =      0.00000000000000

	Size of irrep 0 of <ab|cd> integrals:   1908.030 (MW) /  15264.238 (MB)
	Total:                                  1908.030 (MW) /  15264.238 (MB)

	Size of irrep 0 of <ia|bc> integrals:    191.716 (MW) /   1533.727 (MB)
	Total:                                   191.716 (MW) /   1533.727 (MB)

	Size of irrep 0 of tijab amplitudes:      19.263 (MW) /    154.107 (MB)
	Total:                                    19.263 (MW) /    154.107 (MB)


Traceback (most recent call last):
  File "/home/suri/psi4/build/stage/bin/psi4", line 387, in <module>
    exec(content)
  File "<string>", line 32, in <module>
  File "/home/suri/psi4/build/stage/lib/psi4/driver/driver.py", line 525, in energy
    wfn = procedures['energy'][lowername](lowername, molecule=molecule, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/suri/psi4/build/stage/lib/psi4/driver/procrouting/proc.py", line 871, in select_ccsd
    return func(name, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/suri/psi4/build/stage/lib/psi4/driver/procrouting/proc.py", line 2912, in run_ccenergy
    core.cctransort(ref_wfn)

RuntimeError: 
Fatal Error: PSIO_ERROR: 21 (File not opened)
 You need to open file 102 before you attempt this operation,
 If you're a user, contact developers immediately. This is a bug.
 If you're a developer, get yourself some coffee.

Error occurred in file: /home/suri/psi4/psi4/src/psi4/libpsio/error.cc on line: 135
The most recent 5 function calls were:

psi::PsiException::PsiException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*, int)
psi::PSIO::wt_toclen(unsigned long, unsigned long)
psi::PSIO::write(unsigned long, char const*, char*, unsigned long, psi::psio_address, psi::psio_address*)



Printing out the relevant lines from the Psithon --> Python processed input file:
       F02 -1.0951999426 -0.2369000018  0.6962000132
       F03  1.0582000017 -0.2133000046  0.7581999898
       F04  0.0390000008 -0.8036999702 -1.0450999737
    """)
    core.IO.set_default_namespace("")
--> [e_tar, wfn] = energy('ccsd',return_wfn=True)
    print('e_tar =', e_tar)
    molden(wfn, 'target.molden')
    clean()
    core.set_global_option("BASIS", "aug-cc-pVTZ")
    core.set_global_option("REFERENCE", "rhf")

!----------------------------------------------------------------------------------!
!                                                                                  !
! Fatal Error: PSIO_ERROR: 21 (File not opened)                                    !
!  You need to open file 102 before you attempt this operation,                    !
!  If you're a user, contact developers immediately. This is a bug.                !
!  If you're a developer, get yourself some coffee.                                !
! Error occurred in file: /home/suri/psi4/psi4/src/psi4/libpsio/error.cc on line:  !
!     135                                                                          !
! The most recent 5 function calls were:                                           !
! psi::PsiException::PsiException(std::__cxx11::basic_string<char,                 !
!     std::char_traits<char>, std::allocator<char> >, char const*, int)            !
! psi::PSIO::wt_toclen(unsigned long, unsigned long)                               !
! psi::PSIO::write(unsigned long, char const*, char*, unsigned long,               !
!     psi::psio_address, psi::psio_address*)                                       !
!                                                                                  !
!----------------------------------------------------------------------------------!

    Psi4 stopped on: Thursday, 06 March 2025 02:21PM
    Psi4 wall time for execution: 0:14:58.13

*** Psi4 encountered an error. Buy a developer more coffee!
*** Resources and help at github.com/psi4/psi4.