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
partially revert modifications
[simgrid.git]
/
examples
/
msg
/
pmm
/
msg_pmm.c
diff --git
a/examples/msg/pmm/msg_pmm.c
b/examples/msg/pmm/msg_pmm.c
index
ee45fec
..
530b15d
100644
(file)
--- a/
examples/msg/pmm/msg_pmm.c
+++ b/
examples/msg/pmm/msg_pmm.c
@@
-1,11
+1,12
@@
/* pmm - parallel matrix multiplication "double diffusion" */
/* pmm - parallel matrix multiplication "double diffusion" */
-/* Copyright (c) 2006
, 2007, 2008, 2009, 2010, 2011
. The SimGrid Team.
+/* Copyright (c) 2006
-2015
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "msg/msg.h"
+
+#include "simgrid/msg.h"
#include "xbt/matrix.h"
#include "xbt/log.h"
#include "xbt/matrix.h"
#include "xbt/log.h"
@@
-28,7
+29,7
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_pmm,
/* This example should always be executed using a deployment of
* GRID_SIZE * GRID_SIZE nodes. */
#define GRID_SIZE 3 /* Modify to adjust the grid's size */
/* This example should always be executed using a deployment of
* GRID_SIZE * GRID_SIZE nodes. */
#define GRID_SIZE 3 /* Modify to adjust the grid's size */
-#define NODE_MATRIX_SIZE 300 /* Am
m
ount of work done by each node*/
+#define NODE_MATRIX_SIZE 300 /* Amount of work done by each node*/
#define GRID_NUM_NODES GRID_SIZE * GRID_SIZE
#define MATRIX_SIZE NODE_MATRIX_SIZE * GRID_SIZE
#define GRID_NUM_NODES GRID_SIZE * GRID_SIZE
#define MATRIX_SIZE NODE_MATRIX_SIZE * GRID_SIZE
@@
-216,8
+217,8
@@
static node_job_t wait_job(int selfid)
msg_error_t err;
snprintf(self_mbox, MAILBOX_NAME_SIZE - 1, "%d", selfid);
err = MSG_task_receive(&task, self_mbox);
msg_error_t err;
snprintf(self_mbox, MAILBOX_NAME_SIZE - 1, "%d", selfid);
err = MSG_task_receive(&task, self_mbox);
- if (err != MSG_OK)
-
xbt_die("Error while receiving from %s (%d)",
self_mbox, (int)err);
+ xbt_assert(err == MSG_OK, "Error while receiving from %s (%d)",
+
self_mbox, (int)err);
job = (node_job_t)MSG_task_get_data(task);
MSG_task_destroy(task);
XBT_VERB("Got Job (%d,%d)", job->row, job->col);
job = (node_job_t)MSG_task_get_data(task);
MSG_task_destroy(task);
XBT_VERB("Got Job (%d,%d)", job->row, job->col);
@@
-294,10
+295,7
@@
int main(int argc, char *argv[])
#endif
XBT_CRITICAL("Simulated time: %g", MSG_get_clock());
#endif
XBT_CRITICAL("Simulated time: %g", MSG_get_clock());
- if (res == MSG_OK)
- return 0;
- else
- return 1;
+ return res != MSG_OK;
}
static void create_jobs(xbt_matrix_t A, xbt_matrix_t B, node_job_t *jobs)
}
static void create_jobs(xbt_matrix_t A, xbt_matrix_t B, node_job_t *jobs)