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

Fix timeout in command_line.enumlib_caller.EnumlibAdaptor #4276

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

DanielYang59
Copy link
Contributor

@DanielYang59 DanielYang59 commented Jan 29, 2025

Summary

@DanielYang59 DanielYang59 force-pushed the fix-4185-enumlib-caller-timeout branch from b980d67 to 6947ffc Compare January 29, 2025 20:19
with pytest.raises(TimeoutError, match="Enumeration took too long"):
adaptor._run_multienum()
Copy link
Contributor Author

@DanielYang59 DanielYang59 Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original test command is incorrect, a bare _run_multienum doesn't generate the necessary input files, and _gen_input_file is needed (therefore Fortran runtime error: Cannot open file 'struct_enum.in': No such file or directory), so perhaps just use run instead.

After fixing this, the run time on my local Apple M4 machine is around 0.04 s

@DanielYang59 DanielYang59 marked this pull request as ready for review January 31, 2025 13:12
@DanielYang59 DanielYang59 marked this pull request as draft February 1, 2025 09:10
@DanielYang59
Copy link
Contributor Author

DanielYang59 commented Feb 1, 2025

Hi @fraricci sorry for the late response, can you help me test if this patch works? I don't have a "slow enough" enumlib job to test with (the unit test job last only 0.04 s and I'm not sure if it's really validating the behaviour), thanks a lot!

@DanielYang59 DanielYang59 marked this pull request as ready for review February 1, 2025 21:07
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.

Timeout in MagneticStructureEnumerator (and EnumlibAdaptor) does not work
1 participant