Skip to content

[UNEXPECTED BEHAVIOR] out of memory: code keep hold onto memory #2976

@marwafar

Description

@marwafar

I am running pyscf with a loop over many molecules. For each molecule, I calculate the HF, CASCI, and electron integrals. I find that code crashes after certain number of molecules in the loop, with "out of memory" error message. I find that I have to manually delete all electron integrals data and force collect garbage for each run in the loop.

for imol in molecules:
    Run HF
    Run CASCI
    Calculate electron integrals
    save data

Now, I have to do this to keep it running

for imol in molecules:
    Run HF
    Run CASCI
    Calculate electron integrals
    save data
    del large_data
    gc.collect()

I am using the latest release

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions