Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Chameleon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
AGULLO Emmanuel
Chameleon
Commits
2f441bb8
Commit
2f441bb8
authored
Mar 17, 2017
by
THIBAULT Samuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding pruning stats on top of memaccess
parent
afbd9e49
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
102 additions
and
6 deletions
+102
-6
CMakeLists.txt
CMakeLists.txt
+7
-0
include/runtime.h
include/runtime.h
+3
-0
runtime/parsec/control/runtime_profiling.c
runtime/parsec/control/runtime_profiling.c
+10
-0
runtime/quark/control/runtime_profiling.c
runtime/quark/control/runtime_profiling.c
+10
-0
runtime/starpu/control/runtime_profiling.c
runtime/starpu/control/runtime_profiling.c
+21
-0
runtime/starpu/include/morse_starpu.h
runtime/starpu/include/morse_starpu.h
+42
-6
runtime/starpu/include/runtime_profiling.h
runtime/starpu/include/runtime_profiling.h
+7
-0
timing/timing.h
timing/timing.h
+2
-0
No files found.
CMakeLists.txt
View file @
2f441bb8
...
...
@@ -232,6 +232,13 @@ if(CHAMELEON_SCHED_STARPU)
message
(
"--
${
BoldGreen
}
CHAMELEON_SIMULATION is set to OFF, turn it ON to use"
" SIMULATION mode (only with StarPU compiled with SimGrid)
${
ColourReset
}
"
)
endif
()
option
(
CHAMELEON_ENABLE_PRUNING_STATS
"Enable pruning statistics"
OFF
)
if
(
NOT CHAMELEON_ENABLE_PRUNING_STATS
)
message
(
"--
${
BoldGreen
}
CHAMELEON_ENABLE_PRUNING_STATS is set to OFF, turn it ON to build pruning statistics
${
ColourReset
}
"
)
endif
()
if
(
CHAMELEON_ENABLE_PRUNING_STATS
)
add_definitions
(
-DCHAMELEON_ENABLE_PRUNING_STATS
)
endif
(
CHAMELEON_ENABLE_PRUNING_STATS
)
endif
()
# Initially we need to generate files for different precisions
...
...
include/runtime.h
View file @
2f441bb8
...
...
@@ -126,6 +126,9 @@ double RUNTIME_get_time();
void
RUNTIME_start_profiling
();
void
RUNTIME_stop_profiling
();
void
RUNTIME_start_stats
();
void
RUNTIME_stop_stats
();
#if defined(PRECISION_z)
void
RUNTIME_zdisplay_allprofile
();
void
RUNTIME_zdisplay_oneprofile
(
MORSE_kernel_t
);
...
...
runtime/parsec/control/runtime_profiling.c
View file @
2f441bb8
...
...
@@ -88,6 +88,16 @@ void RUNTIME_stop_profiling()
morse_warning
(
"RUNTIME_stop_profiling()"
,
"FxT profiling is not available with PaRSEC
\n
"
);
}
void
RUNTIME_start_stats
()
{
morse_warning
(
"RUNTIME_start_stats()"
,
"pruning stats are not available with PaRSEC
\n
"
);
}
void
RUNTIME_stop_stats
()
{
morse_warning
(
"RUNTIME_stop_stats()"
,
"pruning stats are not available with PaRSEC
\n
"
);
}
void
RUNTIME_schedprofile_display
(
void
)
{
morse_warning
(
"RUNTIME_schedprofile_display(parsec)"
,
"Scheduler profiling is not available with PaRSEC
\n
"
);
...
...
runtime/quark/control/runtime_profiling.c
View file @
2f441bb8
...
...
@@ -103,6 +103,16 @@ void RUNTIME_stop_profiling()
morse_warning
(
"RUNTIME_stop_profiling()"
,
"FxT profiling is not available with Quark
\n
"
);
}
void
RUNTIME_start_stats
()
{
morse_warning
(
"RUNTIME_start_stats()"
,
"pruning stats are not available with Quark
\n
"
);
}
void
RUNTIME_stop_stats
()
{
morse_warning
(
"RUNTIME_stop_stats()"
,
"pruning stats are not available with Quark
\n
"
);
}
void
RUNTIME_schedprofile_display
(
void
)
{
morse_warning
(
"RUNTIME_schedprofile_display(quark)"
,
"Scheduler profiling is not available with Quark
\n
"
);
...
...
runtime/starpu/control/runtime_profiling.c
View file @
2f441bb8
...
...
@@ -29,6 +29,12 @@
#include <starpu_fxt.h>
#endif
#ifdef CHAMELEON_ENABLE_PRUNING_STATS
unsigned
long
RUNTIME_total_tasks
;
unsigned
long
RUNTIME_exec_tasks
;
unsigned
long
RUNTIME_comm_tasks
;
unsigned
long
RUNTIME_changed_tasks
;
#endif
double
RUNTIME_get_time
(){
return
starpu_timing_now
()
*
1e-6
;
...
...
@@ -50,6 +56,21 @@ void RUNTIME_stop_profiling(){
#endif
}
void
RUNTIME_start_stats
(){
#ifdef CHAMELEON_ENABLE_PRUNING_STATS
RUNTIME_total_tasks
=
0
;
RUNTIME_exec_tasks
=
0
;
RUNTIME_comm_tasks
=
0
;
RUNTIME_changed_tasks
=
0
;
#endif
}
void
RUNTIME_stop_stats
(){
#ifdef CHAMELEON_ENABLE_PRUNING_STATS
fprintf
(
stderr
,
"
\n
tasks: %u = exec: %u + comm: %u + changed: %u
\n
"
,
RUNTIME_total_tasks
,
RUNTIME_exec_tasks
,
RUNTIME_comm_tasks
,
RUNTIME_changed_tasks
);
#endif
}
void
RUNTIME_profiling_display_info
(
const
char
*
kernel_name
,
measure_t
perf
[
STARPU_NMAXWORKERS
])
{
int
header
=
1
;
...
...
runtime/starpu/include/morse_starpu.h
View file @
2f441bb8
...
...
@@ -86,16 +86,52 @@ typedef struct starpu_conf starpu_conf_t;
void
RUNTIME_set_reduction_methods
(
starpu_data_handle_t
handle
,
MORSE_enum
dtyp
);
#define RUNTIME_BEGIN_ACCESS_DECLARATION
#ifdef CHAMELEON_ENABLE_PRUNING_STATS
#define RUNTIME_PRUNING_STATS_BEGIN_ACCESS_DECLARATION \
int __morse_exec = 0; \
int __morse_changed = 0;
#define RUNTIME_PRUNING_STATS_ACCESS_W(A, Am, An) \
if (morse_desc_islocal(A, Am, An)) \
__morse_exec = 1;
#define RUNTIME_PRUNING_STATS_END_ACCESS_DECLARATION \
RUNTIME_total_tasks++; \
if (__morse_exec) \
RUNTIME_exec_tasks++; \
else if (__morse_need_submit) \
RUNTIME_comm_tasks++; \
else if (__morse_changed) \
RUNTIME_changed_tasks++;
#define RUNTIME_PRUNING_STATS_RANK_CHANGED(rank) \
int __morse_myrank; \
RUNTIME_comm_rank(&__morse_myrank); \
__morse_exec = (rank) == __morse_myrank; \
__morse_changed = 1; \
#define RUNTIME_ACCESS_R(A, Am, An)
#else
#define RUNTIME_PRUNING_STATS_BEGIN_ACCESS_DECLARATION
#define RUNTIME_PRUNING_STATS_ACCESS_W(A, Am, An)
#define RUNTIME_PRUNING_STATS_END_ACCESS_DECLARATION
#endif
#define RUNTIME_BEGIN_ACCESS_DECLARATION \
RUNTIME_PRUNING_STATS_BEGIN_ACCESS_DECLARATION
#define RUNTIME_ACCESS_R(A, Am, An) \
#define RUNTIME_ACCESS_W(A, Am, An)
#define RUNTIME_ACCESS_W(A, Am, An) \
RUNTIME_PRUNING_STATS_ACCESS_W(A, Am, An)
#define RUNTIME_ACCESS_RW(A, Am, An)
#define RUNTIME_ACCESS_RW(A, Am, An) \
RUNTIME_PRUNING_STATS_ACCESS_W(A, Am, An)
#define RUNTIME_RANK_CHANGED(rank)
#define RUNTIME_RANK_CHANGED(rank) \
RUNTIME_PRUNING_STATS_RANK_CHANGED(rank)
#define RUNTIME_END_ACCESS_DECLARATION
#define RUNTIME_END_ACCESS_DECLARATION \
RUNTIME_PRUNING_STATS_END_ACCESS_DECLARATION;
#endif
/* _MORSE_STARPU_H_ */
runtime/starpu/include/runtime_profiling.h
View file @
2f441bb8
...
...
@@ -26,6 +26,13 @@
#ifndef _PROFILING_H_
#define _PROFILING_H_
#ifdef CHAMELEON_ENABLE_PRUNING_STATS
extern
unsigned
long
RUNTIME_total_tasks
;
extern
unsigned
long
RUNTIME_exec_tasks
;
extern
unsigned
long
RUNTIME_comm_tasks
;
extern
unsigned
long
RUNTIME_changed_tasks
;
#endif
typedef
struct
measure_s
{
double
sum
;
double
sum2
;
...
...
timing/timing.h
View file @
2f441bb8
...
...
@@ -159,6 +159,7 @@ enum dparam_timing {
*
*/
#define START_TRACING() \
RUNTIME_start_stats(); \
if(iparam[IPARAM_TRACE] == 2) { \
RUNTIME_start_profiling(); \
} \
...
...
@@ -167,6 +168,7 @@ enum dparam_timing {
}
#define STOP_TRACING() \
RUNTIME_stop_stats(); \
if(iparam[IPARAM_TRACE] == 2) { \
RUNTIME_stop_profiling(); \
} \
...
...
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