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
ae3ab296
Commit
ae3ab296
authored
Jul 23, 2019
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor performance test
parent
5b11516e
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
215 additions
and
316 deletions
+215
-316
CMakeLists.txt
CMakeLists.txt
+3
-1
openfpm_data
openfpm_data
+1
-1
openfpm_io
openfpm_io
+1
-1
src/CMakeLists.txt
src/CMakeLists.txt
+5
-0
src/Grid/grid_dist_id.hpp
src/Grid/grid_dist_id.hpp
+12
-6
src/Grid/grid_dist_key.hpp
src/Grid/grid_dist_key.hpp
+1
-1
src/Grid/performance/grid_dist_performance.hpp
src/Grid/performance/grid_dist_performance.hpp
+91
-196
src/Vector/performance/cell_list_comp_reorder.hpp
src/Vector/performance/cell_list_comp_reorder.hpp
+88
-14
src/Vector/performance/vector_dist_performance_util.cpp
src/Vector/performance/vector_dist_performance_util.cpp
+3
-11
src/Vector/performance/vector_dist_performance_util.hpp
src/Vector/performance/vector_dist_performance_util.hpp
+3
-82
src/Vector/performance/verlet_performance_tests.hpp
src/Vector/performance/verlet_performance_tests.hpp
+2
-0
src/pdata_performance.cpp
src/pdata_performance.cpp
+5
-3
No files found.
CMakeLists.txt
View file @
ae3ab296
...
@@ -30,6 +30,8 @@ set(SuiteSparse_ROOT ${SUITESPARSE_ROOT})
...
@@ -30,6 +30,8 @@ set(SuiteSparse_ROOT ${SUITESPARSE_ROOT})
set
(
CMAKE_CXX_STANDARD 11
)
set
(
CMAKE_CXX_STANDARD 11
)
set
(
CMAKE_CUDA_STANDARD 11
)
set
(
CMAKE_CUDA_STANDARD 11
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O3"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-g -O3"
)
if
(
OPENBLAS_ROOT
)
if
(
OPENBLAS_ROOT
)
set
(
ENV{LD_LIBRARY_PATH}
"$ENV{LD_LIBRARY_PATH}:
${
OPENBLAS_ROOT
}
/lib"
)
set
(
ENV{LD_LIBRARY_PATH}
"$ENV{LD_LIBRARY_PATH}:
${
OPENBLAS_ROOT
}
/lib"
)
...
@@ -57,7 +59,7 @@ if(ENABLE_GPU)
...
@@ -57,7 +59,7 @@ if(ENABLE_GPU)
endif
()
endif
()
find_package
(
Boost 1.68.0 COMPONENTS unit_test_framework iostreams program_options
)
find_package
(
Boost 1.68.0 COMPONENTS unit_test_framework iostreams program_options
system filesystem
)
find_package
(
MPI
)
find_package
(
MPI
)
find_package
(
PETSc
)
find_package
(
PETSc
)
find_package
(
HDF5
)
find_package
(
HDF5
)
...
...
openfpm_data
@
cbef620d
Subproject commit c
7d16222ba51287808f611c280860fcd76281936
Subproject commit c
bef620db71cbd6beb13eb11f139f1cdbfce8ae3
openfpm_io
@
d7c48264
Subproject commit
eafa24bd983173dfd9c4e9c49e88b160096066ff
Subproject commit
d7c48264a25f8f7aded163258fb3c182a7397542
src/CMakeLists.txt
View file @
ae3ab296
...
@@ -89,6 +89,11 @@ target_link_libraries(pdata -L${HDF5_ROOT}/lib hdf5 hdf5_hl)
...
@@ -89,6 +89,11 @@ target_link_libraries(pdata -L${HDF5_ROOT}/lib hdf5 hdf5_hl)
target_link_libraries
(
pdata -L
${
LIBHILBERT_LIBRARY_DIRS
}
${
LIBHILBERT_LIBRARIES
}
)
target_link_libraries
(
pdata -L
${
LIBHILBERT_LIBRARY_DIRS
}
${
LIBHILBERT_LIBRARIES
}
)
target_link_libraries
(
pdata
${
PETSC_LIBRARIES
}
)
target_link_libraries
(
pdata
${
PETSC_LIBRARIES
}
)
if
(
TEST_PERFORMANCE
)
target_link_libraries
(
pdata
${
Boost_FILESYSTEM_LIBRARY
}
)
target_link_libraries
(
pdata
${
Boost_SYSTEM_LIBRARY
}
)
endif
()
if
(
TEST_COVERAGE
)
if
(
TEST_COVERAGE
)
target_link_libraries
(
pdata -lgcov --coverage
)
target_link_libraries
(
pdata -lgcov --coverage
)
endif
()
endif
()
...
...
src/Grid/grid_dist_id.hpp
View file @
ae3ab296
...
@@ -2059,7 +2059,8 @@ public:
...
@@ -2059,7 +2059,8 @@ public:
* \return the selected element
* \return the selected element
*
*
*/
*/
template
<
unsigned
int
p
=
0
>
inline
auto
get
(
grid_dist_g_dx
<
device_grid
>
&
v1
)
const
->
typename
std
::
add_lvalue_reference
<
decltype
(
v1
.
getSub
()
->
template
get
<
p
>(
v1
.
getKey
()))
>::
type
template
<
unsigned
int
p
=
0
>
inline
auto
get
(
const
grid_dist_g_dx
<
device_grid
>
&
v1
)
const
->
typename
std
::
add_lvalue_reference
<
decltype
(
v1
.
getSub
()
->
template
get
<
p
>(
v1
.
getKey
()))
>::
type
{
{
#ifdef SE_CLASS2
#ifdef SE_CLASS2
check_valid
(
this
,
8
);
check_valid
(
this
,
8
);
...
@@ -2075,7 +2076,8 @@ public:
...
@@ -2075,7 +2076,8 @@ public:
* \return the selected element
* \return the selected element
*
*
*/
*/
template
<
unsigned
int
p
=
0
>
inline
auto
get
(
grid_dist_g_dx
<
device_grid
>
&
v1
)
->
typename
std
::
add_lvalue_reference
<
decltype
(
v1
.
getSub
()
->
template
get
<
p
>(
v1
.
getKey
()))
>::
type
template
<
unsigned
int
p
=
0
>
inline
auto
get
(
const
grid_dist_g_dx
<
device_grid
>
&
v1
)
->
typename
std
::
add_lvalue_reference
<
decltype
(
v1
.
getSub
()
->
template
get
<
p
>(
v1
.
getKey
()))
>::
type
{
{
#ifdef SE_CLASS2
#ifdef SE_CLASS2
check_valid
(
this
,
8
);
check_valid
(
this
,
8
);
...
@@ -2091,7 +2093,8 @@ public:
...
@@ -2091,7 +2093,8 @@ public:
* \return the selected element
* \return the selected element
*
*
*/
*/
template
<
unsigned
int
p
=
0
>
inline
auto
get
(
const
grid_dist_lin_dx
&
v1
)
const
->
typename
std
::
add_lvalue_reference
<
decltype
(
loc_grid
.
get
(
v1
.
getSub
()).
template
get
<
p
>(
v1
.
getKey
()))
>::
type
template
<
unsigned
int
p
=
0
>
inline
auto
get
(
const
grid_dist_lin_dx
&
v1
)
const
->
typename
std
::
add_lvalue_reference
<
decltype
(
loc_grid
.
get
(
v1
.
getSub
()).
template
get
<
p
>(
v1
.
getKey
()))
>::
type
{
{
#ifdef SE_CLASS2
#ifdef SE_CLASS2
check_valid
(
this
,
8
);
check_valid
(
this
,
8
);
...
@@ -2107,7 +2110,8 @@ public:
...
@@ -2107,7 +2110,8 @@ public:
* \return the selected element
* \return the selected element
*
*
*/
*/
template
<
unsigned
int
p
=
0
>
inline
auto
get
(
const
grid_dist_lin_dx
&
v1
)
->
typename
std
::
add_lvalue_reference
<
decltype
(
loc_grid
.
get
(
v1
.
getSub
()).
template
get
<
p
>(
v1
.
getKey
()))
>::
type
template
<
unsigned
int
p
=
0
>
inline
auto
get
(
const
grid_dist_lin_dx
&
v1
)
->
typename
std
::
add_lvalue_reference
<
decltype
(
loc_grid
.
get
(
v1
.
getSub
()).
template
get
<
p
>(
v1
.
getKey
()))
>::
type
{
{
#ifdef SE_CLASS2
#ifdef SE_CLASS2
check_valid
(
this
,
8
);
check_valid
(
this
,
8
);
...
@@ -2123,7 +2127,8 @@ public:
...
@@ -2123,7 +2127,8 @@ public:
* \return the selected element
* \return the selected element
*
*
*/
*/
template
<
unsigned
int
p
=
0
>
inline
auto
getProp
(
const
grid_dist_key_dx
<
dim
>
&
v1
)
const
->
decltype
(
this
->
template
get
<
p
>(
v1
))
template
<
unsigned
int
p
=
0
>
inline
auto
getProp
(
const
grid_dist_key_dx
<
dim
>
&
v1
)
const
->
decltype
(
this
->
template
get
<
p
>(
v1
))
{
{
return
this
->
template
get
<
p
>(
v1
);
return
this
->
template
get
<
p
>(
v1
);
}
}
...
@@ -2136,7 +2141,8 @@ public:
...
@@ -2136,7 +2141,8 @@ public:
* \return the selected element
* \return the selected element
*
*
*/
*/
template
<
unsigned
int
p
=
0
>
inline
auto
getProp
(
const
grid_dist_key_dx
<
dim
>
&
v1
)
->
decltype
(
this
->
template
get
<
p
>(
v1
))
template
<
unsigned
int
p
=
0
>
inline
auto
getProp
(
const
grid_dist_key_dx
<
dim
>
&
v1
)
->
decltype
(
this
->
template
get
<
p
>(
v1
))
{
{
return
this
->
template
get
<
p
>(
v1
);
return
this
->
template
get
<
p
>(
v1
);
}
}
...
...
src/Grid/grid_dist_key.hpp
View file @
ae3ab296
...
@@ -308,7 +308,7 @@ public:
...
@@ -308,7 +308,7 @@ public:
*
*
*
*
*/
*/
inline
device_grid
*
getSub
()
inline
device_grid
*
getSub
()
const
{
{
return
dg
;
return
dg
;
}
}
...
...
src/Grid/performance/grid_dist_performance.hpp
View file @
ae3ab296
This diff is collapsed.
Click to expand it.
src/Vector/performance/cell_list_comp_reorder.hpp
View file @
ae3ab296
This diff is collapsed.
Click to expand it.
src/Vector/performance/vector_dist_performance_util.cpp
View file @
ae3ab296
...
@@ -9,18 +9,10 @@
...
@@ -9,18 +9,10 @@
#include "vector_dist_performance_util.hpp"
#include "vector_dist_performance_util.hpp"
#include "Plot/GoogleChart.hpp"
#include "Plot/GoogleChart.hpp"
#include <boost/property_tree/xml_parser.hpp>
#include <boost/foreach.hpp>
#include "util/performance/performance_util.hpp"
void
addUpdtateTime
(
GoogleChart
&
cg
)
{
time_t
t
=
time
(
0
);
// get time now
struct
tm
*
now
=
localtime
(
&
t
);
std
::
stringstream
str
;
str
<<
"<h3>Updated: "
<<
now
->
tm_mday
<<
"/"
<<
now
->
tm_mon
+
1
<<
"/"
<<
now
->
tm_year
+
1900
<<
" "
<<
now
->
tm_hour
<<
":"
<<
now
->
tm_min
<<
":"
<<
now
->
tm_sec
<<
std
::
endl
;
cg
.
addHTML
(
str
.
str
());
}
/*! \brief Draw a standard performance graph
/*! \brief Draw a standard performance graph
*
*
...
...
src/Vector/performance/vector_dist_performance_util.hpp
View file @
ae3ab296
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#ifndef SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_
#ifndef SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_
#define SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_
#define SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_
#include <boost/property_tree/ptree.hpp>
#include "Plot/GoogleChart.hpp"
#include "Plot/GoogleChart.hpp"
#include "vector_dist_performance_common.hpp"
#include "vector_dist_performance_common.hpp"
...
@@ -15,86 +16,6 @@
...
@@ -15,86 +16,6 @@
#define N_VERLET_TEST 3
#define N_VERLET_TEST 3
#define N_STAT_TEST 30
#define N_STAT_TEST 30
static
inline
void
warning_set
(
int
&
warning_level
,
double
mean
,
double
mean_ref
,
double
sigma
)
{
int
warning_level_candidate
;
if
(
mean
-
mean_ref
<
-
2.0
*
sigma
)
warning_level_candidate
=
-
1
;
else
if
(
mean
-
mean_ref
<
2.0
*
sigma
)
warning_level_candidate
=
0
;
else
if
(
mean
-
mean_ref
<
3.0
*
sigma
)
warning_level_candidate
=
1
;
else
warning_level_candidate
=
2
;
if
(
warning_level_candidate
>
warning_level
)
warning_level
=
warning_level_candidate
;
}
static
inline
void
addchartarea
(
std
::
string
&
chart_area
,
int
lvl
)
{
std
::
string
color
;
if
(
lvl
==
-
1
)
{
chart_area
=
std
::
string
(
",chartArea: {\
backgroundColor: {\
stroke: '#00FF00',\
strokeWidth: 6\
}\
}"
);
}
else
if
(
lvl
==
0
)
{
// NOTHING TO DO
}
else
if
(
lvl
==
1
)
{
chart_area
=
std
::
string
(
",chartArea: {\
backgroundColor: {\
stroke: '#FFFF00',\
strokeWidth: 6\
}\
}"
);
}
else
if
(
lvl
==
2
)
{
chart_area
=
std
::
string
(
",chartArea: {\
backgroundColor: {\
stroke: '#FF0000',\
strokeWidth: 6\
}\
}"
);
}
}
void
addUpdtateTime
(
GoogleChart
&
cg
);
/*! \brief Standard deviation
*
* \param measures set of measures
* \param mean the mean of the measures
*
* \return the standard deviation
*
*/
static
inline
void
standard_deviation
(
openfpm
::
vector
<
double
>
measures
,
double
&
mean
,
double
&
dev
)
{
mean
=
0
;
for
(
size_t
i
=
0
;
i
<
measures
.
size
()
;
i
++
)
mean
+=
measures
.
get
(
i
);
mean
/=
measures
.
size
();
dev
=
0
;
for
(
size_t
i
=
0
;
i
<
measures
.
size
()
;
i
++
)
dev
+=
(
measures
.
get
(
i
)
-
mean
)
*
(
measures
.
get
(
i
)
-
mean
);
dev
=
sqrt
(
dev
/
(
measures
.
size
()
-
1
));
}
/*! \brief Benchmark particles' forces time
/*! \brief Benchmark particles' forces time
*
*
...
@@ -146,7 +67,8 @@ template<typename V> double benchmark_reorder(V & vd, size_t m)
...
@@ -146,7 +67,8 @@ template<typename V> double benchmark_reorder(V & vd, size_t m)
*
*
* \return real time
* \return real time
*/
*/
template
<
typename
T
,
typename
V
>
double
benchmark_get_celllist
(
T
&
NN
,
V
&
vd
,
float
r_cut
)
template
<
typename
T
,
typename
V
>
double
benchmark_get_celllist
(
T
&
NN
,
V
&
vd
,
float
r_cut
)
{
{
// Cell list timer
// Cell list timer
timer
t
;
timer
t
;
...
@@ -290,5 +212,4 @@ extern void StandardPerformanceGraph(std::string file_mean,
...
@@ -290,5 +212,4 @@ extern void StandardPerformanceGraph(std::string file_mean,
std
::
string
y_string
,
std
::
string
y_string
,
bool
use_log
);
bool
use_log
);
#endif
/* SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_ */
#endif
/* SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_ */
src/Vector/performance/verlet_performance_tests.hpp
View file @
ae3ab296
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
#ifndef SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_
#ifndef SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_
#define SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_
#define SRC_VECTOR_VECTOR_DIST_VERLET_PERFORMANCE_TESTS_HPP_
#include "util/stat/common_statistics.hpp"
/*! \brief Print a string about the test
/*! \brief Print a string about the test
*
*
* \param test string to print
* \param test string to print
...
...
src/pdata_performance.cpp
View file @
ae3ab296
...
@@ -26,16 +26,18 @@
...
@@ -26,16 +26,18 @@
extern
const
char
*
test_dir
;
extern
const
char
*
test_dir
;
// XML report
boost
::
property_tree
::
ptree
pt
;
#ifdef PERFORMANCE_TEST
#ifdef PERFORMANCE_TEST
#include "../../openfpm_numerics/src/interpolation/interpolation.hpp"
#include "Grid/grid_dist_id.hpp"
#include "Plot/GoogleChart.hpp"
#include "interpolation/mp4_kernel.hpp"
#include "Vector/performance/vector_dist_performance_util.hpp"
#include "Vector/performance/vector_dist_performance_util.hpp"
#include "util/performance/performance_util.hpp"
BOOST_AUTO_TEST_SUITE
(
performance
)
BOOST_AUTO_TEST_SUITE
(
performance
)
#include "Vector/performance/verlet_performance_tests.hpp"
#include "Vector/performance/verlet_performance_tests.hpp"
#include "Vector/performance/cell_list_part_reorder.hpp"
#include "Vector/performance/cell_list_part_reorder.hpp"
#include "Vector/performance/cell_list_comp_reorder.hpp"
#include "Vector/performance/cell_list_comp_reorder.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