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

avoids spawning of timeout thread if no timeout set #254

Merged

Conversation

wookietreiber
Copy link
Contributor

fixes #253

@coveralls
Copy link

Pull Request Test Coverage Report for Build 856

  • 12 of 12 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 89.757%

Files with Coverage Reduction New Missed Lines %
spotpy/algorithms/fscabc.py 1 80.43%
spotpy/algorithms/rope.py 1 93.58%
Totals Coverage Status
Change from base Build 851: -0.04%
Covered Lines: 4136
Relevant Lines: 4608

💛 - Coveralls

@wookietreiber
Copy link
Contributor Author

@thouska What are your recommendations regarding the coverage diff?

@thouska
Copy link
Owner

thouska commented Sep 7, 2020

Great thank you!
As the issue is arrising with single-core usage, how about checking for that with
if not parallel == 'seq':
instaead of
if self.sim_timeout:?

@wookietreiber
Copy link
Contributor Author

@thouska The overhead is not just with single-core usage. Generally, if you don't have/need/want a timeout, you should not need to pay the overhead cost of the extra thread and the logistics around it.

@thouska
Copy link
Owner

thouska commented Sep 7, 2020

Ok, you are right, than we leave it like that and check for the timeout. And never mind the coverage, it varies from time to time because i have’nt set a random seed. Therefor some algorithms behave differently from one test to the other.
Your contribution will be available on pypi in spotpy version >=1.5.11 (propably published today, if not tomorrow).

@thouska thouska merged commit 46acf08 into thouska:master Sep 7, 2020
@wookietreiber wookietreiber deleted the conditional-timeout-thread branch September 7, 2020 12:39
@wookietreiber
Copy link
Contributor Author

Alright, thanks for the quick response!

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.

simulation timeout thread is started unconditionally, leading to unnecessary overhead
3 participants