Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
n-body_methods
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
CodeVault
hpc-kernels
n-body_methods
Commits
dcd2bbc6
Commit
dcd2bbc6
authored
8 years ago
by
Paul Heinzlreiter
Browse files
Options
Downloads
Patches
Plain Diff
* moved iterations loop
parent
34b632a1
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bh_tree_mpi/main.cpp
+3
-1
3 additions, 1 deletion
bh_tree_mpi/main.cpp
bh_tree_mpi/parallelization/MpiBodyComm.cpp
+0
-1
0 additions, 1 deletion
bh_tree_mpi/parallelization/MpiBodyComm.cpp
bh_tree_mpi/parallelization/MpiSimulation.cpp
+14
-16
14 additions, 16 deletions
bh_tree_mpi/parallelization/MpiSimulation.cpp
with
17 additions
and
18 deletions
bh_tree_mpi/main.cpp
+
3
−
1
View file @
dcd2bbc6
...
...
@@ -11,7 +11,9 @@ int main(int argc, char* argv[]) {
MpiSimulation
simulation
(
argc
,
argv
);
simulation
.
distributeBodies
();
simulation
.
runStep
();
for
(
int
i
=
0
;
i
<
6
;
i
++
)
{
simulation
.
runStep
();
}
simulation
.
cleanup
();
MPI
::
Finalize
();
return
0
;
...
...
This diff is collapsed.
Click to expand it.
bh_tree_mpi/parallelization/MpiBodyComm.cpp
+
0
−
1
View file @
dcd2bbc6
...
...
@@ -50,7 +50,6 @@ namespace nbody {
bool
MpiBodyComm
::
sendUnblocking
(
int
target
,
vector
<
Body
>
bodies
)
{
if
(
this
->
request
!=
MPI
::
REQUEST_NULL
&&
!
this
->
request
.
Test
())
{
//unblocking send still not finished
//cout << "Test failed" << endl;
return
false
;
}
/*
...
...
This diff is collapsed.
Click to expand it.
bh_tree_mpi/parallelization/MpiSimulation.cpp
+
14
−
16
View file @
dcd2bbc6
...
...
@@ -182,23 +182,21 @@ namespace nbody {
void
MpiSimulation
::
runStep
()
{
Box
overallDomain
;
for
(
int
k
=
0
;
k
<
3
;
k
++
)
{
this
->
distributeDomains
();
//this->domains[this->mpiRank].print();
for
(
unsigned
int
i
=
0
;
i
<
this
->
mpiSize
;
i
++
)
{
overallDomain
.
extend
(
this
->
domains
[
i
]);
}
/*
if (this->mpiRank == 0) {
overallDomain.print();
}
*/
this
->
tree
.
rebuild
(
overallDomain
);
this
->
distributeLETs
();
this
->
tree
.
computeForces
();
this
->
tree
.
advance
();
this
->
domains
[
this
->
mpiRank
]
=
this
->
tree
.
getLocalBB
();
this
->
distributeDomains
();
//this->domains[this->mpiRank].print();
for
(
unsigned
int
i
=
0
;
i
<
this
->
mpiSize
;
i
++
)
{
overallDomain
.
extend
(
this
->
domains
[
i
]);
}
/*
if (this->mpiRank == 0) {
overallDomain.print();
}
*/
this
->
tree
.
rebuild
(
overallDomain
);
this
->
distributeLETs
();
this
->
tree
.
computeForces
();
this
->
tree
.
advance
();
this
->
domains
[
this
->
mpiRank
]
=
this
->
tree
.
getLocalBB
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment