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
6b53da93
Commit
6b53da93
authored
Nov 21, 2016
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enabling cortex-mpich when python is not enabled
parent
b2299708
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
42 deletions
+53
-42
Makefile.am
Makefile.am
+5
-5
codes/codes-workload.h
codes/codes-workload.h
+1
-1
configure.ac
configure.ac
+34
-31
src/network-workloads/model-net-mpi-replay.c
src/network-workloads/model-net-mpi-replay.c
+5
-3
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
+8
-2
No files found.
Makefile.am
View file @
6b53da93
...
...
@@ -63,15 +63,15 @@ src_libcodes_la_SOURCES += src/workload/methods/codes-dumpi-trace-nw-wrkld.c
LDADD
+=
${DUMPI_LIBS}
if
USE_CORTEX
if
USE_PYTHON
if
USE_
BOOST
AM_CPPFLAGS
+=
${CORTEX_
CFLAGS}
-DENABLE_CORTEX
=
1
LDADD
+=
${CORTEX_LIBS}
if
USE_
CORTEX_PYTHON
AM_CPPFLAGS
+=
${CORTEX_
PYTHON_CFLAGS}
-DENABLE_CORTEX_PYTHON
=
1
LDADD
+=
${CORTEX_
PYTHON_
LIBS}
AM_CPPFLAGS
+=
${PYTHON_CFLAGS}
LDADD
+=
${PYTHON_LIBS}
AM_CPPFLAGS
+=
${BOOST_CFLAGS}
LDADD
+=
${BOOST_LIBS}
endif
endif
AM_CPPFLAGS
+=
${CORTEX_CFLAGS}
-DENABLE_CORTEX
=
1
LDADD
+=
${CORTEX_LIBS}
endif
endif
codes/codes-workload.h
View file @
6b53da93
...
...
@@ -69,7 +69,7 @@ struct recorder_params
struct
dumpi_trace_params
{
char
file_name
[
MAX_NAME_LENGTH_WKLD
];
int
num_net_traces
;
#ifdef ENABLE_CORTEX
#ifdef ENABLE_CORTEX
_PYTHON
char
cortex_script
[
MAX_NAME_LENGTH_WKLD
];
char
cortex_class
[
MAX_NAME_LENGTH_WKLD
];
#endif
...
...
configure.ac
View file @
6b53da93
...
...
@@ -88,7 +88,7 @@ PKG_CHECK_MODULES_STATIC([ROSS], [ross], [],
AC_ARG_ENABLE([g],[AS_HELP_STRING([--enable-g],
[Build with GDB symbols])],
[use_debug=yes],[use_debug=no])
AM_CONDITIONAL(USE_DEBUG, ["x${use_debug}" = xyes])
AM_CONDITIONAL(USE_DEBUG, [
test
"x${use_debug}" = xyes])
# check for Darshan
AC_ARG_WITH([darshan],[AS_HELP_STRING([--with-darshan],
...
...
@@ -130,46 +130,49 @@ fi
# check for Cortex
AC_ARG_WITH([cortex],[AS_HELP_STRING([--with-cortex@<:@=DIR@:>@],
[location of Cortex installation])])
# check for Python
AC_ARG_WITH([python],[AS_HELP_STRING([--with-python@<:@=DIR@:>@],
[location of Python 2.7 installation])])
# check for Boost Python
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],
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"
PYTHON_LIBS="-L${with_boost}/lib -lboost_python -L${with_python}/lib/ -lpython2.7"
AC_SUBST(PYTHON_LIBS)
AC_SUBST(PYTHON_CFLAGS)
else
AM_CONDITIONAL(USE_PYTHON, false)
fi
if test "x${with_cortex}" != "x" ; then
AC_CHECK_FILES([${with_cortex}/lib/libcortex.a ${with_cortex}/lib/libcortex-
python
.a],
AC_CHECK_FILES([${with_cortex}/lib/libcortex.a ${with_cortex}/lib/libcortex-
mpich
.a],
AM_CONDITIONAL(USE_CORTEX, true),
AC_MSG_ERROR(Could not find Cortex libraries libcortex.a and/or libcortex-
python
.a))
AC_MSG_ERROR(Could not find Cortex libraries libcortex.a and/or libcortex-
mpich
.a))
CORTEX_CFLAGS="-I${with_cortex}/include"
CORTEX_LIBS="-L${with_cortex}/lib/ -lcortex-
python
-lcortex -lstdc++"
CORTEX_LIBS="-L${with_cortex}/lib/ -lcortex-
mpich
-lcortex -lstdc++"
AC_SUBST(CORTEX_LIBS)
AC_SUBST(CORTEX_CFLAGS)
else
AM_CONDITIONAL(USE_CORTEX, false)
fi
# check for Python
AC_ARG_WITH([python],[AS_HELP_STRING([--with-python@<:@=DIR@:>@],
[location of Python 2.7 installation])])
if test "x${with_python}" != "x" ; then
AC_CHECK_FILE([${with_python}/lib/libpython2.7.a],
AM_CONDITIONAL(USE_PYTHON, true),
AC_MSG_ERROR(Could not find Python library))
PYTHON_CFLAGS="-I${with_python}/include"
PYTHON_LIBS="-L${with_python}/lib/ -lpython2.7"
AC_SUBST(PYTHON_LIBS)
AC_SUBST(PYTHON_CFLAGS)
else
AM_CONDITIONAL(USE_PYTHON, false)
fi
# check for Boost Python
AC_ARG_WITH([boost],[AS_HELP_STRING([--with-boost@<:@=DIR@:>@],
[location of Boost Python installation])])
if test "x${with_boost}" != "x" ; then
AC_CHECK_FILE([${with_boost}/lib/libboost_python.a],
AM_CONDITIONAL(USE_BOOST, true),
AC_MSG_ERROR(Could not find Boost Python library libboost_python.a))
BOOST_CFLAGS="-I${with_boost}/include"
BOOST_LIBS="-L${with_boost}/lib -lboost_python"
AC_SUBST(BOOST_LIBS)
AC_SUBST(BOOST_CFLAGS)
if [ test "x${with_cortex}" != "x" -a "x${with_python}" != "x" -a "x${with_boost}" != "x"] ; then
AC_CHECK_FILE([${with_cortex}/lib/libcortex-python.a],
AM_CONDITIONAL(USE_CORTEX_PYTHON, true),
AC_MSG_ERROR(Could not find library libcortex-python.a))
CORTEX_PYTHON_CFLAGS="-I${with_cortex}/include"
CORTEX_PYTHON_LIBS="-L${with_cortex}/lib/ -lcortex-python"
AC_SUBST(CORTEX_PYTHON_LIBS)
AC_SUBST(CORTEX_PYTHON_CFLAGS)
else
AM_CONDITIONAL(USE_
BOOST
, false)
AM_CONDITIONAL(USE_
CORTEX_PYTHON
, false)
fi
dnl ======================================================================
...
...
src/network-workloads/model-net-mpi-replay.c
View file @
6b53da93
...
...
@@ -53,8 +53,10 @@ 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
];
#endif
/* Matthieu's additions end */
typedef
struct
nw_state
nw_state
;
...
...
@@ -1151,7 +1153,7 @@ void nw_test_init(nw_state* s, tw_lp* lp)
s
->
local_rank
=
lid
.
rank
;
// printf("network LP nw id %d app id %d local rank %d generating events, lp gid is %ld \n", s->nw_id,
// s->app_id, s->local_rank, lp->gid);
#ifdef ENABLE_CORTEX
#ifdef ENABLE_CORTEX
_PYTHON
strcpy
(
params_d
.
cortex_script
,
cortex_file
);
strcpy
(
params_d
.
cortex_class
,
cortex_class
);
#endif
...
...
@@ -1525,7 +1527,7 @@ const tw_optdef app_opt [] =
TWOPT_CHAR
(
"lp-io-dir"
,
lp_io_dir
,
"Where to place io output (unspecified -> no output"
),
TWOPT_UINT
(
"lp-io-use-suffix"
,
lp_io_use_suffix
,
"Whether to append uniq suffix to lp-io directory (default 0)"
),
TWOPT_CHAR
(
"offset_file"
,
offset_file
,
"offset file name"
),
#ifdef ENABLE_CORTEX
#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"
),
#endif
...
...
@@ -1572,7 +1574,7 @@ int main( int argc, char** argv )
" --workload_type=dumpi"
" --workload_conf_file=prefix-workload-file-name"
" --alloc_file=alloc-file-name"
#ifdef ENABLE_CORTEX
#ifdef ENABLE_CORTEX
_PYTHON
" --cortex-file=cortex-file-name"
" --cortex-class=cortex-class-name"
#endif
...
...
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
View file @
6b53da93
...
...
@@ -18,7 +18,10 @@
#if ENABLE_CORTEX
#include <cortex/cortex.h>
#include <cortex/datatype.h>
#include <cortex/cortex-mpich.h>
#ifdef ENABLE_CORTEX_PYTHON
#include <cortex/cortex-python.h>
#endif
#define PROFILE_TYPE cortex_dumpi_profile*
#define UNDUMPI_OPEN cortex_undumpi_open
#define DUMPI_START_STREAM_READ cortex_dumpi_start_stream_read
...
...
@@ -689,14 +692,17 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
libundumpi_populate_callbacks
(
&
callbacks
,
callarr
);
#ifdef ENABLE_CORTEX
#ifdef ENABLE_CORTEX_PYTHON
libundumpi_populate_callbacks
(
CORTEX_PYTHON_TRANSLATION
,
transarr
);
#else
libundumpi_populate_callbacks
(
CORTEX_MPICH_TRANSLATION
,
transarr
);
#endif
#endif
DUMPI_START_STREAM_READ
(
profile
);
//dumpi_header* trace_header = undumpi_read_header(profile);
//dumpi_free_header(trace_header);
#ifdef ENABLE_CORTEX
#ifdef ENABLE_CORTEX
_PYTHON
cortex_python_set_module
(
dumpi_params
->
cortex_script
,
dumpi_params
->
cortex_class
);
#endif
...
...
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