-
-/* callbacks of the network models values */
-static void _sg_cfg_cb__tcp_gamma(const char *name)
-{
- sg_tcp_gamma = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__maxmin_precision(const char* name)
-{
- sg_maxmin_precision = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__surf_precision(const char* name)
-{
- sg_surf_precision = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__sender_gap(const char* name)
-{
- sg_sender_gap = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__latency_factor(const char *name)
-{
- sg_latency_factor = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__bandwidth_factor(const char *name)
-{
- sg_bandwidth_factor = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__weight_S(const char *name)
-{
- sg_weight_S_parameter = xbt_cfg_get_double(name);
-}
-
-#if HAVE_SMPI
-/* callback of the mpi collectives: simply check that this is a valid name. It will be picked up in smpi_global.cpp */
-static void _check_coll(const char *category,
- s_mpi_coll_description_t * table,
- const char *name)
-{
- xbt_assert(_sg_cfg_init_status < 2, "Cannot change the collective algorithm after the initialization");
-
- char *val = xbt_cfg_get_string(name);
- if (val && !strcmp(val, "help")) {
- coll_help(category, table);
- sg_cfg_exit_early();
- }
-
- find_coll_description(table, val, category);
-}
-static void _check_coll_gather(const char *name){
- _check_coll("gather", mpi_coll_gather_description, name);
-}
-static void _check_coll_allgather(const char *name){
- _check_coll("allgather", mpi_coll_allgather_description, name);
-}
-static void _check_coll_allgatherv(const char *name){
- _check_coll("allgatherv", mpi_coll_allgatherv_description, name);
-}
-static void _check_coll_allreduce(const char *name)
-{
- _check_coll("allreduce", mpi_coll_allreduce_description, name);
-}
-static void _check_coll_alltoall(const char *name)
-{
- _check_coll("alltoall", mpi_coll_alltoall_description, name);
-}
-static void _check_coll_alltoallv(const char *name)
-{
- _check_coll("alltoallv", mpi_coll_alltoallv_description, name);
-}
-static void _check_coll_bcast(const char *name)
-{
- _check_coll("bcast", mpi_coll_bcast_description, name);
-}
-static void _check_coll_reduce(const char *name)
-{
- _check_coll("reduce", mpi_coll_reduce_description, name);
-}
-static void _check_coll_reduce_scatter(const char *name){
- _check_coll("reduce_scatter", mpi_coll_reduce_scatter_description, name);
-}
-static void _check_coll_scatter(const char *name){
- _check_coll("scatter", mpi_coll_scatter_description, name);
-}
-static void _check_coll_barrier(const char *name){
- _check_coll("barrier", mpi_coll_barrier_description, name);
-}
-
-static void _sg_cfg_cb__wtime_sleep(const char *name){
- smpi_wtime_sleep = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__iprobe_sleep(const char *name){
- smpi_iprobe_sleep = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__test_sleep(const char *name){
- smpi_test_sleep = xbt_cfg_get_double(name);
-}
-#endif
-
-/* callback of the inclusion path */
-static void _sg_cfg_cb__surf_path(const char *name)
-{
- char *path = xbt_cfg_get_string(name);
- if (path[0]) {// ignore ""
- path = xbt_strdup(path);
- xbt_dynar_push(surf_path, &path);
- }
-}
-