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
0
Merge Requests
0
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
190a678c
Commit
190a678c
authored
Aug 10, 2015
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed step size + Fixing METIS
parent
76b26a9b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
62 deletions
+70
-62
src/.deps/pdata-main.Po
src/.deps/pdata-main.Po
+12
-15
src/Decomposition/CartDecomposition.hpp
src/Decomposition/CartDecomposition.hpp
+3
-2
src/Grid/grid_dist_id_unit_test.hpp
src/Grid/grid_dist_id_unit_test.hpp
+12
-42
src/Makefile
src/Makefile
+2
-2
src/gargabe.hpp
src/gargabe.hpp
+40
-0
src/metis_util.hpp
src/metis_util.hpp
+1
-1
No files found.
src/.deps/pdata-main.Po
View file @
190a678c
...
@@ -1309,11 +1309,6 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
...
@@ -1309,11 +1309,6 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IallreduceW.hpp \
../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IallreduceW.hpp \
../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IrecvW.hpp \
../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IrecvW.hpp \
../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IsendW.hpp \
../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IsendW.hpp \
../../OpenFPM_data/src/util/check_no_pointers.hpp \
../../OpenFPM_data/src/util/common.hpp \
../../OpenFPM_data/src/util/util_debug.hpp \
/usr/include/c++/4.9.2/cxxabi.h \
/usr/include/c++/4.9.2/x86_64-redhat-linux/bits/cxxabi_tweaks.h \
../../OpenFPM_vcluster/src/util/Vcluster_log.hpp \
../../OpenFPM_vcluster/src/util/Vcluster_log.hpp \
../../OpenFPM_data/src/timer.hpp \
../../OpenFPM_data/src/timer.hpp \
../../OpenFPM_data/src/Space/SpaceBox.hpp \
../../OpenFPM_data/src/Space/SpaceBox.hpp \
...
@@ -1327,7 +1322,10 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
...
@@ -1327,7 +1322,10 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
../../OpenFPM_data/src/util/object_util.hpp \
../../OpenFPM_data/src/util/object_util.hpp \
../../OpenFPM_data/src/util/object_creator.hpp \
../../OpenFPM_data/src/util/object_creator.hpp \
../../OpenFPM_data/src/util/util_debug.hpp \
../../OpenFPM_data/src/util/util_debug.hpp \
/usr/include/c++/4.9.2/cxxabi.h \
/usr/include/c++/4.9.2/x86_64-redhat-linux/bits/cxxabi_tweaks.h \
../../OpenFPM_data/src/util/check_no_pointers.hpp \
../../OpenFPM_data/src/util/check_no_pointers.hpp \
../../OpenFPM_data/src/util/common.hpp \
../../OpenFPM_data/src/util/object_s_di.hpp \
../../OpenFPM_data/src/util/object_s_di.hpp \
../../OpenFPM_data/src/util/object_si_d.hpp \
../../OpenFPM_data/src/util/object_si_d.hpp \
../../OpenFPM_devices/src/memory/ExtPreAlloc.hpp \
../../OpenFPM_devices/src/memory/ExtPreAlloc.hpp \
...
@@ -1402,6 +1400,7 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
...
@@ -1402,6 +1400,7 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
../../OpenFPM_vcluster/src/Packer.hpp \
../../OpenFPM_vcluster/src/Packer.hpp \
../../OpenFPM_data/src/Grid/util.hpp \
../../OpenFPM_data/src/Grid/util.hpp \
../../OpenFPM_data/src/Vector/util.hpp \
../../OpenFPM_data/src/Vector/util.hpp \
../../OpenFPM_data/src/util/util_debug.hpp \
../../OpenFPM_vcluster/src/Pack_stat.hpp \
../../OpenFPM_vcluster/src/Pack_stat.hpp \
../../OpenFPM_vcluster/src/Pack_selector.hpp \
../../OpenFPM_vcluster/src/Pack_selector.hpp \
../../OpenFPM_vcluster/src/Unpacker.hpp \
../../OpenFPM_vcluster/src/Unpacker.hpp \
...
@@ -4324,16 +4323,6 @@ Grid/grid_dist_id.hpp:
...
@@ -4324,16 +4323,6 @@ Grid/grid_dist_id.hpp:
../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IsendW.hpp:
../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IsendW.hpp:
../../OpenFPM_data/src/util/check_no_pointers.hpp:
../../OpenFPM_data/src/util/common.hpp:
../../OpenFPM_data/src/util/util_debug.hpp:
/usr/include/c++/4.9.2/cxxabi.h:
/usr/include/c++/4.9.2/x86_64-redhat-linux/bits/cxxabi_tweaks.h:
../../OpenFPM_vcluster/src/util/Vcluster_log.hpp:
../../OpenFPM_vcluster/src/util/Vcluster_log.hpp:
../../OpenFPM_data/src/timer.hpp:
../../OpenFPM_data/src/timer.hpp:
...
@@ -4362,8 +4351,14 @@ Grid/grid_dist_key.hpp:
...
@@ -4362,8 +4351,14 @@ Grid/grid_dist_key.hpp:
../../OpenFPM_data/src/util/util_debug.hpp:
../../OpenFPM_data/src/util/util_debug.hpp:
/usr/include/c++/4.9.2/cxxabi.h:
/usr/include/c++/4.9.2/x86_64-redhat-linux/bits/cxxabi_tweaks.h:
../../OpenFPM_data/src/util/check_no_pointers.hpp:
../../OpenFPM_data/src/util/check_no_pointers.hpp:
../../OpenFPM_data/src/util/common.hpp:
../../OpenFPM_data/src/util/object_s_di.hpp:
../../OpenFPM_data/src/util/object_s_di.hpp:
../../OpenFPM_data/src/util/object_si_d.hpp:
../../OpenFPM_data/src/util/object_si_d.hpp:
...
@@ -4512,6 +4507,8 @@ Grid/grid_dist_key.hpp:
...
@@ -4512,6 +4507,8 @@ Grid/grid_dist_key.hpp:
../../OpenFPM_data/src/Vector/util.hpp:
../../OpenFPM_data/src/Vector/util.hpp:
../../OpenFPM_data/src/util/util_debug.hpp:
../../OpenFPM_vcluster/src/Pack_stat.hpp:
../../OpenFPM_vcluster/src/Pack_stat.hpp:
../../OpenFPM_vcluster/src/Pack_selector.hpp:
../../OpenFPM_vcluster/src/Pack_selector.hpp:
...
...
src/Decomposition/CartDecomposition.hpp
View file @
190a678c
...
@@ -357,6 +357,7 @@ private:
...
@@ -357,6 +357,7 @@ private:
sub_domains
.
add
(
sub_d
);
sub_domains
.
add
(
sub_d
);
ss_box
=
sub_d
;
ss_box
=
sub_d
;
ss_box
-=
ss_box
.
getP1
();
bbox
=
sub_d
;
bbox
=
sub_d
;
}
}
...
@@ -414,10 +415,10 @@ private:
...
@@ -414,10 +415,10 @@ private:
// Get the processor bounding Box
// Get the processor bounding Box
::
Box
<
dim
,
T
>
bound
=
getProcessorBounds
();
::
Box
<
dim
,
T
>
bound
=
getProcessorBounds
();
// calculate the sub-divisions
(0.5 for rounding error)
// calculate the sub-divisions
size_t
div
[
dim
];
size_t
div
[
dim
];
for
(
size_t
i
=
0
;
i
<
dim
;
i
++
)
for
(
size_t
i
=
0
;
i
<
dim
;
i
++
)
div
[
i
]
=
(
size_t
)((
bound
.
getHigh
(
i
)
-
bound
.
getLow
(
i
))
/
unit
.
getHigh
(
i
)
+
0.5
);
div
[
i
]
=
(
size_t
)((
bound
.
getHigh
(
i
)
-
bound
.
getLow
(
i
))
/
unit
.
getHigh
(
i
));
// Create shift
// Create shift
Point
<
dim
,
T
>
orig
;
Point
<
dim
,
T
>
orig
;
...
...
src/Grid/grid_dist_id_unit_test.hpp
View file @
190a678c
...
@@ -92,8 +92,12 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_domain_grid_unit_converter_test)
...
@@ -92,8 +92,12 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_domain_grid_unit_converter_test)
void
Test2D
(
const
Box
<
2
,
float
>
&
domain
,
long
int
k
)
void
Test2D
(
const
Box
<
2
,
float
>
&
domain
,
long
int
k
)
{
{
long
int
big_step
=
k
/
30
;
big_step
=
(
big_step
==
0
)
?
1
:
big_step
;
long
int
small_step
=
1
;
// 2D test
// 2D test
for
(
;
k
>=
2
;
k
-=
(
k
>
=
66
)
?
33
:
1
)
for
(
;
k
>=
2
;
k
-=
(
k
>
2
*
big_step
)
?
big_step
:
small_step
)
{
{
BOOST_TEST_CHECKPOINT
(
"Testing 2D grid k="
<<
k
);
BOOST_TEST_CHECKPOINT
(
"Testing 2D grid k="
<<
k
);
...
@@ -117,42 +121,6 @@ void Test2D(const Box<2,float> & domain, long int k)
...
@@ -117,42 +121,6 @@ void Test2D(const Box<2,float> & domain, long int k)
bool
val
=
g_dist
.
getDecomposition
().
check_consistency
();
bool
val
=
g_dist
.
getDecomposition
().
check_consistency
();
BOOST_REQUIRE_EQUAL
(
val
,
true
);
BOOST_REQUIRE_EQUAL
(
val
,
true
);
/////////////// DEBUG /////////////////////
// get the decomposition
auto
&
dec
=
g_dist
.
getDecomposition
();
Vcluster
&
v_cl
=
*
global_v_cluster
;
// check the consistency of the decomposition
val
=
dec
.
check_consistency
();
BOOST_REQUIRE_EQUAL
(
val
,
true
);
// for each local volume
// Get the number of local grid needed
size_t
n_grid
=
dec
.
getNLocalHyperCube
();
size_t
vol
=
0
;
// Allocate the grids
for
(
size_t
i
=
0
;
i
<
n_grid
;
i
++
)
{
// Get the local hyper-cube
SpaceBox
<
2
,
float
>
sub
=
dec
.
getLocalHyperCube
(
i
);
Box
<
2
,
size_t
>
g_box
=
g_dist
.
getCellDecomposer
().
convertDomainSpaceIntoGridUnits
(
sub
);
vol
+=
g_box
.
getVolumeKey
();
}
v_cl
.
reduce
(
vol
);
v_cl
.
execute
();
BOOST_REQUIRE_EQUAL
(
vol
,
k
*
k
);
/////////////////////////////////////
// Grid sm
// Grid sm
grid_sm
<
2
,
void
>
info
(
sz
);
grid_sm
<
2
,
void
>
info
(
sz
);
...
@@ -228,8 +196,12 @@ void Test2D(const Box<2,float> & domain, long int k)
...
@@ -228,8 +196,12 @@ void Test2D(const Box<2,float> & domain, long int k)
void
Test3D
(
const
Box
<
3
,
float
>
&
domain
,
long
int
k
)
void
Test3D
(
const
Box
<
3
,
float
>
&
domain
,
long
int
k
)
{
{
// 3D test
long
int
big_step
=
k
/
30
;
for
(
;
k
>=
2
;
k
-=
(
k
>=
33
)
?
5
:
1
)
big_step
=
(
big_step
==
0
)
?
1
:
big_step
;
long
int
small_step
=
1
;
// 2D test
for
(
;
k
>=
2
;
k
-=
(
k
>
2
*
big_step
)
?
big_step
:
small_step
)
{
{
BOOST_TEST_CHECKPOINT
(
"Testing 3D grid k="
<<
k
);
BOOST_TEST_CHECKPOINT
(
"Testing 3D grid k="
<<
k
);
if
(
global_v_cluster
->
getProcessUnitID
()
==
0
)
if
(
global_v_cluster
->
getProcessUnitID
()
==
0
)
...
@@ -323,8 +295,6 @@ void Test3D(const Box<3,float> & domain, long int k)
...
@@ -323,8 +295,6 @@ void Test3D(const Box<3,float> & domain, long int k)
++
domg
;
++
domg
;
}
}
}
}
}
}
...
@@ -338,8 +308,8 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_iterator_test_use)
...
@@ -338,8 +308,8 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_iterator_test_use)
long
int
k
=
1024
*
1024
*
global_v_cluster
->
getProcessingUnits
();
long
int
k
=
1024
*
1024
*
global_v_cluster
->
getProcessingUnits
();
k
=
std
::
pow
(
k
,
1
/
2.
);
k
=
std
::
pow
(
k
,
1
/
2.
);
Test2D
(
domain
,
k
);
Test2D
(
domain
,
k
);
// Domain
// Domain
Box
<
3
,
float
>
domain3
({
0.0
,
0.0
,
0.0
},{
1.0
,
1.0
,
1.0
});
Box
<
3
,
float
>
domain3
({
0.0
,
0.0
,
0.0
},{
1.0
,
1.0
,
1.0
});
...
...
src/Makefile
View file @
190a678c
...
@@ -216,8 +216,8 @@ LIBS =
...
@@ -216,8 +216,8 @@ LIBS =
LTLIBOBJS
=
LTLIBOBJS
=
MAKEINFO
=
${SHELL}
/home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing makeinfo
MAKEINFO
=
${SHELL}
/home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing makeinfo
METIS
=
METIS
=
METIS_INCLUDE
=
-I
/home/i-bird/
METIS
/include
METIS_INCLUDE
=
-I
/home/i-bird/
Desktop/MOSAIC/OpenFPM_project/metis_install/
/include
METIS_LIB
=
-L
/home/i-bird/
METIS
/lib
METIS_LIB
=
-L
/home/i-bird/
Desktop/MOSAIC/OpenFPM_project/metis_install/
/lib
MKDIR_P
=
/usr/bin/mkdir
-p
MKDIR_P
=
/usr/bin/mkdir
-p
NVCC
=
/usr/local/cuda/bin/nvcc
NVCC
=
/usr/local/cuda/bin/nvcc
NVCCFLAGS
=
-O3
NVCCFLAGS
=
-O3
...
...
src/gargabe.hpp
View file @
190a678c
...
@@ -125,4 +125,44 @@
...
@@ -125,4 +125,44 @@
#endif
#endif
/////////////// DEBUG /////////////////////
// get the decomposition
auto
&
dec
=
g_dist
.
getDecomposition
();
Vcluster
&
v_cl
=
*
global_v_cluster
;
// check the consistency of the decomposition
val
=
dec
.
check_consistency
();
BOOST_REQUIRE_EQUAL
(
val
,
true
);
// for each local volume
// Get the number of local grid needed
size_t
n_grid
=
dec
.
getNLocalHyperCube
();
size_t
vol
=
0
;
openfpm
::
vector
<
Box
<
2
,
size_t
>>
v_b
;
// Allocate the grids
for
(
size_t
i
=
0
;
i
<
n_grid
;
i
++
)
{
// Get the local hyper-cube
SpaceBox
<
2
,
float
>
sub
=
dec
.
getLocalHyperCube
(
i
);
Box
<
2
,
size_t
>
g_box
=
g_dist
.
getCellDecomposer
().
convertDomainSpaceIntoGridUnits
(
sub
);
v_b
.
add
(
g_box
);
vol
+=
g_box
.
getVolumeKey
();
}
v_cl
.
reduce
(
vol
);
v_cl
.
execute
();
BOOST_REQUIRE_EQUAL
(
vol
,
k
*
k
);
/////////////////////////////////////
#endif
/* GARGABE_HPP_ */
#endif
/* GARGABE_HPP_ */
src/metis_util.hpp
View file @
190a678c
...
@@ -254,7 +254,7 @@ public:
...
@@ -254,7 +254,7 @@ public:
if
(
Mg
.
nparts
[
0
]
!=
1
)
if
(
Mg
.
nparts
[
0
]
!=
1
)
{
{
// Decompose
// Decompose
METIS_PartGraph
Kway
(
Mg
.
nvtxs
,
Mg
.
ncon
,
Mg
.
xadj
,
Mg
.
adjncy
,
Mg
.
vwgt
,
Mg
.
vsize
,
Mg
.
adjwgt
,
METIS_PartGraph
Recursive
(
Mg
.
nvtxs
,
Mg
.
ncon
,
Mg
.
xadj
,
Mg
.
adjncy
,
Mg
.
vwgt
,
Mg
.
vsize
,
Mg
.
adjwgt
,
Mg
.
nparts
,
Mg
.
tpwgts
,
Mg
.
ubvec
,
Mg
.
options
,
Mg
.
objval
,
Mg
.
part
);
Mg
.
nparts
,
Mg
.
tpwgts
,
Mg
.
ubvec
,
Mg
.
options
,
Mg
.
objval
,
Mg
.
part
);
// vertex id
// vertex id
...
...
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