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
Fix compilation warning.
[simgrid.git]
/
src
/
msg
/
task.c
diff --git
a/src/msg/task.c
b/src/msg/task.c
index
38a1b8f
..
73476e8
100644
(file)
--- a/
src/msg/task.c
+++ b/
src/msg/task.c
@@
-266,14
+266,23
@@
double MSG_task_get_remaining_computation(m_task_t task)
/** \ingroup m_task_management
* \brief Returns the total amount received by a task #m_task_t.
/** \ingroup m_task_management
* \brief Returns the total amount received by a task #m_task_t.
- *
+ * If the communication does not exist it will return 0.
+ * So, if the communication has FINISHED or FAILED it returns
+ * zero.
*/
double MSG_task_get_remaining_communication(m_task_t task)
{
xbt_assert0((task != NULL)
&& (task->simdata != NULL), "Invalid parameter");
*/
double MSG_task_get_remaining_communication(m_task_t task)
{
xbt_assert0((task != NULL)
&& (task->simdata != NULL), "Invalid parameter");
- DEBUG1("calling SIMIX_communication_get_remains(%p)",
- task->simdata->comm);
+
+ if(!task->simdata->comm){
+ DEBUG0("you are trying to retrive remaining information on a NULL action, assuming it is zero");
+ return 0;
+ }else{
+ DEBUG1("calling SIMIX_communication_get_remains(%p)",
+ task->simdata->comm);
+ }
+
return SIMIX_communication_get_remains(task->simdata->comm);
}
return SIMIX_communication_get_remains(task->simdata->comm);
}