Skip to content

Commit

Permalink
Merge pull request #422 from Circuitscape/RA/parallel_network_pairwise
Browse files Browse the repository at this point in the history
Fix accumulator bug in network pairwise parallel mode
  • Loading branch information
ranjanan authored Aug 25, 2024
2 parents 2c7c41d + 9bf1e93 commit 50c77b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/network/pairwise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function network_pairwise(T, V, cfg)::Matrix{T}
cum_node_curr = collect(graphdata.cum.cum_node_curr[1])
cum_branch_curr = collect(graphdata.cum.cum_branch_curr[1])
for i = 2:nprocs()
cum_node_curr .+= graphdata.cum_node_curr[i][:,2]
cum_branch_curr .+= graphdata.cum_branch_curr[i][:,3]
cum_node_curr .+= graphdata.cum.cum_node_curr[i]
cum_branch_curr .+= graphdata.cum.cum_branch_curr[i]
end
cum_node_curr = hcat(1:length(cum_node_curr), cum_node_curr)
coords = graphdata.cum.coords
Expand Down
2 changes: 2 additions & 0 deletions test/input/network/sgNetworkVerify1.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ use_direct_grounds = False
low_memory_mode = False
solver = cg+amg
print_timings = False
parallelize = true
max_parallel = 2

[Options for pairwise and one-to-all and all-to-one modes]
included_pairs_file = None
Expand Down

2 comments on commit 50c77b5

@ranjanan
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@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 updated: JuliaRegistries/General/112561

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 v5.14.0 -m "<description of version>" 50c77b5e8632851690b694739275a1ff74249047
git push origin v5.14.0

Please sign in to comment.