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
1a1686d9
Commit
1a1686d9
authored
Aug 24, 2018
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New MPI + MAP on device finally working
parent
50c8a15d
Changes
57
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
410 additions
and
196 deletions
+410
-196
configure.ac
configure.ac
+1
-0
images/CartDecomposition_gen_vtk.cpp
images/CartDecomposition_gen_vtk.cpp
+1
-1
images/Makefile.am
images/Makefile.am
+4
-4
images/vector.cpp
images/vector.cpp
+1
-3
install
install
+1
-1
openfpm_data
openfpm_data
+1
-1
openfpm_devices
openfpm_devices
+1
-1
openfpm_vcluster
openfpm_vcluster
+1
-1
script/detect_gcc
script/detect_gcc
+12
-16
script/install_MPI.sh
script/install_MPI.sh
+2
-1
script/remove_old
script/remove_old
+1
-1
src/DLB/DLB.hpp
src/DLB/DLB.hpp
+2
-2
src/Decomposition/CartDecomposition.hpp
src/Decomposition/CartDecomposition.hpp
+29
-4
src/Decomposition/CartDecomposition_ext.hpp
src/Decomposition/CartDecomposition_ext.hpp
+1
-1
src/Decomposition/Distribution/DistParMetisDistribution.hpp
src/Decomposition/Distribution/DistParMetisDistribution.hpp
+2
-2
src/Decomposition/Distribution/Distribution_unit_tests.hpp
src/Decomposition/Distribution/Distribution_unit_tests.hpp
+4
-4
src/Decomposition/Distribution/MetisDistribution.hpp
src/Decomposition/Distribution/MetisDistribution.hpp
+2
-2
src/Decomposition/Distribution/ParMetisDistribution.hpp
src/Decomposition/Distribution/ParMetisDistribution.hpp
+2
-2
src/Decomposition/Distribution/SpaceDistribution.hpp
src/Decomposition/Distribution/SpaceDistribution.hpp
+2
-2
src/Decomposition/Distribution/metis_util_unit_test.hpp
src/Decomposition/Distribution/metis_util_unit_test.hpp
+1
-1
src/Decomposition/Distribution/parmetis_dist_util.hpp
src/Decomposition/Distribution/parmetis_dist_util.hpp
+2
-2
src/Decomposition/Distribution/parmetis_util.hpp
src/Decomposition/Distribution/parmetis_util.hpp
+2
-2
src/Decomposition/ORB.hpp
src/Decomposition/ORB.hpp
+1
-1
src/Decomposition/cuda/CartDecomposition_gpu.cuh
src/Decomposition/cuda/CartDecomposition_gpu.cuh
+3
-0
src/Decomposition/cuda/decomposition_cuda_tests.cu
src/Decomposition/cuda/decomposition_cuda_tests.cu
+1
-1
src/Decomposition/dec_optimizer_unit_test.hpp
src/Decomposition/dec_optimizer_unit_test.hpp
+1
-1
src/Decomposition/ie_ghost.hpp
src/Decomposition/ie_ghost.hpp
+3
-3
src/Decomposition/nn_processor_unit_test.hpp
src/Decomposition/nn_processor_unit_test.hpp
+3
-3
src/Decomposition/tests/CartDecomposition_unit_test.cpp
src/Decomposition/tests/CartDecomposition_unit_test.cpp
+6
-6
src/Graph/DistGraphFactory.hpp
src/Graph/DistGraphFactory.hpp
+2
-2
src/Graph/dist_map_graph.hpp
src/Graph/dist_map_graph.hpp
+2
-2
src/Graph/dist_map_graph_unit_test.hpp
src/Graph/dist_map_graph_unit_test.hpp
+4
-4
src/Grid/Iterators/grid_dist_id_iterators_unit_tests.hpp
src/Grid/Iterators/grid_dist_id_iterators_unit_tests.hpp
+6
-6
src/Grid/grid_dist_id.hpp
src/Grid/grid_dist_id.hpp
+2
-2
src/Grid/grid_dist_id_comm.hpp
src/Grid/grid_dist_id_comm.hpp
+1
-1
src/Grid/tests/grid_dist_id_HDF5_chckpnt_restart_test.cpp
src/Grid/tests/grid_dist_id_HDF5_chckpnt_restart_test.cpp
+2
-2
src/Grid/tests/grid_dist_id_unit_test.cpp
src/Grid/tests/grid_dist_id_unit_test.cpp
+17
-17
src/Grid/tests/grid_dist_id_unit_test_ext_dom.hpp
src/Grid/tests/grid_dist_id_unit_test_ext_dom.hpp
+1
-1
src/Grid/tests/grid_dist_id_unit_test_unb_ghost.hpp
src/Grid/tests/grid_dist_id_unit_test_unb_ghost.hpp
+3
-3
src/Makefile.am
src/Makefile.am
+10
-3
src/Vector/cuda/vector_dist_cuda_func_test.cu
src/Vector/cuda/vector_dist_cuda_func_test.cu
+5
-2
src/Vector/cuda/vector_dist_cuda_funcs.cuh
src/Vector/cuda/vector_dist_cuda_funcs.cuh
+2
-2
src/Vector/cuda/vector_dist_gpu_unit_tests.cu
src/Vector/cuda/vector_dist_gpu_unit_tests.cu
+85
-1
src/Vector/performance/vector_dist_performance_common.hpp
src/Vector/performance/vector_dist_performance_common.hpp
+2
-2
src/Vector/tests/vector_dist_HDF5_chckpnt_restart_test.cpp
src/Vector/tests/vector_dist_HDF5_chckpnt_restart_test.cpp
+1
-1
src/Vector/tests/vector_dist_NN_tests.cpp
src/Vector/tests/vector_dist_NN_tests.cpp
+4
-4
src/Vector/tests/vector_dist_cell_list_tests.cpp
src/Vector/tests/vector_dist_cell_list_tests.cpp
+13
-13
src/Vector/tests/vector_dist_complex_prp_unit_test.cpp
src/Vector/tests/vector_dist_complex_prp_unit_test.cpp
+1
-1
src/Vector/tests/vector_dist_unit_test.cpp
src/Vector/tests/vector_dist_unit_test.cpp
+17
-17
src/Vector/tests/vector_dist_util_unit_tests.hpp
src/Vector/tests/vector_dist_util_unit_tests.hpp
+4
-2
src/Vector/vector_dist.hpp
src/Vector/vector_dist.hpp
+6
-6
src/Vector/vector_dist_comm.hpp
src/Vector/vector_dist_comm.hpp
+75
-26
src/Vector/vector_dist_dlb_test.hpp
src/Vector/vector_dist_dlb_test.hpp
+4
-4
src/initialize/initialize_wrapper.hpp
src/initialize/initialize_wrapper.hpp
+20
-0
src/initialize/initialize_wrapper_cpu.cpp
src/initialize/initialize_wrapper_cpu.cpp
+13
-0
src/initialize/initialize_wrapper_cuda.cu
src/initialize/initialize_wrapper_cuda.cu
+12
-0
src/unit_test_init_cleanup.hpp
src/unit_test_init_cleanup.hpp
+3
-3
No files found.
configure.ac
View file @
1a1686d9
...
...
@@ -412,6 +412,7 @@ if test x"$NVCC_EXIST" = x"yes"; then
fi
else
gpu_support=no
INITIALIZATION_SOURCE="initialize_openfpm.cpp"
fi
if test x$gpu_support = x"no"; then
...
...
images/CartDecomposition_gen_vtk.cpp
View file @
1a1686d9
...
...
@@ -13,7 +13,7 @@ int main(int argc, char ** argv)
openfpm_init
(
&
argc
,
&
argv
);
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
//! [Create CartDecomposition vtk gen]
CartDecomposition
<
2
,
float
>
dec
(
vcl
);
...
...
images/Makefile.am
View file @
1a1686d9
LINKLIBS
=
$(HDF5_LDFLAGS)
$(HDF5_LIBS)
$(OPENMP_LDFLAGS)
$(LIBHILBERT_LIB)
$(PETSC_LIB)
$(SUITESPARSE_LIBS)
$(LAPACK_LIBS)
$(BLAS_LIBS)
$(METIS_LIB)
$(PARMETIS_LIB)
$(PTHREAD_LIBS)
$(OPT_LIBS)
$(BOOST_LDFLAGS)
$(BOOST_IOSTREAMS_LIB)
$(CUDA_LIBS)
noinst_PROGRAMS
=
cart_dec metis_dec dom_box vector_dist
cart_dec_SOURCES
=
CartDecomposition_gen_vtk.cpp ../src/lib/pdata.cpp ../openfpm_devices/src/memory/
HeapMemory.cpp
../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
cart_dec_SOURCES
=
CartDecomposition_gen_vtk.cpp ../src/lib/pdata.cpp ../openfpm_devices/src/memory/
CudaMemory.cu ../openfpm_devices/src/memory/HeapMemory.cpp
../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
cart_dec_CXXFLAGS
=
-Wno-unknown-pragmas
$(OPENMP_CFLAGS)
$(AM_CXXFLAGS)
$(PETSC_INCLUDE)
$(METIS_INCLUDE)
$(PARMETIS_INCLUDE)
$(CUDA_CFLAGS)
$(INCLUDES_PATH)
$(BOOST_CPPFLAGS)
-I
../src
-Wno-unused-function
-Wno-unused-local-typedefs
cart_dec_CFLAGS
=
$(OPENMP_CFLAGS)
$(CUDA_CFLAGS)
cart_dec_LDADD
=
$(LINKLIBS)
-lparmetis
-lmetis
metis_dec_SOURCES
=
Metis_gen_vtk.cpp ../src/lib/pdata.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
metis_dec_SOURCES
=
Metis_gen_vtk.cpp ../src/lib/pdata.cpp ../openfpm_devices/src/memory/
CudaMemory.cu ../openfpm_devices/src/memory/
HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
metis_dec_CXXFLAGS
=
-Wno-unknown-pragmas
$(OPENMP_CFLAGS)
$(AM_CXXFLAGS)
$(PETSC_INCLUDE)
$(METIS_INCLUDE)
$(CUDA_CFLAGS)
$(INCLUDES_PATH)
$(BOOST_CPPFLAGS)
-I
../src
-Wno-unused-function
-Wno-unused-local-typedefs
metis_dec_CFLAGS
=
$(OPENMP_CFLAGS)
$(CUDA_CFLAGS)
metis_dec_LDADD
=
$(LINKLIBS)
-lmetis
dom_box_SOURCES
=
domain_gen_vtk.cpp ../src/lib/pdata.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
dom_box_SOURCES
=
domain_gen_vtk.cpp ../src/lib/pdata.cpp ../openfpm_devices/src/memory/
CudaMemory.cu ../openfpm_devices/src/memory/
HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
dom_box_CXXFLAGS
=
-Wno-unknown-pragmas
$(OPENMP_CFLAGS)
$(AM_CXXFLAGS)
$(PETSC_INCLUDE)
$(METIS_INCLUDE)
$(CUDA_CFLAGS)
$(INCLUDES_PATH)
$(BOOST_CPPFLAGS)
-I
../src
-Wno-unused-function
-Wno-unused-local-typedefs
dom_box_CFLAGS
=
$(OPENMP_CFLAGS)
$(CUDA_CFLAGS)
dom_box_LDADD
=
$(LINKLIBS)
vector_dist_SOURCES
=
vector.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_devices/src/Memleak_check.cpp
vector_dist_SOURCES
=
vector.cpp ../openfpm_devices/src/memory/
CudaMemory.cu ../openfpm_devices/src/memory/
HeapMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_devices/src/Memleak_check.cpp
vector_dist_CXXFLAGS
=
-Wno-unknown-pragmas
$(OPENMP_CFLAGS)
$(AM_CXXFLAGS)
$(LIBHILBERT_INCLUDE)
$(PETSC_INCLUDE)
$(PARMETIS_INCLUDE)
$(METIS_INCLUDE)
$(CUDA_CFLAGS)
$(INCLUDES_PATH)
$(HDF5_CPPFLAGS)
$(BOOST_CPPFLAGS)
-I
../src
-Wno-unused-function
-Wno-unused-local-typedefs
vector_dist_CFLAGS
=
$(OPENMP_CFLAGS)
$(CUDA_CFLAGS)
vector_dist_LDADD
=
$(LINKLIBS)
-lparmetis
-lmetis
...
...
images/vector.cpp
View file @
1a1686d9
...
...
@@ -50,9 +50,7 @@ int main(int argc, char* argv[])
// randomly in the domain, we create a Box that define our domain, boundary conditions, and ghost
//
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
typedef
Point
<
2
,
float
>
s
;
Vcluster
<>
&
v_cl
=
create_vcluster
();
// set the seed
// create the random generator engine
...
...
install
View file @
1a1686d9
...
...
@@ -176,7 +176,6 @@ if [ $? -ne 0 ]; then
exit
1
fi
## check for options
echo
-e
"
\0
33[1;34;5mDEPENCENCIES INSTALLATION DIR
\0
33[0m"
...
...
@@ -317,6 +316,7 @@ HDF5_System_prv=1
LIBHILBERT_installed
=
0
conf_err
=
1
if
[
$install_req
-eq
0
]
;
then
./configure
$options
$configure_options
"
$configure_blas_option
"
else
...
...
openfpm_data
@
0261ed4b
Subproject commit
66fdd0bdd308bd78efe3c14a7d2bf9290e35f550
Subproject commit
0261ed4b804309864d899bedec46a67e5e6cfe95
openfpm_devices
@
e5d5d31a
Subproject commit
c751d466195fd0271acf1933a6b0e9d2233d3529
Subproject commit
e5d5d31a0af09312118f72c0818a824443ba80fb
openfpm_vcluster
@
11a0f824
Subproject commit
ec95a342bc6fc783099f3cb044ff4524348bfedf
Subproject commit
11a0f824c111e686ad2388cec485ffcaafab5560
script/detect_gcc
View file @
1a1686d9
...
...
@@ -4,20 +4,6 @@ function haveProg() {
[
-x
"
$(
command
-v
$1
)
"
]
}
function
gpp_clang
()
{
if
[
x
"
$possible_solutions_command
"
==
x
"g++"
]
;
then
CXX
=
g++
CC
=
gcc
F77
=
gfortran
FC
=
gfortran
else
CXX
=
clang++
CC
=
clang
F77
=
gfortran
FC
=
gfortran
fi
}
function
detect_compiler
()
{
...
...
@@ -25,6 +11,7 @@ function detect_compiler()
icpc_found
=
0
dgc_ret
=
0
if
[
x
"
$CXX
"
!=
x
""
-o
x
"
$CC
"
!=
x
""
-o
x
"
$F77
"
!=
x
""
-o
x
"
$FC
"
!=
x
""
]
;
then
if
[
x
"
$CXX
"
==
x
""
]
;
then
...
...
@@ -65,6 +52,7 @@ function detect_compiler()
return
fi
# First we try to understand if g++ command line is linked to clang
if
haveProg g++
;
then
...
...
@@ -111,6 +99,7 @@ function detect_compiler()
fi
fi
g++
--version
|
grep
"g++"
>
/dev/null 2>&1
if
[
$?
==
0
-a
$gpp_found
-ne
1
]
;
then
dgc_major
=
$(
g++
--version
|
grep
g++ |
sed
's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g'
)
...
...
@@ -147,6 +136,7 @@ function detect_compiler()
fi
fi
g++
--version
|
grep
"clang"
>
/dev/null 2>&1
if
[
$?
==
0
-a
$gpp_found
-ne
1
]
;
then
dgc_major
=
$(
g++
--version
|
grep
g++ |
sed
's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g'
)
...
...
@@ -224,11 +214,17 @@ function detect_compiler()
FC
=
ifort
dgc_compiler
=
icpc
else
gpp_clang
CXX
=
g++
CC
=
gcc
F77
=
gfortran
FC
=
gfortran
fi
dgc_ret
=
1
elif
[
$gpp_found
-eq
1
]
;
then
gpp_clang
CXX
=
g++
CC
=
gcc
F77
=
gfortran
FC
=
gfortran
elif
[
$icpc_found
-eq
1
]
;
then
CXX
=
icpc
CC
=
icc
...
...
script/install_MPI.sh
View file @
1a1686d9
...
...
@@ -25,7 +25,8 @@ cd openmpi-3.1.1
#
#
./configure
--with-cuda
--prefix
=
$1
/MPI
--enable-mpi-fortran
=
yes
CC
=
$3
CXX
=
$4
F77
=
$4
FC
=
$5
./configure
--with-cuda
--prefix
=
$1
/MPI
--enable-mpi-fortran
=
yes
CC
=
$3
CXX
=
$4
F77
=
$5
FC
=
$5
make
-j
$2
make
install
...
...
script/remove_old
View file @
1a1686d9
...
...
@@ -191,7 +191,7 @@ function remove_old()
version
=
$(
cat
$1
/MPI/version
)
if
[
x
"
$version
"
!=
x
"3"
]
;
then
echo
-e
"
\0
33[1;34;5m --------------------------------------------------------------------------------------
\0
33[0m"
echo
-e
"
\0
33[1;34;5m MPI has been updated to version
2
.1.1, the component will be updated automatically
\0
33[0m"
echo
-e
"
\0
33[1;34;5m MPI has been updated to version
3
.1.1, the component will be updated automatically
\0
33[0m"
echo
-e
"
\0
33[1;34;5m --------------------------------------------------------------------------------------
\0
33[0m"
sleep
5
rm
-rf
$1
/MPI/include
...
...
src/DLB/DLB.hpp
View file @
1a1686d9
...
...
@@ -69,7 +69,7 @@ public:
private:
//! Runtime virtual cluster machine
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
//! Structure that will contain all the timings
Times
timeInfo
;
...
...
@@ -165,7 +165,7 @@ public:
*
* \param v_cl virtual cluster object
*/
DLB
(
Vcluster
&
v_cl
)
:
DLB
(
Vcluster
<>
&
v_cl
)
:
v_cl
(
v_cl
)
{
}
...
...
src/Decomposition/CartDecomposition.hpp
View file @
1a1686d9
...
...
@@ -197,7 +197,7 @@ protected:
size_t
magn
[
dim
];
//! Runtime virtual cluster machine
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
//! Create distribution
Distribution
dist
;
...
...
@@ -353,7 +353,7 @@ public:
* \param opt option (one option is to construct)
*
*/
void
createSubdomains
(
Vcluster
&
v_cl
,
const
size_t
(
&
bc
)[
dim
],
size_t
opt
=
0
)
void
createSubdomains
(
Vcluster
<>
&
v_cl
,
const
size_t
(
&
bc
)[
dim
],
size_t
opt
=
0
)
{
int
p_id
=
v_cl
.
getProcessUnitID
();
...
...
@@ -708,7 +708,7 @@ public:
* \param v_cl Virtual cluster, used internally to handle or pipeline communication
*
*/
CartDecomposition
(
Vcluster
&
v_cl
)
CartDecomposition
(
Vcluster
<>
&
v_cl
)
:
nn_prcs
<
dim
,
T
>
(
v_cl
),
v_cl
(
v_cl
),
dist
(
v_cl
),
ref_cnt
(
0
)
{
// Reset the box to zero
...
...
@@ -1622,6 +1622,31 @@ public:
return
processorID
<
Mem
>
(
pt
)
==
v_cl
.
getProcessUnitID
();
}
/*! \brief Check if the particle is local considering boundary conditions
*
* \warning if the particle id outside the domain and non periodic boundary the result
* is unreliable
*
*
* \param p object position
* \param bc boundary conditions
*
* \return true if it is local
*
*/
bool
isLocalBC
(
const
Point
<
dim
,
T
>
&
p
,
const
size_t
(
&
bc
)[
dim
])
const
{
Point
<
dim
,
T
>
pt
=
p
;
for
(
size_t
i
=
0
;
i
<
dim
;
i
++
)
{
if
(
bc
[
i
]
==
PERIODIC
)
pt
.
get
(
i
)
=
openfpm
::
math
::
periodic_l
(
p
[
i
],
domain
.
getHigh
(
i
),
domain
.
getLow
(
i
));
}
return
processorID
(
pt
)
==
v_cl
.
getProcessUnitID
();
}
/*! \brief Get the domain Cells
*
* It return all the cells-id that are inside the processor-domain
...
...
@@ -1789,7 +1814,7 @@ public:
* \return the Virtual cluster machine
*
*/
Vcluster
&
getVC
()
const
Vcluster
<>
&
getVC
()
const
{
#ifdef SE_CLASS2
check_valid
(
this
,
8
);
...
...
src/Decomposition/CartDecomposition_ext.hpp
View file @
1a1686d9
...
...
@@ -167,7 +167,7 @@ public:
* \param v_cl VCluster
*
*/
CartDecomposition_ext
(
Vcluster
&
v_cl
)
CartDecomposition_ext
(
Vcluster
<>
&
v_cl
)
:
CartDecomposition
<
dim
,
T
,
Memory
,
layout_base
,
Distribution
>
(
v_cl
)
{
}
...
...
src/Decomposition/Distribution/DistParMetisDistribution.hpp
View file @
1a1686d9
...
...
@@ -17,7 +17,7 @@ template<unsigned int dim, typename T>
class
DistParMetisDistribution
{
//! Vcluster
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
//! Structure that store the cartesian grid information
grid_sm
<
dim
,
void
>
gr
;
...
...
@@ -73,7 +73,7 @@ public:
*
* @param v_cl Vcluster to use as communication object in this class
*/
DistParMetisDistribution
(
Vcluster
&
v_cl
)
:
DistParMetisDistribution
(
Vcluster
<>
&
v_cl
)
:
v_cl
(
v_cl
),
parmetis_graph
(
v_cl
,
v_cl
.
getProcessingUnits
()),
vtxdist
(
v_cl
.
getProcessingUnits
()
+
1
),
partitions
(
v_cl
.
getProcessingUnits
()),
v_per_proc
(
v_cl
.
getProcessingUnits
())
{
...
...
src/Decomposition/Distribution/Distribution_unit_tests.hpp
View file @
1a1686d9
...
...
@@ -59,7 +59,7 @@ BOOST_AUTO_TEST_SUITE (Distribution_test)
BOOST_AUTO_TEST_CASE
(
Metis_distribution_test
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessingUnits
()
!=
3
)
return
;
...
...
@@ -180,7 +180,7 @@ BOOST_AUTO_TEST_CASE( Metis_distribution_test)
BOOST_AUTO_TEST_CASE
(
Parmetis_distribution_test
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessingUnits
()
!=
3
)
return
;
...
...
@@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE( Parmetis_distribution_test)
BOOST_AUTO_TEST_CASE
(
DistParmetis_distribution_test
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessingUnits
()
!=
3
)
return
;
...
...
@@ -387,7 +387,7 @@ BOOST_AUTO_TEST_CASE( DistParmetis_distribution_test)
BOOST_AUTO_TEST_CASE
(
Space_distribution_test
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessingUnits
()
!=
3
)
return
;
...
...
src/Decomposition/Distribution/MetisDistribution.hpp
View file @
1a1686d9
...
...
@@ -30,7 +30,7 @@ template<unsigned int dim, typename T>
class
MetisDistribution
{
//! Vcluster
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
//! Structure that store the cartesian grid information
grid_sm
<
dim
,
void
>
gr
;
...
...
@@ -111,7 +111,7 @@ public:
* \param v_cl vcluster
*
*/
MetisDistribution
(
Vcluster
&
v_cl
)
MetisDistribution
(
Vcluster
<>
&
v_cl
)
:
v_cl
(
v_cl
),
metis_graph
(
gp
)
{
#ifdef SE_CLASS2
...
...
src/Decomposition/Distribution/ParMetisDistribution.hpp
View file @
1a1686d9
...
...
@@ -39,7 +39,7 @@ class ParMetisDistribution
bool
is_distributed
=
false
;
//! Vcluster
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
//! Structure that store the cartesian grid information
grid_sm
<
dim
,
void
>
gr
;
...
...
@@ -283,7 +283,7 @@ public:
*
* \param v_cl Vcluster to use as communication object in this class
*/
ParMetisDistribution
(
Vcluster
&
v_cl
)
ParMetisDistribution
(
Vcluster
<>
&
v_cl
)
:
is_distributed
(
false
),
v_cl
(
v_cl
),
parmetis_graph
(
v_cl
,
v_cl
.
getProcessingUnits
()),
vtxdist
(
v_cl
.
getProcessingUnits
()
+
1
),
partitions
(
v_cl
.
getProcessingUnits
()),
v_per_proc
(
v_cl
.
getProcessingUnits
())
{
}
...
...
src/Decomposition/Distribution/SpaceDistribution.hpp
View file @
1a1686d9
...
...
@@ -24,7 +24,7 @@ template<unsigned int dim, typename T>
class
SpaceDistribution
{
//! Vcluster
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
//! Structure that store the cartesian grid information
grid_sm
<
dim
,
void
>
gr
;
...
...
@@ -42,7 +42,7 @@ public:
*
* \param v_cl Vcluster to use as communication object in this class
*/
SpaceDistribution
(
Vcluster
&
v_cl
)
SpaceDistribution
(
Vcluster
<>
&
v_cl
)
:
v_cl
(
v_cl
)
{
}
...
...
src/Decomposition/Distribution/metis_util_unit_test.hpp
View file @
1a1686d9
...
...
@@ -25,7 +25,7 @@ BOOST_AUTO_TEST_SUITE( Metis_test )
BOOST_AUTO_TEST_CASE
(
Metis_test_use
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessingUnits
()
!=
3
)
return
;
...
...
src/Decomposition/Distribution/parmetis_dist_util.hpp
View file @
1a1686d9
...
...
@@ -103,7 +103,7 @@ class DistParmetis
MPI_Comm
comm
=
(
MPI_Comm
)
NULL
;
//! VCluster
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
//! Process rank information
int
p_id
=
0
;
...
...
@@ -178,7 +178,7 @@ public:
* \param nc number of partitions
*
*/
DistParmetis
(
Vcluster
&
v_cl
,
size_t
nc
)
:
DistParmetis
(
Vcluster
<>
&
v_cl
,
size_t
nc
)
:
v_cl
(
v_cl
),
nc
(
nc
)
{
// TODO Move into VCluster
...
...
src/Decomposition/Distribution/parmetis_util.hpp
View file @
1a1686d9
...
...
@@ -108,7 +108,7 @@ class Parmetis
MPI_Comm
comm
=
(
MPI_Comm
)
NULL
;
//! VCluster
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
//! Process rank information
int
p_id
=
0
;
...
...
@@ -210,7 +210,7 @@ public:
* \param nc number of partitions
*
*/
Parmetis
(
Vcluster
&
v_cl
,
size_t
nc
)
Parmetis
(
Vcluster
<>
&
v_cl
,
size_t
nc
)
:
v_cl
(
v_cl
),
nc
(
nc
),
n_dec
(
0
)
{
#ifdef SE_CLASS1
...
...
src/Decomposition/ORB.hpp
View file @
1a1686d9
...
...
@@ -98,7 +98,7 @@ template<unsigned int dim, typename T, typename loc_wg=openfpm::vector<float>, t
class
ORB
{
// Virtual cluster
Vcluster
&
v_cl
;
Vcluster
<>
&
v_cl
;
// particle coordinate accumulator
openfpm
::
vector
<
T
>
cm
;
...
...
src/Decomposition/cuda/CartDecomposition_gpu.cuh
View file @
1a1686d9
...
...
@@ -20,6 +20,7 @@ __global__ void process_id_proc_each_part(cartdec_gpu cdg, particles_type parts,
Point
<
3
,
float
>
xp
=
parts
.
template
get
<
0
>(
p
);
int
pr
=
cdg
.
processorIDBC
(
xp
);
output
.
template
get
<
1
>(
p
)
=
(
pr
==
rank
)
?-
1
:
pr
;
output
.
template
get
<
0
>(
p
)
=
p
;
}
...
...
@@ -55,6 +56,8 @@ __device__ __host__ inline int processorID_impl(T2 & p, fine_s_type & fine_s, vs
#endif
return
sub_domains_global
.
template
get
<
1
>(
e
);
}
...
...
src/Decomposition/cuda/decomposition_cuda_tests.cu
View file @
1a1686d9
...
...
@@ -14,7 +14,7 @@ BOOST_AUTO_TEST_CASE( decomposition_to_gpu_test_use )
auto
&
v_cl
=
create_vcluster
();
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
CartDecomposition
<
3
,
float
,
CudaMemory
,
memory_traits_inte
>
dec
(
vcl
);
...
...
src/Decomposition/dec_optimizer_unit_test.hpp
View file @
1a1686d9
...
...
@@ -135,7 +135,7 @@ BOOST_AUTO_TEST_CASE( dec_optimizer_test_use_p)
BOOST_AUTO_TEST_CASE
(
dec_optimizer_disconnected_subdomains_np
)
{
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
// Test for only 3 processors
if
(
vcl
.
getProcessingUnits
()
!=
3
)
...
...
src/Decomposition/ie_ghost.hpp
View file @
1a1686d9
...
...
@@ -140,7 +140,7 @@ class ie_ghost
* \note To an explanation about the sectors see getShiftVectors
*
*/
inline
size_t
ebx_ibx_form
(
size_t
k
,
size_t
b
,
size_t
p_id
,
const
comb
<
dim
>
&
c
,
size_t
N_b
,
Vcluster
&
v_cl
,
const
bool
ei
)
inline
size_t
ebx_ibx_form
(
size_t
k
,
size_t
b
,
size_t
p_id
,
const
comb
<
dim
>
&
c
,
size_t
N_b
,
Vcluster
<>
&
v_cl
,
const
bool
ei
)
{
comb
<
dim
>
cext
=
c
;
...
...
@@ -192,7 +192,7 @@ protected:
* \see calculateGhostBoxes
*
*/
void
create_box_nn_processor_ext
(
Vcluster
&
v_cl
,
void
create_box_nn_processor_ext
(
Vcluster
<>
&
v_cl
,
Ghost
<
dim
,
T
>
&
ghost
,
openfpm
::
vector
<
SpaceBox
<
dim
,
T
>>
&
sub_domains
,
const
openfpm
::
vector
<
openfpm
::
vector
<
long
unsigned
int
>
>
&
box_nn_processor
,
...
...
@@ -293,7 +293,7 @@ protected:
* \see calculateGhostBoxes
*
*/
void
create_box_nn_processor_int
(
Vcluster
&
v_cl
,
void
create_box_nn_processor_int
(
Vcluster
<>
&
v_cl
,
Ghost
<
dim
,
T
>
&
ghost
,
openfpm
::
vector
<
SpaceBox
<
dim
,
T
>>
&
sub_domains
,
const
openfpm
::
vector
<
openfpm
::
vector
<
long
unsigned
int
>
>
&
box_nn_processor
,
...
...
src/Decomposition/nn_processor_unit_test.hpp
View file @
1a1686d9
...
...
@@ -12,7 +12,7 @@
void
create_decomposition2x2
(
openfpm
::
vector
<
openfpm
::
vector
<
long
unsigned
int
>>
&
box_nn_processor
,
openfpm
::
vector
<
SpaceBox
<
2
,
float
>>
&
sub_domains
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
box_nn_processor
.
add
();
...
...
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_SUITE( nn_processor_test )
BOOST_AUTO_TEST_CASE
(
nn_processor_np_test
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
/*!
*
...
...
@@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE( nn_processor_np_test)
BOOST_AUTO_TEST_CASE
(
nn_processor_box_periodic_test
)
{
// Vcluster
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
/*!
*
...
...
src/Decomposition/tests/CartDecomposition_unit_test.cpp
View file @
1a1686d9
...
...
@@ -55,7 +55,7 @@ void setComputationCosts3D(CartDecomposition<3, float> &dec, size_t n_v, Point<3
BOOST_AUTO_TEST_CASE
(
CartDecomposition_non_periodic_test
)
{
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
CartDecomposition
<
3
,
float
>
dec
(
vcl
);
...
...
@@ -144,7 +144,7 @@ BOOST_AUTO_TEST_CASE( CartDecomposition_non_periodic_test)
BOOST_AUTO_TEST_CASE
(
CartDecomposition_periodic_test
)
{
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
//! [Create CartDecomposition]
CartDecomposition
<
3
,
float
>
dec
(
vcl
);
...
...
@@ -239,7 +239,7 @@ BOOST_AUTO_TEST_CASE( CartDecomposition_periodic_test)
BOOST_AUTO_TEST_CASE
(
CartDecomposition_ext_non_periodic_test
)
{
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
CartDecomposition
<
3
,
float
>
dec
(
vcl
);
...
...
@@ -344,7 +344,7 @@ BOOST_AUTO_TEST_CASE( CartDecomposition_ext_non_periodic_test)
BOOST_AUTO_TEST_CASE
(
CartDecomposition_check_cross_consistency_between_proc_idbc_and_ghost
)
{
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
if
(
vcl
.
size
()
!=
3
)
{
return
;}
...
...
@@ -392,7 +392,7 @@ BOOST_AUTO_TEST_CASE( CartDecomposition_check_cross_consistency_between_proc_idb
BOOST_AUTO_TEST_CASE
(
CartDecomposition_check_cross_consistency_between_proc_idbc_and_ghost2
)
{
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
CartDecomposition
<
3
,
double
>
dec
(
vcl
);
...
...
@@ -488,7 +488,7 @@ BOOST_AUTO_TEST_CASE( CartDecomposition_check_cross_consistency_between_proc_idb
BOOST_AUTO_TEST_CASE
(
CartDecomposition_non_periodic_test_dist_grid
)
{
// Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
CartDecomposition
<
3
,
float
>
dec
(
vcl
);
...
...
src/Graph/DistGraphFactory.hpp
View file @
1a1686d9
...
...
@@ -240,7 +240,7 @@ public:
//! Construct Cartesian graph
static
Graph
construct
(
const
size_t
(
&
sz
)[
dim
],
Box
<
dim
,
T
>
dom
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// Calculate the size of the hyper-cubes on each dimension
T
szd
[
dim
];
...
...
@@ -394,7 +394,7 @@ public:
//! Construct Cartesian graph
static
Graph
construct
(
const
size_t
(
&
sz
)[
dim
],
Box
<
dim
,
T
>
dom
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// Calculate the size of the hyper-cubes on each dimension
...
...
src/Graph/dist_map_graph.hpp
View file @
1a1686d9
...
...
@@ -209,7 +209,7 @@ template<typename V, typename E = no_edge,
class
DistGraph_CSR
{
//! Vcluster communication object
Vcluster
&
vcl
;
Vcluster
<>
&
vcl
;
//! Distribution vector
openfpm
::
vector
<
idx_t
>
vtxdist
;
...
...
@@ -1147,7 +1147,7 @@ public:
* \param gg distributed graph to copy
*
*/
DistGraph_CSR
(
Vcluster
&
vcl
,
DistGraph_CSR
<
V
,
E
,
Memory
>
&&
g
)
:
DistGraph_CSR
(
Vcluster
<>
&
vcl
,
DistGraph_CSR
<
V
,
E
,
Memory
>
&&
g
)
:
vcl
(
vcl
)
{
swap
(
g
);
...
...
src/Graph/dist_map_graph_unit_test.hpp
View file @
1a1686d9
...
...
@@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE( dist_map_graph_use)
{
//! Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
if
(
vcl
.
getProcessingUnits
()
!=
4
)
return
;
...
...
@@ -241,7 +241,7 @@ BOOST_AUTO_TEST_CASE( dist_map_graph_use)
BOOST_AUTO_TEST_CASE
(
dist_map_graph_use_redistribution
)
{
//! Vcluster
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
if
(
vcl
.
getProcessingUnits
()
!=
4
)