A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rework the doc of model-check/replay, and add an example with sthread
[simgrid.git]
/
examples
/
smpi
/
comm_dynamic_costs
/
comm-dynamic-cost.cpp
diff --git
a/examples/smpi/comm_dynamic_costs/comm-dynamic-cost.cpp
b/examples/smpi/comm_dynamic_costs/comm-dynamic-cost.cpp
index ee4f0539da8eb579fec7939c246a5b19f9dde5f7..470836b3e90eb3c7652b47c396afc05c1ddf3fae 100644
(file)
--- a/
examples/smpi/comm_dynamic_costs/comm-dynamic-cost.cpp
+++ b/
examples/smpi/comm_dynamic_costs/comm-dynamic-cost.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2006-202
1
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-202
3
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-15,11
+15,11
@@
namespace sg4 = simgrid::s4u;
* in collective operations. But it doesn't happen in this example
*
* @param op MPI Operation (set by user at cb registering below)
* in collective operations. But it doesn't happen in this example
*
* @param op MPI Operation (set by user at cb registering below)
- * @param size Message size (set by
simg
rid)
- * @param src Source host (set by
simg
rid)
- * @param dst Source host (set by
simg
rid)
+ * @param size Message size (set by
SimG
rid)
+ * @param src Source host (set by
SimG
rid)
+ * @param dst Source host (set by
SimG
rid)
*/
*/
-static double smpi_cost_cb(SmpiOperation op,
double size, sg4::Host* src,
sg4::Host* dst)
+static double smpi_cost_cb(SmpiOperation op,
size_t /*size*/, const sg4::Host* src, const
sg4::Host* dst)
{
/* some dummy cost that depends on the operation and host */
static std::unordered_map<std::string, double> read_cost = {{"Tremblay", 1}, {"Jupiter", 2}};
{
/* some dummy cost that depends on the operation and host */
static std::unordered_map<std::string, double> read_cost = {{"Tremblay", 1}, {"Jupiter", 2}};
@@
-47,8
+47,7
@@
void load_platform(const sg4::Engine& /*e*/)
const sg4::Link* link9 = root->create_split_duplex_link("9", "7.20975MBps")->set_latency("1.461517ms")->seal();
const sg4::Link* link9 = root->create_split_duplex_link("9", "7.20975MBps")->set_latency("1.461517ms")->seal();
- root->add_route(tremblay->get_netpoint(), jupiter->get_netpoint(), nullptr, nullptr,
- {{link9, sg4::LinkInRoute::Direction::UP}}, true);
+ root->add_route(tremblay, jupiter, {link9});
root->seal();
/* set cost callback for MPI_Send and MPI_Recv */
root->seal();
/* set cost callback for MPI_Send and MPI_Recv */