Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar a tiny bit
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 2 Jun 2017 08:15:25 +0000 (10:15 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 2 Jun 2017 08:56:58 +0000 (10:56 +0200)
examples/msg/mc/electric_fence.c
examples/smpi/mc/bugged1.c

index 7d32c04..b8b2c53 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2013-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2013-2017. 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. */
@@ -21,7 +20,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(electric_fence, "Example to check the soundness of
 
 static int server(int argc, char *argv[])
 {
-  msg_task_t task1 = NULL, task2 = NULL;
+  msg_task_t task1 = NULL;
+  msg_task_t task2 = NULL;
 
   msg_comm_t comm_received1 = MSG_task_irecv(&task1, "mymailbox");
   msg_comm_t comm_received2 = MSG_task_irecv(&task2, "mymailbox");
index 3d2e0e9..5b5e03e 100644 (file)
@@ -1,7 +1,6 @@
 /* A simple bugged MPI_ISend and MPI_IRecv test */
 
-/* Copyright (c) 2009, 2011, 2013-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2009-2017. 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. */
 
 int main(int argc, char **argv)
 {
-  int recv_buff, err, size, rank;
+  int size;
+  int rank;
   MPI_Status status;
 
   /* Initialize MPI */
-  err = MPI_Init(&argc, &argv);
+  int err = MPI_Init(&argc, &argv);
   if (err != MPI_SUCCESS) {
     printf("MPI initialization failed!\n");
     exit(1);
@@ -33,6 +33,7 @@ int main(int argc, char **argv)
   if (rank == 0) {
     printf("MPI_ISend / MPI_IRecv Test \n");
 
+    int recv_buff;
     for (int i = 0; i < size - 1; i++) {
       MPI_Recv(&recv_buff, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
       printf("Message received from %d\n", recv_buff);