Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_vcluster
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_vcluster
Commits
2d24d5c6
Commit
2d24d5c6
authored
Oct 18, 2016
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding documentation
parent
82a87d7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
+62
-0
src/VCluster.cpp
src/VCluster.cpp
+3
-0
src/VCluster.hpp
src/VCluster.hpp
+51
-0
src/VCluster_semantic_unit_tests.hpp
src/VCluster_semantic_unit_tests.hpp
+8
-0
No files found.
src/VCluster.cpp
View file @
2d24d5c6
...
...
@@ -5,3 +5,6 @@ Vcluster * global_v_cluster_private = NULL;
// number of vcluster instances
size_t
n_vcluster
=
0
;
bool
ofp_initialized
=
false
;
size_t
tot_sent
=
0
;
size_t
tot_recv
=
0
;
src/VCluster.hpp
View file @
2d24d5c6
...
...
@@ -41,6 +41,8 @@ extern size_t n_vcluster;
extern
bool
global_mpi_init
;
// initialization flag
extern
bool
ofp_initialized
;
extern
size_t
tot_sent
;
extern
size_t
tot_recv
;
///////////////////// Post functions /////////////
...
...
@@ -128,6 +130,53 @@ struct op_ssend_recv_merge
}
};
//! Helper class to merge data without serialization
template
<
bool
sr
>
struct
op_ssend_gg_recv_merge_impl
{
//! Merge the
template
<
typename
T
,
typename
D
,
typename
S
,
int
...
prp
>
inline
static
void
execute
(
D
&
recv
,
S
&
v2
,
size_t
i
,
size_t
&
start
)
{
// Merge the information
recv
.
template
merge_prp_v
<
replace_
,
typename
T
::
value_type
,
PtrMemory
,
openfpm
::
grow_policy_identity
,
prp
...>(
v2
,
start
);
start
+=
v2
.
size
();
}
};
//! Helper class to merge data with serialization
template
<
>
struct
op_ssend_gg_recv_merge_impl
<
true
>
{
//! merge the data
template
<
typename
T
,
typename
D
,
typename
S
,
int
...
prp
>
inline
static
void
execute
(
D
&
recv
,
S
&
v2
,
size_t
i
,
size_t
&
start
)
{
// Merge the information
recv
.
template
merge_prp_v
<
replace_
,
typename
T
::
value_type
,
HeapMemory
,
openfpm
::
grow_policy_double
,
prp
...>(
v2
,
start
);
// from
start
+=
v2
.
size
();
}
};
//! Helper class to merge data
struct
op_ssend_gg_recv_merge
{
//! starting marker
size_t
start
;
//! constructor
op_ssend_gg_recv_merge
(
size_t
start
)
:
start
(
start
)
{}
//! execute the merge
template
<
bool
sr
,
typename
T
,
typename
D
,
typename
S
,
int
...
prp
>
void
execute
(
D
&
recv
,
S
&
v2
,
size_t
i
)
{
op_ssend_gg_recv_merge_impl
<
sr
>::
template
execute
<
T
,
D
,
S
,
prp
...>(
recv
,
v2
,
i
,
start
);
}
};
//////////////////////////////////////////////////
//! temporal buffer for reductions
...
...
@@ -650,6 +699,7 @@ public:
check_valid
(
ptr
[
i
],
sz
[
i
]);
#endif
tot_sent
+=
sz
[
i
];
MPI_SAFE_CALL
(
MPI_Issend
(
ptr
[
i
],
sz
[
i
],
MPI_BYTE
,
prc
[
i
],
SEND_SPARSE
+
NBX_cnt
,
MPI_COMM_WORLD
,
&
req
.
last
()));
log
.
logSend
(
prc
[
i
]);
}
...
...
@@ -692,6 +742,7 @@ public:
#ifdef SE_CLASS2
check_valid
(
ptr
,
msize
);
#endif
tot_recv
+=
msize
;
MPI_SAFE_CALL
(
MPI_Recv
(
ptr
,
msize
,
MPI_BYTE
,
stat_t
.
MPI_SOURCE
,
SEND_SPARSE
+
NBX_cnt
,
MPI_COMM_WORLD
,
&
stat_t
));
#ifdef SE_CLASS2
...
...
src/VCluster_semantic_unit_tests.hpp
View file @
2d24d5c6
...
...
@@ -11,10 +11,16 @@
#include "Grid/grid_util_test.hpp"
#include "data_type/aggregate.hpp"
//! Example structure
struct
Aexample
{
//! Example size_t
size_t
a
;
//! Example float
float
b
;
//! Example double
double
c
;
};
...
...
@@ -1409,6 +1415,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_bench_all_all)
comm_time
.
stop
();
std
::
cout
<<
"Communication time "
<<
comm_time
.
getwct
()
<<
std
::
endl
;
std
::
cout
<<
"Total sent: "
<<
tot_sent
<<
" Tot recv: "
<<
tot_recv
<<
std
::
endl
;
std
::
cout
<<
"END"
<<
std
::
endl
;
}
...
...
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