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
Fully implement the piece selection algorithms of Bittorrent protocol:
[simgrid.git]
/
src
/
simgrid
/
sg_config.c
diff --git
a/src/simgrid/sg_config.c
b/src/simgrid/sg_config.c
index
fffd34a
..
63f1a02
100644
(file)
--- a/
src/simgrid/sg_config.c
+++ b/
src/simgrid/sg_config.c
@@
-226,6
+226,7
@@
static void _sg_cfg_cb__weight_S(const char *name, int pos)
sg_weight_S_parameter = xbt_cfg_get_double(_sg_cfg_set, name);
}
sg_weight_S_parameter = xbt_cfg_get_double(_sg_cfg_set, name);
}
+#ifdef HAVE_SMPI
/* callback of the mpi collectives */
static void _sg_cfg_cb__coll(const char *category,
s_mpi_coll_description_t * table,
/* callback of the mpi collectives */
static void _sg_cfg_cb__coll(const char *category,
s_mpi_coll_description_t * table,
@@
-249,14
+250,21
@@
static void _sg_cfg_cb__coll(const char *category,
static void _sg_cfg_cb__coll_allgather(const char *name, int pos){
_sg_cfg_cb__coll("allgather", mpi_coll_allgather_description, name, pos);
}
static void _sg_cfg_cb__coll_allgather(const char *name, int pos){
_sg_cfg_cb__coll("allgather", mpi_coll_allgather_description, name, pos);
}
+static void _sg_cfg_cb__coll_allgatherv(const char *name, int pos){
+ _sg_cfg_cb__coll("allgatherv", mpi_coll_allgatherv_description, name, pos);
+}
static void _sg_cfg_cb__coll_allreduce(const char *name, int pos)
{
static void _sg_cfg_cb__coll_allreduce(const char *name, int pos)
{
- _sg_cfg_cb__coll("allreduce", mpi_coll_allreduce_description, name, pos);
+ _sg_cfg_cb__coll("allreduce", mpi_coll_allreduce_description, name, pos);
}
static void _sg_cfg_cb__coll_alltoall(const char *name, int pos)
{
_sg_cfg_cb__coll("alltoall", mpi_coll_alltoall_description, name, pos);
}
}
static void _sg_cfg_cb__coll_alltoall(const char *name, int pos)
{
_sg_cfg_cb__coll("alltoall", mpi_coll_alltoall_description, name, pos);
}
+static void _sg_cfg_cb__coll_alltoallv(const char *name, int pos)
+{
+ _sg_cfg_cb__coll("alltoallv", mpi_coll_alltoallv_description, name, pos);
+}
static void _sg_cfg_cb__coll_bcast(const char *name, int pos)
{
_sg_cfg_cb__coll("bcast", mpi_coll_bcast_description, name, pos);
static void _sg_cfg_cb__coll_bcast(const char *name, int pos)
{
_sg_cfg_cb__coll("bcast", mpi_coll_bcast_description, name, pos);
@@
-265,7
+273,7
@@
static void _sg_cfg_cb__coll_reduce(const char *name, int pos)
{
_sg_cfg_cb__coll("reduce", mpi_coll_reduce_description, name, pos);
}
{
_sg_cfg_cb__coll("reduce", mpi_coll_reduce_description, name, pos);
}
-
+#endif
/* callback of the inclusion path */
static void _sg_cfg_cb__surf_path(const char *name, int pos)
/* callback of the inclusion path */
static void _sg_cfg_cb__surf_path(const char *name, int pos)
@@
-686,7
+694,7
@@
void sg_config_init(int *argc, char **argv)
xbt_cfg_setdefault_string(_sg_cfg_set, "ns3/TcpModel", "default");
#endif
xbt_cfg_setdefault_string(_sg_cfg_set, "ns3/TcpModel", "default");
#endif
-
//
SMPI
+
#ifdef HAVE_
SMPI
double default_reference_speed = 20000.0;
xbt_cfg_register(&_sg_cfg_set, "smpi/running_power",
"Power of the host running the simulation (in flop/s). Used to bench the operations.",
double default_reference_speed = 20000.0;
xbt_cfg_register(&_sg_cfg_set, "smpi/running_power",
"Power of the host running the simulation (in flop/s). Used to bench the operations.",
@@
-758,6
+766,12
@@
void sg_config_init(int *argc, char **argv)
xbt_cfgelm_string, &default_value, 1, 1, &_sg_cfg_cb__coll_allgather,
NULL);
xbt_cfgelm_string, &default_value, 1, 1, &_sg_cfg_cb__coll_allgather,
NULL);
+ default_value = xbt_strdup("default");
+ xbt_cfg_register(&_sg_cfg_set, "smpi/allgatherv",
+ "Which collective to use for allgatherv",
+ xbt_cfgelm_string, &default_value, 1, 1, &_sg_cfg_cb__coll_allgatherv,
+ NULL);
+
default_value = xbt_strdup("default");
xbt_cfg_register(&_sg_cfg_set, "smpi/allreduce",
"Which collective to use for allreduce",
default_value = xbt_strdup("default");
xbt_cfg_register(&_sg_cfg_set, "smpi/allreduce",
"Which collective to use for allreduce",
@@
-770,6
+784,11
@@
void sg_config_init(int *argc, char **argv)
xbt_cfgelm_string, &default_value, 1, 1, &_sg_cfg_cb__coll_alltoall,
NULL);
xbt_cfgelm_string, &default_value, 1, 1, &_sg_cfg_cb__coll_alltoall,
NULL);
+ default_value = xbt_strdup("default");
+ xbt_cfg_register(&_sg_cfg_set, "smpi/alltoallv",
+ "Which collective to use for alltoallv",
+ xbt_cfgelm_string, &default_value, 1, 1, &_sg_cfg_cb__coll_alltoallv,
+ NULL);
default_value = xbt_strdup("default");
xbt_cfg_register(&_sg_cfg_set, "smpi/bcast",
default_value = xbt_strdup("default");
xbt_cfg_register(&_sg_cfg_set, "smpi/bcast",
@@
-783,8
+802,7
@@
void sg_config_init(int *argc, char **argv)
"Which collective to use for reduce",
xbt_cfgelm_string, &default_value, 1, 1, &_sg_cfg_cb__coll_reduce,
NULL);
"Which collective to use for reduce",
xbt_cfgelm_string, &default_value, 1, 1, &_sg_cfg_cb__coll_reduce,
NULL);
- //END SMPI
-
+#endif // HAVE_SMPI
if (!surf_path) {
/* retrieves the current directory of the current process */
if (!surf_path) {
/* retrieves the current directory of the current process */