Hello, I’ve been encountering a persistent RuntimeError that always stops my script from running to completion. The code I have designed calculates the energy and dipole moment of a diatomic molecule, MgF, at various bond lengths using various methods (SCF and CCSD(T) within double- and triple-zeta bases) by iterating through a for-loop. It’s a long process, but I wouldn’t expect it to be so computationally inefficient that I’d run out of memory (I have over 7 GB free on my computer). The error I receive says Fatal Error: PSIOManager cannot get a mirror file handle.
I spoke about this error in a previous thread: Deleting scratch files before a computation finishes - Psi4 – Open-Source Quantum Chemistry (psicode.org) but it would seem that I had the wrong idea about what might be causing the issue. Originally I had suspected that the problem was caused by the process creating too many scratch files, but since my code uses psi4.core.clean() after each calculation these should be getting deleted once they’re no longer needed. Indeed, checking the directory indicated that all the CLEAN files left in memory were all left over when the script failed to finish running properly. In other words, these files only fail to get deleted when the script is terminated prematurely.
Does anyone know what might be causing this issue instead? It’s quite frustrating. I’ve been able to work around it by periodically saving the results of any successful calculations to an Excel spreadsheet in order to prevent all progress being lost, but the script’s inability to run to completion still results in absurd amounts of wasted time. I’d appreciate any information you might have. I am using Psi4 1.4rc2.dev1. Thank you.
I’m using VSCode to run a Python script that treats Psi4 as an imported module (PsiAPI style), so I’m not directly accessing the shell at all. Visual Studio has a built-in terminal that it uses to execute the process of running the code, which seems to be a Windows PowerShell terminal (the following message appears when I make a new terminal):
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
My operating system is Windows 10, so I believe that would qualify as running the code natively. I have less experience working with the shell directly, but I can try to run the script from there instead to see if I still get this mirror file handle issue.
I hope that answered your question, I apologize but I’m not sure if I understood it very well.