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
f2e1b994
Commit
f2e1b994
authored
Aug 07, 2015
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing jenkins script
parent
ea3864ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
9 deletions
+137
-9
build_pdata.sh
build_pdata.sh
+1
-0
src/Decomposition/CartDecomposition.hpp
src/Decomposition/CartDecomposition.hpp
+1
-1
src/Grid/grid_dist_id_unit_test.hpp
src/Grid/grid_dist_id_unit_test.hpp
+135
-8
No files found.
build_pdata.sh
View file @
f2e1b994
...
...
@@ -103,6 +103,7 @@ elif [ "$2" == "taurus" ]
then
echo
"Compiling on taurus"
source
/etc/profile
echo
"
$PATH
"
module load gcc/4.8.2
module load boost/1.55.0-gnu4.8
...
...
src/Decomposition/CartDecomposition.hpp
View file @
f2e1b994
...
...
@@ -222,7 +222,7 @@ private:
//! it contain the internal ghosts of the local processor
openfpm
::
vector
<
lBox_dom
>
loc_ghost_box
;
//! Structure that contain for each sub-domain box the processor id
//! Structure that contain for each sub-
sub-
domain box the processor id
//! exist for efficient global communication
openfpm
::
vector
<
size_t
>
fine_s
;
...
...
src/Grid/grid_dist_id_unit_test.hpp
View file @
f2e1b994
...
...
@@ -38,6 +38,10 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_domain_grid_unit_converter_test)
Vcluster
&
v_cl
=
*
global_v_cluster
;
// Skip this test on big scale
if
(
v_cl
.
getProcessingUnits
()
>=
32
)
return
;
// Test several grid dimensions
for
(
size_t
k
=
1024
;
k
>=
2
;
k
--
)
...
...
@@ -86,17 +90,18 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_domain_grid_unit_converter_test)
}
}
BOOST_AUTO_TEST_CASE
(
grid_dist_id_iterator_test_use
)
void
Test2D
(
const
Box
<
2
,
float
>
&
domain
,
long
int
k
)
{
// Domain
Box
<
2
,
float
>
domain
({
0.0
,
0.0
},{
1.0
,
1.0
});
// 2D test
for
(
;
k
>=
2
;
k
-=
(
k
>=
66
)
?
33
:
1
)
{
BOOST_TEST_CHECKPOINT
(
"Testing 2D grid k="
<<
k
);
// Initialize the global VCluster
init_global_v_cluster
(
&
boost
::
unit_test
::
framework
::
master_test_suite
().
argc
,
&
boost
::
unit_test
::
framework
::
master_test_suite
().
argv
);
if
(
global_v_cluster
->
getProcessUnitID
()
==
0
)
{
std
::
cout
<<
"Testing 2D: "
<<
k
<<
"
\n
"
;
}
for
(
long
int
k
=
1024
;
k
>=
2
;
k
-=
(
k
>=
66
)
?
33
:
1
)
{
BOOST_TEST_CHECKPOINT
(
"Testing grid k="
<<
k
);
// grid size
size_t
sz
[
2
];
sz
[
0
]
=
k
;
...
...
@@ -182,9 +187,131 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_iterator_test_use)
++
domg
;
}
}
}
void
Test3D
(
const
Box
<
3
,
float
>
&
domain
,
long
int
k
)
{
// 3D test
for
(
;
k
>=
2
;
k
-=
(
k
>=
33
)
?
5
:
1
)
{
BOOST_TEST_CHECKPOINT
(
"Testing 3D grid k="
<<
k
);
if
(
global_v_cluster
->
getProcessUnitID
()
==
0
)
{
std
::
cout
<<
"Testing 3D: "
<<
k
<<
"
\n
"
;
}
// grid size
size_t
sz
[
3
];
sz
[
0
]
=
k
;
sz
[
1
]
=
k
;
sz
[
2
]
=
k
;
// Ghost
Ghost
<
3
,
float
>
g
(
0.01
);
// Distributed grid with id decomposition
grid_dist_id
<
3
,
float
,
scalar
<
float
>
,
CartDecomposition
<
3
,
float
>>
g_dist
(
sz
,
domain
,
g
);
// check the consistency of the decomposition
bool
val
=
g_dist
.
getDecomposition
().
check_consistency
();
BOOST_REQUIRE_EQUAL
(
val
,
true
);
// Grid sm
grid_sm
<
3
,
void
>
info
(
sz
);
// get the domain iterator
size_t
count
=
0
;
auto
dom
=
g_dist
.
getDomainIterator
();
while
(
dom
.
isNext
())
{
auto
key
=
dom
.
get
();
auto
key_g
=
g_dist
.
getGKey
(
key
);
g_dist
.
template
get
<
0
>(
key
)
=
info
.
LinId
(
key_g
);
// Count the point
count
++
;
++
dom
;
}
// Get the virtual cluster machine
Vcluster
&
vcl
=
g_dist
.
getVC
();
// reduce
vcl
.
reduce
(
count
);
vcl
.
execute
();
// Check
BOOST_REQUIRE_EQUAL
(
count
,
k
*
k
*
k
);
auto
dom2
=
g_dist
.
getDomainIterator
();
// check that the grid store the correct information
while
(
dom2
.
isNext
())
{
auto
key
=
dom2
.
get
();
auto
key_g
=
g_dist
.
getGKey
(
key
);
BOOST_REQUIRE_EQUAL
(
g_dist
.
template
get
<
0
>(
key
),
info
.
LinId
(
key_g
));
++
dom2
;
}
g_dist
.
template
ghost_get
<
0
>();
// check that the communication is correctly completed
auto
domg
=
g_dist
.
getDomainGhostIterator
();
// check that the grid with the ghost past store the correct information
while
(
domg
.
isNext
())
{
auto
key
=
domg
.
get
();
auto
key_g
=
g_dist
.
getGKey
(
key
);
// In this case the boundary condition are non periodic
if
(
g_dist
.
isInside
(
key_g
))
{
if
(
g_dist
.
template
get
<
0
>(
key
)
!=
info
.
LinId
(
key_g
))
{
int
debug
=
0
;
debug
++
;
}
BOOST_REQUIRE_EQUAL
(
g_dist
.
template
get
<
0
>(
key
),
info
.
LinId
(
key_g
));
}
++
domg
;
}
}
}
BOOST_AUTO_TEST_CASE
(
grid_dist_id_iterator_test_use
)
{
// Domain
Box
<
2
,
float
>
domain
({
0.0
,
0.0
},{
1.0
,
1.0
});
// Initialize the global VCluster
init_global_v_cluster
(
&
boost
::
unit_test
::
framework
::
master_test_suite
().
argc
,
&
boost
::
unit_test
::
framework
::
master_test_suite
().
argv
);
long
int
k
=
1024
*
1024
*
global_v_cluster
->
getProcessingUnits
();
k
=
std
::
pow
(
k
,
1
/
2.
);
Test2D
(
domain
,
k
);
// Domain
Box
<
3
,
float
>
domain3
({
0.0
,
0.0
,
0.0
},{
1.0
,
1.0
,
1.0
});
k
=
128
*
128
*
128
*
global_v_cluster
->
getProcessingUnits
();
k
=
std
::
pow
(
k
,
1
/
3.
);
Test3D
(
domain3
,
k
);
// 3D test
// g_dist.write("");
...
...
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