ValeevGroup/mpqc

MPQC R12 Integral file not closed after each calculation.

pchong90 opened this issue · 5 comments

The opened file will cumulate repeatedly until the program exits.

Here is an example of opened files at second iteration of calculation. The highlighted file is where the repeat starts.

I am thinking to clean this file name in the destructor of the call object. However, I don't know where this value are stored. Please let me know where this file names are stored so I can try to clean them in the destructor.

screen shot 2015-04-21 at 11 49 35 am

These files are controlled by their respective owners ... calling WavefunctionWorld::obsolete() should purge the registries that "own" these files. Since MolcasPT2R12 "owns" its WavefunctionWorld object (by creating it) MolcasPT2R12 is the rightful caller of WavefunctionWorld::obsolete().

I changed the code and WavefunctionWorld::obsolete() is called at each iteration. Still not fix the problem. Could not figure out where to clean the files.

@pchong90 I believe PT2R12::obsolete() does not clean up everything it should ... it needs to get rid of srr12intrmds_ object (and probably cabs_singles_). These objects have complicated internal structure and cache much data including refs to MO ints transform objects. Until all refs to them are gone these files will persist.

it still appears that there are hanging handles. hold up, I'll dig deeper.

Thank you. This helps a lot.