m_host_list[0] = MSG_host_self();
m_host_list[1] = attached_host;
- double computation_amount[] = { 0, 0 };
- double communication_amount[] = { 0, 0, (double)read_size, 0 };
+ double flops_amount[] = { 0, 0 };
+ double bytes_amount[] = { 0, 0, (double)read_size, 0 };
- msg_task_t task = MSG_parallel_task_create("file transfer for read", 2, m_host_list, computation_amount, communication_amount, NULL);
+ msg_task_t task = MSG_parallel_task_create("file transfer for read", 2, m_host_list, flops_amount, bytes_amount, NULL);
msg_error_t transfer = MSG_parallel_task_execute(task);
MSG_task_destroy(task);
free(m_host_list);
m_host_list[0] = MSG_host_self();
m_host_list[1] = attached_host;
- double computation_amount[] = { 0, 0 };
- double communication_amount[] = { 0, (double)size, 0, 0 };
+ double flops_amount[] = { 0, 0 };
+ double bytes_amount[] = { 0, (double)size, 0, 0 };
- msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, computation_amount, communication_amount, NULL);
+ msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, flops_amount, bytes_amount, NULL);
msg_error_t transfer = MSG_parallel_task_execute(task);
MSG_task_destroy(task);
free(m_host_list);
{
char *name;
msg_file_priv_t priv = MSG_file_priv(fd);
+ if (priv->data)
+ xbt_free(priv->data);
int res = simcall_file_close(priv->simdata->smx_file, MSG_host_self());
name = bprintf("%s:%i:%s",MSG_host_get_name(MSG_host_self()),MSG_process_self_PID(),priv->fullpath);
m_host_list[0] = attached_host;
m_host_list[1] = host_dest;
- double computation_amount[] = { 0, 0 };
- double communication_amount[] = { 0, (double)read_size, 0, 0 };
+ double flops_amount[] = { 0, 0 };
+ double bytes_amount[] = { 0, (double)read_size, 0, 0 };
- msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, computation_amount, communication_amount, NULL);
+ msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, flops_amount, bytes_amount, NULL);
msg_error_t transfer = MSG_parallel_task_execute(task);
MSG_task_destroy(task);
free(m_host_list);
xbt_dict_set(MSG_storage_get_properties(storage), name, value,free_ctn);
}
+/** \ingroup m_storage_management
+ * \brief Returns the value of a given storage property
+ *
+ * \param storage a storage
+ * \param name a property name
+ * \return value of a property (or NULL if property not set)
+ */
+const char *MSG_storage_get_property_value(msg_storage_t storage, const char *name)
+{
+ return xbt_dict_get_or_null(MSG_storage_get_properties(storage), name);
+}
+
+
/** \ingroup msg_storage_management
* \brief Finds a msg_storage_t using its name.
* \param name the name of a storage