Skip to content

Commit

Permalink
enable threading by default (#129)
Browse files Browse the repository at this point in the history
enable threading by default when Julia is started with multiple threads.
  • Loading branch information
oameye authored Dec 4, 2023
1 parent 4d20bee commit 82364ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/solve_homotopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ get_single_solution(res::Result, index) = [get_single_solution(res, index=index,
swept_parameters::ParameterRange,
fixed_parameters::ParameterList;
random_warmup=true,
threading=false,
threading = Threads.nthreads() > 1,
show_progress=true,
sorting="nearest")
Expand Down Expand Up @@ -86,7 +86,7 @@ A steady state result for 1000 parameter points
```
"""
function get_steady_states(prob::Problem, swept_parameters::ParameterRange, fixed_parameters::ParameterList; random_warmup=true, threading=false, show_progress=true, sorting="nearest", classify_default=true)
function get_steady_states(prob::Problem, swept_parameters::ParameterRange, fixed_parameters::ParameterList; random_warmup=true, threading = Threads.nthreads() > 1, show_progress=true, sorting="nearest", classify_default=true)
# make sure the variables are in our namespace to make them accessible later
declare_variable.(string.(cat(prob.parameters, prob.variables, dims=1)))

Expand Down

2 comments on commit 82364ca

@oameye
Copy link
Member Author

@oameye oameye commented on 82364ca Dec 4, 2023

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/96433

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.2 -m "<description of version>" 82364caacf19feeee3d8f1184fb797d6153cedaa
git push origin v0.7.2

Please sign in to comment.