Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_pdata
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_pdata
Commits
bee58741
Commit
bee58741
authored
Feb 21, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding missing file
parent
eb5c16f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
116 additions
and
1 deletion
+116
-1
script/update_openfpm
script/update_openfpm
+1
-1
src/Vector/vector_dist_dlb_test.hpp
src/Vector/vector_dist_dlb_test.hpp
+115
-0
No files found.
script/update_openfpm
View file @
bee58741
...
...
@@ -44,7 +44,7 @@ function update_openfpm()
# git submodule update
# sh autogen.sh
#
make clean
#
./config.status
# make install
}
...
...
src/Vector/vector_dist_dlb_test.hpp
0 → 100644
View file @
bee58741
/*
* vector_dist_dlb_test.hpp
*
* Created on: Feb 21, 2017
* Author: i-bird
*/
#ifndef SRC_VECTOR_VECTOR_DIST_DLB_TEST_HPP_
#define SRC_VECTOR_VECTOR_DIST_DLB_TEST_HPP_
BOOST_AUTO_TEST_SUITE
(
vector_dist_dlb_test
)
BOOST_AUTO_TEST_CASE
(
vector_dist_dlb_test_part
)
{
Vcluster
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessingUnits
()
>
8
)
return
;
Box
<
3
,
float
>
domain
({
0.0
,
0.0
,
0.0
},{
1.0
,
1.0
,
1.0
});
Ghost
<
3
,
float
>
g
(
0.1
);
size_t
bc
[
3
]
=
{
PERIODIC
,
PERIODIC
,
PERIODIC
};
vector_dist
<
3
,
float
,
aggregate
<
float
>>
vd
(
0
,
domain
,
bc
,
g
,
DEC_GRAN
(
2048
));
// Only processor 0 initialy add particles on a corner of a domain
if
(
v_cl
.
getProcessUnitID
()
==
0
)
{
for
(
size_t
i
=
0
;
i
<
10000
;
i
++
)
{
vd
.
add
();
vd
.
getLastPos
()[
0
]
=
((
float
)
rand
())
/
RAND_MAX
*
0.3
;
vd
.
getLastPos
()[
1
]
=
((
float
)
rand
())
/
RAND_MAX
*
0.3
;
vd
.
getLastPos
()[
2
]
=
((
float
)
rand
())
/
RAND_MAX
*
0.3
;
}
}
vd
.
map
();
vd
.
ghost_get
<>
();
ModelSquare
md
;
vd
.
addComputationCosts
(
md
);
vd
.
getDecomposition
().
decompose
();
vd
.
map
();
vd
.
addComputationCosts
(
md
);
openfpm
::
vector
<
size_t
>
loads
;
size_t
load
=
vd
.
getDecomposition
().
getDistribution
().
getProcessorLoad
();
v_cl
.
allGather
(
load
,
loads
);
v_cl
.
execute
();
for
(
size_t
i
=
0
;
i
<
loads
.
size
()
;
i
++
)
{
float
load_f
=
load
;
float
load_fc
=
loads
.
get
(
i
);
BOOST_REQUIRE_CLOSE
(
load_f
,
load_fc
,
7.0
);
}
BOOST_REQUIRE
(
vd
.
size_local
()
!=
0
);
Point
<
3
,
float
>
v
({
1.0
,
1.0
,
1.0
});
for
(
size_t
i
=
0
;
i
<
25
;
i
++
)
{
// move the particles by 0.1
auto
it
=
vd
.
getDomainIterator
();
while
(
it
.
isNext
())
{
auto
p
=
it
.
get
();
vd
.
getPos
(
p
)[
0
]
+=
v
.
get
(
0
)
*
0.09
;
vd
.
getPos
(
p
)[
1
]
+=
v
.
get
(
1
)
*
0.09
;
vd
.
getPos
(
p
)[
2
]
+=
v
.
get
(
2
)
*
0.09
;
++
it
;
}
vd
.
map
();
ModelSquare
md
;
vd
.
addComputationCosts
(
md
);
vd
.
getDecomposition
().
redecompose
(
200
);
vd
.
map
();
BOOST_REQUIRE
(
vd
.
size_local
()
!=
0
);
vd
.
ghost_get
<>
();
vd
.
addComputationCosts
(
md
);
openfpm
::
vector
<
size_t
>
loads
;
size_t
load
=
vd
.
getDecomposition
().
getDistribution
().
getProcessorLoad
();
v_cl
.
allGather
(
load
,
loads
);
v_cl
.
execute
();
for
(
size_t
i
=
0
;
i
<
loads
.
size
()
;
i
++
)
{
float
load_f
=
load
;
float
load_fc
=
loads
.
get
(
i
);
BOOST_REQUIRE_CLOSE
(
load_f
,
load_fc
,
7.0
);
}
}
}
BOOST_AUTO_TEST_SUITE_END
()
#endif
/* SRC_VECTOR_VECTOR_DIST_DLB_TEST_HPP_ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment