Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes-dev
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Xin Wang
codes-dev
Commits
383bfc8c
Commit
383bfc8c
authored
Apr 22, 2017
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exposing placement to Cortex
parent
18ac8bbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
src/network-workloads/model-net-mpi-replay.c
src/network-workloads/model-net-mpi-replay.c
+7
-0
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
+19
-2
No files found.
src/network-workloads/model-net-mpi-replay.c
View file @
383bfc8c
...
...
@@ -1597,6 +1597,8 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
return
-
1
;
}
jobmap_ctx
=
NULL
;
// make sure it's NULL if it's not used
if
(
strlen
(
workloads_conf_file
)
>
0
)
{
FILE
*
name_file
=
fopen
(
workloads_conf_file
,
"r"
);
...
...
@@ -1629,6 +1631,11 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
strcpy
(
file_name_of_job
[
0
],
workload_file
);
num_traces_of_job
[
0
]
=
num_net_traces
;
alloc_spec
=
0
;
if
(
strlen
(
alloc_file
)
>
0
)
{
alloc_spec
=
1
;
jobmap_p
.
alloc_file
=
alloc_file
;
jobmap_ctx
=
codes_jobmap_configure
(
CODES_JOBMAP_LIST
,
&
jobmap_p
);
}
}
MPI_Comm_rank
(
MPI_COMM_CODES
,
&
rank
);
MPI_Comm_size
(
MPI_COMM_CODES
,
&
nprocs
);
...
...
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
View file @
383bfc8c
...
...
@@ -14,6 +14,7 @@
#include "dumpi/libundumpi/libundumpi.h"
#include "codes/codes-workload.h"
#include "codes/quickhash.h"
#include "codes/codes-jobmap.h"
#include "codes/model-net.h"
#if ENABLE_CORTEX
...
...
@@ -39,6 +40,9 @@
#define DUMPI_IGNORE_DELAY 100
#define RANK_HASH_TABLE_SIZE 400
/* This variable is defined in src/network-workloads/model-net-mpi-replay.c */
extern
struct
codes_jobmap_ctx
*
jobmap_ctx
;
static
struct
qhash_table
*
rank_tbl
=
NULL
;
static
int
rank_tbl_pop
=
0
;
...
...
@@ -653,8 +657,21 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
profile
=
cortex_undumpi_open
(
file_name
,
app_id
,
dumpi_params
->
num_net_traces
,
rank
);
}
// TODO: call cortex_placement_set (from cortex/placement.h) to set the compute node id of
// each rank of the application
{
int
i
;
for
(
i
=
0
;
i
<
dumpi_params
->
num_net_traces
;
i
++
)
{
struct
codes_jobmap_id
id
=
{
.
job
=
app_id
,
.
rank
=
i
};
uint32_t
cn_id
;
if
(
jobmap_ctx
)
{
cn_id
=
codes_jobmap_to_global_id
(
id
,
jobmap_ctx
);
}
else
{
cn_id
=
i
;
}
cortex_placement_set
(
profile
,
i
,
cn_id
);
}
}
cortex_topology_set
(
profile
,
&
model_net_topology
);
#else
...
...
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