Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import optimisation #287

Merged
merged 2 commits into from
Feb 7, 2024
Merged

Conversation

SurgeArrester
Copy link
Contributor

Summary

On the CECI HPC abilab can take 34s to import with and without pre-compiled wheels, affecting performance of downstream high throughput studies.

After profiling this comes from the abipy.dynamics.hist and abipy.electrons.lobster header imports, specifically the pymatgen.io.vasp.outputs.Vasprun, pymatgen.io.vasp.inputs.Potcar, and pymatgen.io.vasp.outputs.Xdatcar. These pymatgen classes are exclusively used in read/write abipy class methods, so the import has been moved to the start of each method as a workaround.

Abilab now imports in about a second on my CECI environment

@gmatteo
Copy link
Member

gmatteo commented Feb 7, 2024

The speedup is impressive! Great work on this PR! Thanks.

@gmatteo gmatteo merged commit 8a70fa0 into abinit:develop Feb 7, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants