in NS3. The only valid values (enforced on the SimGrid side) are
'NewReno' or 'Reno' or 'Tahoe'.
+\subsection options_model_storage Configuring the Storage model
+
+\subsubsection option_model_storage_maxfd Maximum amount of file descriptors per host
+
+Each host maintains a fixed-size array of its file descriptors. You
+can change its size (1024 by default) through the \b
+storage/max_file_descriptors item to either enlarge it if your
+application requires it or to reduce it to save memory space.
+
\section options_modelchecking Configuring the Model-Checking
To enable the SimGrid model-checking support the program should
- \c path: \ref options_generic_path
- \c plugin: \ref options_generic_plugin
-- \c surf/nthreads: \ref options_model_nthreads
+- \c storage/max_file_descriptors: \ref option_model_storage_maxfd
+
- \c surf/precision: \ref options_model_precision
- \c <b>For collective operations of SMPI, please refer to Section \ref options_index_smpi_coll</b>
#! ./tesh
p Test the DAX loader on a small DAX instance
+! output sort
$ $SG_TEST_EXENV ${bindir:=.}/daxload/sd_daxload --log=no_loc ${srcdir:=.}/../platforms/two_clusters.xml ${srcdir:=.}/daxload/smalldax.xml
> [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
> [0.000000] [sd_daxparse/WARNING] Ignore file o1 size redefinition from 1000000 to 304
#! ./tesh
p Usage test of simdag's typed tasks
+! output sort
$ $SG_TEST_EXENV ./typed_tasks/sd_typed_tasks ${srcdir:=.}/../platforms/two_clusters.xml
> [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
> [2.080600] [sd_typed_tasks_test/INFO] Task 'Par. Comp. 3' start time: 0.000000, finish time: 0.400000
xbt_dynar_t file_descriptor_table;
} s_msg_host_priv_t;
+XBT_PUBLIC_DATA(int) sg_storage_max_file_descriptors;
+
/* ******************************** Task ************************************ */
typedef struct simdata_task *simdata_task_t;
typedef int (*xbt_automaton_propositional_symbol_callback_type)(void*);
typedef void (*xbt_automaton_propositional_symbol_free_function_type)(void*);
-XBT_PUBLIC(xbt_automaton_t) xbt_automaton_new();
+XBT_PUBLIC(xbt_automaton_t) xbt_automaton_new(void);
XBT_PUBLIC(void) xbt_automaton_load(xbt_automaton_t automaton, const char *file);
XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_state_new(xbt_automaton_t a, int type, char* id);
XBT_PUBLIC(xbt_automaton_transition_t)
*/
typedef struct xbt_fifo *xbt_fifo_t;
-XBT_PUBLIC(xbt_fifo_t) xbt_fifo_new();
+XBT_PUBLIC(xbt_fifo_t) xbt_fifo_new(void);
XBT_PUBLIC(void) xbt_fifo_free(xbt_fifo_t l);
XBT_PUBLIC(void) xbt_fifo_reset(xbt_fifo_t l);
/** @} */
* @{
*/
-XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item();
+XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(void);
XBT_PUBLIC(void) xbt_fifo_set_item_content(xbt_fifo_item_t i, void *v);
XBT_PUBLIC(void *) xbt_fifo_get_item_content(xbt_fifo_item_t i);
XBT_PUBLIC(void) xbt_fifo_free_item(xbt_fifo_item_t i);
/** @} */
/* Deprecated functions: don't use! */
-XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_newitem();
+XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_newitem(void);
XBT_PUBLIC(void) xbt_fifo_freeitem(xbt_fifo_item_t l);
XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_getFirstItem(xbt_fifo_t l);
#define xbt_lib_cursor_t xbt_dict_cursor_t
-XBT_PUBLIC(xbt_lib_t) xbt_lib_new();
+XBT_PUBLIC(xbt_lib_t) xbt_lib_new(void);
XBT_PUBLIC(void) xbt_lib_free(xbt_lib_t * lib);
XBT_PUBLIC(int) xbt_lib_add_level(xbt_lib_t lib, void_f_pvoid_t free_f);
XBT_PUBLIC(void) xbt_lib_set(xbt_lib_t lib, const char *name, int level, void *obj);
/** Cache the number of bits of addresses inside a given page, log2(xbt_pagesize). */
XBT_PUBLIC_DATA(int) xbt_pagebits;
-XBT_PUBLIC(const char *) xbt_procname();
+XBT_PUBLIC(const char *) xbt_procname(void);
/** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib) , while
SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */
typedef struct xbt_strbuff* xbt_strbuff_t;
XBT_PUBLIC(void) xbt_strbuff_clear(xbt_strbuff_t b);
-XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new();
+XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new(void);
XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new_from(const char *s);
XBT_PUBLIC(void) xbt_strbuff_free(xbt_strbuff_t b);
XBT_PUBLIC(void) xbt_strbuff_free_container(xbt_strbuff_t b);
typedef struct s_smx_mutex_ *xbt_mutex_t;
/** @brief Creates a new mutex variable */
-XBT_PUBLIC(xbt_mutex_t) xbt_mutex_init();
+XBT_PUBLIC(xbt_mutex_t) xbt_mutex_init(void);
/** @brief Blocks onto the given mutex variable */
XBT_PUBLIC(void) xbt_mutex_acquire(xbt_mutex_t mutex);
typedef struct s_smx_cond_ *xbt_cond_t;
/** @brief Creates a condition variable */
-XBT_PUBLIC(xbt_cond_t) xbt_cond_init();
+XBT_PUBLIC(xbt_cond_t) xbt_cond_init(void);
/** @brief Blocks onto the given condition variable */
XBT_PUBLIC(void) xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex);
* @{
*/
/** @brief Kill the program in silence */
-XBT_PUBLIC(void) XBT_ATTRIB_NORETURN xbt_abort();
+XBT_PUBLIC(void) XBT_ATTRIB_NORETURN xbt_abort(void);
/**
* @brief Kill the program with an error message
* @{
*/
-XBT_PUBLIC(int) xbt_os_get_numcores();
+XBT_PUBLIC(int) xbt_os_get_numcores(void);
/** \brief Thread data type (opaque structure) */
typedef struct xbt_os_thread_ *xbt_os_thread_t;
XBT_PUBLIC(void) xbt_os_thread_exit(int *retcode);
XBT_PUBLIC(void) xbt_os_thread_detach(xbt_os_thread_t thread);
-XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_self();
-XBT_PUBLIC(const char *) xbt_os_thread_self_name();
+XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_self(void);
+XBT_PUBLIC(const char *) xbt_os_thread_self_name(void);
XBT_PUBLIC(void) xbt_os_thread_set_extra_data(void *data);
-XBT_PUBLIC(void *) xbt_os_thread_get_extra_data();
+XBT_PUBLIC(void *) xbt_os_thread_get_extra_data(void);
XBT_PUBLIC(void) xbt_os_thread_key_create(xbt_os_thread_key_t* key);
XBT_PUBLIC(void) xbt_os_thread_set_specific(xbt_os_thread_key_t key, void* value);
XBT_PUBLIC(void*) xbt_os_thread_get_specific(xbt_os_thread_key_t key);
/* xbt_os_thread_join frees the joined thread (ie the XBT wrapper around it, the OS frees the rest) */
XBT_PUBLIC(void) xbt_os_thread_join(xbt_os_thread_t thread, void **thread_return);
-XBT_PUBLIC(void) xbt_os_thread_yield();
+XBT_PUBLIC(void) xbt_os_thread_yield(void);
XBT_PUBLIC(void) xbt_os_thread_cancel(xbt_os_thread_t thread);
XBT_PUBLIC(void) xbt_os_thread_setstacksize(int stack_size);
XBT_PUBLIC(void) xbt_os_thread_setguardsize(int guard_size);
/** \brief Thread mutex data type (opaque structure) */
typedef struct xbt_os_mutex_ *xbt_os_mutex_t;
-XBT_PUBLIC(xbt_os_mutex_t) xbt_os_mutex_init();
+XBT_PUBLIC(xbt_os_mutex_t) xbt_os_mutex_init(void);
XBT_PUBLIC(void) xbt_os_mutex_acquire(xbt_os_mutex_t mutex);
XBT_PUBLIC(void) xbt_os_mutex_release(xbt_os_mutex_t mutex);
XBT_PUBLIC(void) xbt_os_mutex_destroy(xbt_os_mutex_t mutex);
/** \brief Thread condition data type (opaque structure) */
typedef struct xbt_os_cond_ *xbt_os_cond_t;
-XBT_PUBLIC(xbt_os_cond_t) xbt_os_cond_init();
+XBT_PUBLIC(xbt_os_cond_t) xbt_os_cond_init(void);
XBT_PUBLIC(void) xbt_os_cond_wait(xbt_os_cond_t cond, xbt_os_mutex_t mutex);
XBT_PUBLIC(void) xbt_os_cond_signal(xbt_os_cond_t cond);
XBT_PUBLIC(void) xbt_os_cond_broadcast(xbt_os_cond_t cond);
*
* gives the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970).
*/
-XBT_PUBLIC(double) xbt_os_time();
+XBT_PUBLIC(double) xbt_os_time(void);
XBT_PUBLIC(void) xbt_os_sleep(double sec);
typedef struct s_xbt_os_timer *xbt_os_timer_t;
-XBT_PUBLIC(xbt_os_timer_t) xbt_os_timer_new();
+XBT_PUBLIC(xbt_os_timer_t) xbt_os_timer_new(void);
XBT_PUBLIC(void) xbt_os_timer_free(xbt_os_timer_t timer);
XBT_PUBLIC(double) xbt_os_timer_elapsed(xbt_os_timer_t timer);
-XBT_PUBLIC(size_t) xbt_os_timer_size();
+XBT_PUBLIC(size_t) xbt_os_timer_size(void);
XBT_PUBLIC(void) xbt_os_walltimer_start(xbt_os_timer_t timer);
XBT_PUBLIC(void) xbt_os_walltimer_resume(xbt_os_timer_t timer);
XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, char *name, const char *desc);
XBT_PUBLIC_DATA(void) (*smpi_coll_cleanup_callback)();
-XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2();
+XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(void);
SG_END_DECL()
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg);
+int sg_storage_max_file_descriptors = 1024;
+
/** @addtogroup m_host_management
* (#msg_host_t) and the functions for managing it.
*
priv->affinity_mask_db = xbt_dict_new_homogeneous(nullptr);
priv->file_descriptor_table = xbt_dynar_new(sizeof(int), nullptr);
- for (int i=1023; i>=0;i--)
+ for (int i=sg_storage_max_file_descriptors-1; i>=0;i--)
xbt_dynar_push_as(priv->file_descriptor_table, int, i);
sg_host_msg_set(host,priv);
xbt_cfg_register_string("smpi/reduce", nullptr, &_check_coll_reduce, "Which collective to use for reduce");
#endif // HAVE_SMPI
+ /* Storage */
+
+ sg_storage_max_file_descriptors = 1024;
+ simgrid::config::bindFlag(sg_storage_max_file_descriptors, "storage/max_file_descriptors",
+ "Maximum number of concurrently opened files per host. Default is 1024");
+
+ /* Others */
+
xbt_cfg_register_boolean("exception/cutpath", "no", nullptr,
"Whether to cut all path information from call traces, used e.g. in exceptions.");
return (mpi_errno);
}
-
-
int smpi_coll_tuned_allgather_mvapich2(void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
MPI_Comm comm)
return (mpi_errno);
}
-
-void smpi_coll_cleanup_mvapich2(){
+void smpi_coll_cleanup_mvapich2(void){
int i=0;
if(mv2_alltoall_thresholds_table)
xbt_free(mv2_alltoall_thresholds_table[i]);
xbt_free(mv2_allgather_table_ppn_conf);
xbt_free(mv2_allgather_thresholds_table);
-
xbt_free(mv2_allgatherv_thresholds_table);
xbt_free(mv2_reduce_thresholds_table);
xbt_free(mv2_red_scat_thresholds_table);
xbt_free(mv2_size_scatter_tuning_table);
xbt_free(mv2_scatter_table_ppn_conf);
}
-
fprintf(stderr,
"FATAL ERROR: Your program was compiled with SimGrid version %d.%d.%d, "
"and then linked against SimGrid %d.%d.%d. Please fix this.\n",
- SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH,
- lib_version_major,lib_version_minor,lib_version_patch);
+ lib_version_major,lib_version_minor,lib_version_patch,
+ SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH);
abort();
}
if (lib_version_patch != SIMGRID_VERSION_PATCH) {
+ if(SIMGRID_VERSION_PATCH >= 90 || lib_version_patch >=90){
+ fprintf(stderr,
+ "FATAL ERROR: Your program was compiled with SimGrid version %d.%d.%d, "
+ "and then linked against SimGrid %d.%d.%d. \n"
+ "One of them is a development version, and should not be mixed with the stable release. Please fix this.\n",
+ lib_version_major,lib_version_minor,lib_version_patch,
+ SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH);
+ abort();
+ }
fprintf(stderr,
"Warning: Your program was compiled with SimGrid version %d.%d.%d, "
"and then linked against SimGrid %d.%d.%d. Proceeding anyway.\n",
- SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH,
- lib_version_major,lib_version_minor,lib_version_patch);
+ lib_version_major,lib_version_minor,lib_version_patch,
+ SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH);
}
}
void (*free_function)(void*);
};
-xbt_automaton_t xbt_automaton_new(){
+xbt_automaton_t xbt_automaton_new(void){
xbt_automaton_t automaton = NULL;
automaton = xbt_new0(struct xbt_automaton, 1);
automaton->states = xbt_dynar_new(sizeof(xbt_automaton_state_t), xbt_automaton_state_free_voidp);
typedef struct s_xbt_dict_cursor s_xbt_dict_cursor_t;
extern XBT_PRIVATE xbt_mallocator_t dict_elm_mallocator;
-XBT_PRIVATE void * dict_elm_mallocator_new_f();
+XBT_PRIVATE void * dict_elm_mallocator_new_f(void);
#define dict_elm_mallocator_free_f xbt_free_f
#define dict_elm_mallocator_reset_f ((void_f_pvoid_t)NULL)
extern XBT_PRIVATE xbt_mallocator_t dict_het_elm_mallocator;
-extern XBT_PRIVATE void * dict_het_elm_mallocator_new_f();
+extern XBT_PRIVATE void * dict_het_elm_mallocator_new_f(void);
#define dict_het_elm_mallocator_free_f xbt_free_f
#define dict_het_elm_mallocator_reset_f ((void_f_pvoid_t)NULL)
* These are internal XBT functions called by xbt_preinit/postexit().
* It can be used several times to recreate the mallocator, for example when you switch to MC mode
*/
-void xbt_fifo_preinit(void)
+void xbt_fifo_preinit()
{
item_mallocator = xbt_mallocator_new(65536, fifo_item_mallocator_new_f,
fifo_item_mallocator_free_f, fifo_item_mallocator_reset_f);
}
-void xbt_fifo_postexit(void)
+void xbt_fifo_postexit()
{
if (item_mallocator != NULL) {
xbt_mallocator_free(item_mallocator);
pthread_exit(retval);
}
-xbt_os_thread_t xbt_os_thread_self(void)
+xbt_os_thread_t xbt_os_thread_self(void )
{
if (!thread_mod_inited)
return NULL;
void xbt_backtrace_preinit();
void xbt_backtrace_postexit();
-void xbt_log_preinit();
+void xbt_log_preinit(void);
void xbt_log_init(int *argc, char **argv);
-void xbt_log_postexit();
+void xbt_log_postexit(void);
-void xbt_fifo_preinit();
-void xbt_fifo_postexit();
-void xbt_dict_preinit();
-void xbt_dict_postexit();
+void xbt_fifo_preinit(void);
+void xbt_fifo_postexit(void);
+void xbt_dict_preinit(void);
+void xbt_dict_postexit(void);
-void xbt_os_thread_mod_preinit();
-void xbt_os_thread_mod_postexit();
+void xbt_os_thread_mod_preinit(void);
+void xbt_os_thread_mod_postexit(void);
void *mmalloc_preinit();
void mmalloc_postexit();
+! output sort
$ ${bindir:=.}/incomplete ../../../examples/platforms/two_hosts_platform_shared.xml "--log=root.fmt:[%10.6r]%e%m%n"
> [ 0.000000] Switching to the L07 model to handle parallel tasks.
> [ 8.000100] Simulation is finished but 3 tasks are still not done