Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
ae514ea2
Commit
ae514ea2
authored
Mar 27, 2017
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'master'
Adding Cortex generation of events See merge request !23
parents
14c34910
aebf1b5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
8 deletions
+29
-8
codes/codes-workload.h
codes/codes-workload.h
+1
-0
configure.ac
configure.ac
+1
-1
src/network-workloads/model-net-mpi-replay.c
src/network-workloads/model-net-mpi-replay.c
+5
-2
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
+22
-5
No files found.
codes/codes-workload.h
View file @
ae514ea2
...
...
@@ -72,6 +72,7 @@ struct dumpi_trace_params {
#ifdef ENABLE_CORTEX_PYTHON
char
cortex_script
[
MAX_NAME_LENGTH_WKLD
];
char
cortex_class
[
MAX_NAME_LENGTH_WKLD
];
char
cortex_gen
[
MAX_NAME_LENGTH_WKLD
];
#endif
};
...
...
configure.ac
View file @
ae514ea2
...
...
@@ -140,7 +140,7 @@ AC_ARG_WITH([boost],[AS_HELP_STRING([--with-boost@<:@=DIR@:>@],
[location of Boost Python installation])])
if [ test "x${with_python}" != "x" -a "x${with_boost}" != "x"] ; then
AC_CHECK_FILES([${with_python}/lib/libpython2.7.
a
${with_boost}/lib/libboost_python.a],
AC_CHECK_FILES([${with_python}/lib/libpython2.7.
so
${with_boost}/lib/libboost_python.a],
AM_CONDITIONAL(USE_PYTHON, true),
AC_MSG_ERROR(Could not find Python and/or Boost-Python libraries))
PYTHON_CFLAGS="-I${with_python}/include -I${with_boost}/include"
...
...
src/network-workloads/model-net-mpi-replay.c
View file @
ae514ea2
...
...
@@ -54,8 +54,9 @@ struct codes_jobmap_params_list jobmap_p;
/* Variables for Cortex Support */
/* Matthieu's additions start */
#ifdef ENABLE_CORTEX_PYTHON
static
char
cortex_file
[
512
];
static
char
cortex_class
[
512
];
static
char
cortex_file
[
512
]
=
"
\0
"
;
static
char
cortex_class
[
512
]
=
"
\0
"
;
static
char
cortex_gen
[
512
]
=
"
\0
"
;
#endif
/* Matthieu's additions end */
...
...
@@ -1158,6 +1159,7 @@ void nw_test_init(nw_state* s, tw_lp* lp)
#ifdef ENABLE_CORTEX_PYTHON
strcpy
(
params_d
.
cortex_script
,
cortex_file
);
strcpy
(
params_d
.
cortex_class
,
cortex_class
);
strcpy
(
params_d
.
cortex_gen
,
cortex_gen
);
#endif
}
...
...
@@ -1534,6 +1536,7 @@ const tw_optdef app_opt [] =
#ifdef ENABLE_CORTEX_PYTHON
TWOPT_CHAR
(
"cortex-file"
,
cortex_file
,
"Python file (without .py) containing the CoRtEx translation class"
),
TWOPT_CHAR
(
"cortex-class"
,
cortex_class
,
"Python class implementing the CoRtEx translator"
),
TWOPT_CHAR
(
"cortex-gen"
,
cortex_gen
,
"Python function to pre-generate MPI events"
),
#endif
TWOPT_END
()
};
...
...
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
View file @
ae514ea2
...
...
@@ -23,12 +23,12 @@
#include <cortex/cortex-python.h>
#endif
#define PROFILE_TYPE cortex_dumpi_profile*
#define UNDUMPI_OPEN cortex_undumpi_open
//
#define UNDUMPI_OPEN cortex_undumpi_open
#define DUMPI_START_STREAM_READ cortex_dumpi_start_stream_read
#define UNDUMPI_CLOSE cortex_undumpi_close
#else
#define PROFILE_TYPE dumpi_profile*
#define UNDUMPI_OPEN undumpi_open
//
#define UNDUMPI_OPEN undumpi_open
#define DUMPI_START_STREAM_READ dumpi_start_stream_read
#define UNDUMPI_CLOSE undumpi_close
#endif
...
...
@@ -646,7 +646,11 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
else
sprintf
(
file_name
,
"%s%d.bin"
,
dumpi_params
->
file_name
,
rank
);
#ifdef ENABLE_CORTEX
profile
=
cortex_undumpi_open
(
file_name
,
app_id
,
dumpi_params
->
num_net_traces
,
rank
);
if
(
strcmp
(
dumpi_params
->
file_name
,
"none"
)
==
0
)
{
profile
=
cortex_undumpi_open
(
NULL
,
app_id
,
dumpi_params
->
num_net_traces
,
rank
);
}
else
{
profile
=
cortex_undumpi_open
(
file_name
,
app_id
,
dumpi_params
->
num_net_traces
,
rank
);
}
#else
profile
=
undumpi_open
(
file_name
);
#endif
...
...
@@ -728,7 +732,11 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
#ifdef ENABLE_CORTEX
#ifdef ENABLE_CORTEX_PYTHON
libundumpi_populate_callbacks
(
CORTEX_PYTHON_TRANSLATION
,
transarr
);
if
(
dumpi_params
->
cortex_script
[
0
]
!=
0
)
{
libundumpi_populate_callbacks
(
CORTEX_PYTHON_TRANSLATION
,
transarr
);
}
else
{
libundumpi_populate_callbacks
(
CORTEX_MPICH_TRANSLATION
,
transarr
);
}
#else
libundumpi_populate_callbacks
(
CORTEX_MPICH_TRANSLATION
,
transarr
);
#endif
...
...
@@ -738,7 +746,16 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
//dumpi_free_header(trace_header);
#ifdef ENABLE_CORTEX_PYTHON
cortex_python_set_module
(
dumpi_params
->
cortex_script
,
dumpi_params
->
cortex_class
);
if
(
dumpi_params
->
cortex_script
[
0
]
!=
0
)
{
if
(
dumpi_params
->
cortex_class
[
0
]
!=
0
)
{
cortex_python_set_module
(
dumpi_params
->
cortex_script
,
dumpi_params
->
cortex_class
);
}
else
{
cortex_python_set_module
(
dumpi_params
->
cortex_script
,
NULL
);
}
if
(
dumpi_params
->
cortex_gen
[
0
]
!=
0
)
{
cortex_python_call_generator
(
profile
,
dumpi_params
->
cortex_gen
);
}
}
#endif
int
finalize_reached
=
0
;
...
...
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