Commit 5735e4a2 authored by Misbah Mubarak's avatar Misbah Mubarak

Merge branch 'master' into 'dragonfly-validation'

# Conflicts:
#   src/network-workloads/model-net-mpi-replay.c
#   tests/Makefile.subdir
#   tests/modelnet-test-dragonfly-synthetic.sh
parents 77ac3ceb 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
};
......
......@@ -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"
......
......@@ -71,8 +71,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 */
......@@ -1622,7 +1623,24 @@ void nw_test_init(nw_state* s, tw_lp* lp)
return;
}
tw_stime overhead = 0.0;
if (strcmp(workload_type, "dumpi") == 0){
strcpy(params_d.file_name, file_name_of_job[lid.job]);
params_d.num_net_traces = num_traces_of_job[lid.job];
params = (char*)&params_d;
s->app_id = lid.job;
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_PYTHON
strcpy(params_d.cortex_script, cortex_file);
strcpy(params_d.cortex_class, cortex_class);
strcpy(params_d.cortex_gen, cortex_gen);
#endif
}
wrkld_id = codes_workload_load("dumpi-trace-workload", params, s->app_id, s->local_rank);
double overhead;
int rc = configuration_get_value_double(&config, "PARAMS", "self_msg_overhead", NULL, &overhead);
if(rc == 0)
......@@ -2153,6 +2171,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()
};
......@@ -2380,4 +2399,4 @@ int main( int argc, char** argv )
tw_end();
return 0;
}
}
\ No newline at end of file
......@@ -38,6 +38,9 @@ void rc_stack_create(struct rc_stack **s){
case OPTIMISTIC:
ss->mode = RC_OPT;
break;
case OPTIMISTIC_REALTIME:
ss->mode = RC_OPT;
break;
case OPTIMISTIC_DEBUG:
ss->mode = RC_OPT_DBG;
break;
......
......@@ -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;
......
......@@ -28,6 +28,7 @@ TESTS += tests/lp-io-test.sh \
tests/map-ctx-test.sh \
tests/modelnet-test.sh \
tests/modelnet-test-torus.sh \
tests/modelnet-test-torus-traces.sh \
tests/modelnet-test-loggp.sh \
tests/modelnet-test-dragonfly.sh \
tests/modelnet-test-slimfly.sh \
......@@ -117,4 +118,4 @@ tests_modelnet_simplep2p_test_SOURCES = tests/modelnet-simplep2p-test.c
tests_modelnet_p2p_bw_SOURCES = tests/modelnet-p2p-bw.c
tests_concurrent_msg_recv_SOURCES = tests/concurrent-msg-recv.c
tests_modelnet_test_collective_SOURCES = tests/modelnet-test-collective.c
tests_modelnet_prio_sched_test_SOURCES = tests/modelnet-prio-sched-test.c
tests_modelnet_prio_sched_test_SOURCES = tests/modelnet-prio-sched-test.c
\ No newline at end of file
#!/bin/bash
if [ -z $srcdir ]; then
echo srcdir variable not set.
exit 1
fi
src/network-workloads/model-net-synthetic-custom-dfly --sync=1 --num_messages=1 -- src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-1728-nodes.conf
mpirun -np 2 src/network-workloads/model-net-mpi-replay --sync=3 --num_net_traces=27 --disable_compute=1 --workload_file=/tmp/df_AMG_n27_dumpi/dumpi-2014.03.03.14.55.00- --workload_type="dumpi" -- src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-1728-nodes.conf
......
#!/bin/bash
src/network-workloads/model-net-synthetic --sync=1 --num_messages=1 -- $srcdir/src/network-workloads/conf/modelnet-synthetic-dragonfly.conf
#!/bin/bash
if [ -z $srcdir ]; then
echo srcdir variable not set.
exit 1
fi
source $srcdir/tests/download-traces.sh
src/network-workloads/model-net-synthetic-slimfly --sync=1 -- $srcdir/src/network-workloads/conf/modelnet-synthetic-slimfly-min.conf
mpirun -np 2 src/network-workloads/model-net-mpi-replay --disable_compute=1 --sync=3 --num_net_traces=27 --workload_file=/tmp/df_AMG_n27_dumpi/dumpi-2014.03.03.14.55.00- --workload_type="dumpi" -- $srcdir/src/network-workloads/conf/modelnet-mpi-test-slimfly-min.conf
#!/bin/bash
if [ -z $srcdir ]; then
echo srcdir variable not set.
exit 1
fi
source $srcdir/tests/download-traces.sh
mpirun -np 2 src/network-workloads/model-net-mpi-replay --sync=3 --disable_compute=1 --num_net_traces=27 --workload_file=/tmp/df_AMG_n27_dumpi/dumpi-2014.03.03.14.55.00- --workload_type="dumpi" -- $srcdir/src/network-workloads/conf/modelnet-mpi-test-torus.conf
#!/bin/bash
if [ -z $srcdir ]; then
echo srcdir variable not set.
exit 1
fi
source $srcdir/tests/download-traces.sh
tests/modelnet-test --sync=1 -- tests/conf/modelnet-test-torus.conf
mpirun -np 2 src/network-workloads/model-net-mpi-replay --sync=3 --disable_compute=1 --num_net_traces=27 --workload_file=/tmp/df_AMG_n27_dumpi/dumpi-2014.03.03.14.55.00- --workload_type="dumpi" -- $srcdir/src/network-workloads/conf/modelnet-mpi-test-torus.conf
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment