- find_model_description(surf_network_model_description, val);
-}
-
-/* callbacks of the network models values */
-static void _sg_cfg_cb__tcp_gamma(const char *name, int pos)
-{
- sg_tcp_gamma = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__maxmin_precision(const char* name, int pos)
-{
- sg_maxmin_precision = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__surf_precision(const char* name, int pos)
-{
- sg_surf_precision = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__sender_gap(const char* name, int pos)
-{
- sg_sender_gap = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__latency_factor(const char *name, int pos)
-{
- sg_latency_factor = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__bandwidth_factor(const char *name, int pos)
-{
- sg_bandwidth_factor = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__weight_S(const char *name, int pos)
-{
- sg_weight_S_parameter = xbt_cfg_get_double(name);
-}
-
-#if HAVE_SMPI
-/* callback of the mpi collectives */
-static void _sg_cfg_cb__coll(const char *category,
- s_mpi_coll_description_t * table,
- const char *name, int pos)
-{
- char *val;
-
- xbt_assert(_sg_cfg_init_status < 2,
- "Cannot change the model after the initialization");
-
- val = xbt_cfg_get_string(name);
-
- if (!strcmp(val, "help")) {
- coll_help(category, table);
- sg_cfg_exit_early();
- }
-
- /* New Module missing */
- find_coll_description(table, val, category);
-}
-static void _sg_cfg_cb__coll_gather(const char *name, int pos){
- _sg_cfg_cb__coll("gather", mpi_coll_gather_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)
-{
- _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_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_reduce(const char *name, int pos)
-{
- _sg_cfg_cb__coll("reduce", mpi_coll_reduce_description, name, pos);
-}
-static void _sg_cfg_cb__coll_reduce_scatter(const char *name, int pos){
- _sg_cfg_cb__coll("reduce_scatter", mpi_coll_reduce_scatter_description, name, pos);
-}
-static void _sg_cfg_cb__coll_scatter(const char *name, int pos){
- _sg_cfg_cb__coll("scatter", mpi_coll_scatter_description, name, pos);
-}
-static void _sg_cfg_cb__coll_barrier(const char *name, int pos){
- _sg_cfg_cb__coll("barrier", mpi_coll_barrier_description, name, pos);
-}
-
-static void _sg_cfg_cb__wtime_sleep(const char *name, int pos){
- smpi_wtime_sleep = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__iprobe_sleep(const char *name, int pos){
- smpi_iprobe_sleep = xbt_cfg_get_double(name);
-}
-
-static void _sg_cfg_cb__test_sleep(const char *name, int pos){
- smpi_test_sleep = xbt_cfg_get_double(name);
-}
-
-
-
-#endif
-
-/* callback of the inclusion path */
-static void _sg_cfg_cb__surf_path(const char *name, int pos)
-{
- char *path = xbt_strdup(xbt_cfg_get_string_at(simgrid_config, name, pos));
- if (path[0]) // ignore ""
- xbt_dynar_push(surf_path, &path);
-}
-
-/* callback to decide if we want to use the model-checking */
-#include "src/xbt_modinter.h"
-
-#if HAVE_MC
-extern int _sg_do_model_check; /* this variable lives in xbt_main until I find a right location for it */
-extern int _sg_do_model_check_record;
-#endif
-
-static void _sg_cfg_cb_model_check_replay(const char *name, int pos) {
- MC_record_path = xbt_cfg_get_string(name);
-}
-
-#if HAVE_MC
-static void _sg_cfg_cb_model_check_record(const char *name, int pos) {
- _sg_do_model_check_record = xbt_cfg_get_boolean(name);
-}
-#endif
-
-extern int _sg_do_verbose_exit;
-
-static void _sg_cfg_cb_verbose_exit(const char *name, int pos)
-{
- _sg_do_verbose_exit = xbt_cfg_get_boolean(name);
-}
-
-extern int _sg_do_clean_atexit;
-
-static void _sg_cfg_cb_clean_atexit(const char *name, int pos)
-{
- _sg_do_clean_atexit = xbt_cfg_get_boolean(name);
-}
-
-static void _sg_cfg_cb_context_factory(const char *name, int pos)
-{
- smx_context_factory_name = xbt_cfg_get_string(name);
-}
-
-static void _sg_cfg_cb_context_stack_size(const char *name, int pos)
-{
- smx_context_stack_size_was_set = 1;
- smx_context_stack_size = xbt_cfg_get_int(name) * 1024;
-}
-
-static void _sg_cfg_cb_context_guard_size(const char *name, int pos)
-{
- smx_context_guard_size_was_set = 1;
- smx_context_guard_size = xbt_cfg_get_int(name) * xbt_pagesize;
-}
-
-static void _sg_cfg_cb_contexts_nthreads(const char *name, int pos)
-{
- SIMIX_context_set_nthreads(xbt_cfg_get_int(name));
-}
-
-static void _sg_cfg_cb_contexts_parallel_threshold(const char *name, int pos)
-{
- SIMIX_context_set_parallel_threshold(xbt_cfg_get_int(name));