Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cleanup.
authorpini <pini@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Mar 2010 09:56:12 +0000 (09:56 +0000)
committerpini <pini@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Mar 2010 09:56:12 +0000 (09:56 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7363 48e7efb5-ca39-0410-a469-dd3cf9ba447f

13 files changed:
examples/smpi/allreduce.c
examples/smpi/alltoall2.c
examples/smpi/alltoall_basic.c
examples/smpi/alltoallv.c
examples/smpi/bcbench.c
examples/smpi/mvmul.c
examples/smpi/pingpong.c
examples/smpi/reduce.c
examples/smpi/ring_c.c
examples/smpi/scatter.c
examples/smpi/second.c
examples/smpi/sendrecv.c
examples/smpi/split.c

index eddb725..83e6b10 100644 (file)
@@ -29,7 +29,7 @@ static int ibm_test(int rank, int size)
          int success = 1;
 #define MAXLEN  10000
 
-         int root, i, j, k;
+         int root = 0, i, j, k;
          int out[MAXLEN];
          int in[MAXLEN];
 
index 0b1c918..a46f765 100644 (file)
@@ -79,4 +79,5 @@ int main( int argc, char *argv[] )
    MPI_Barrier(MPI_COMM_WORLD);
    if(myself==0)  printf("TEST COMPLETE\n");
    MPI_Finalize();
+   return EXIT_SUCCESS;
 }
index 12bc44d..2cb6f7d 100644 (file)
@@ -15,7 +15,7 @@ int main( int argc, char *argv[] )
     int i;
     int *sb;
     int *rb;
-    int status, gstatus;
+    int status;
 
     MPI_Init(&argc,&argv);
     MPI_Comm_rank(MPI_COMM_WORLD,&rank);
@@ -45,8 +45,8 @@ int main( int argc, char *argv[] )
 
 
     if (rank == 0) {
-        if (gstatus != 0) {
-            printf("all_to_all returned %d\n",gstatus);fflush(stdout);
+        if (status != 0) {
+            printf("all_to_all returned %d\n",status);fflush(stdout);
         }
     }
     free(sb);
index 73b6d24..5c3857c 100644 (file)
@@ -50,7 +50,7 @@
 */
 
 
-void print_buffer_int(void *buf, int len, char *msg, int rank)
+static void print_buffer_int(void *buf, int len, char *msg, int rank)
 {
   int tmp, *v;
   printf("**<%d> %s (#%d): ", rank, msg,len);
index 214f88b..b3b6a7b 100644 (file)
@@ -15,10 +15,10 @@ int main(int argc, char *argv[])
 {
 
   int size, rank;
-  int N, I;
+  int N;
   struct timeval *start_time, *stop_time;
   double seconds;
-  int i, j, k;
+  int i, j;
   char *buffer;
   int check;
 
index 8706b84..dbaceb8 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <ctype.h>
 #include <mpi.h>
 
 #define ITERATIONS         10
index 092423b..636c985 100644 (file)
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <mpi.h>
 
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
          const int tag1 = 42, tag2= 43;           /* Message tag */
          int rank; 
index 25ae108..85bfa1e 100644 (file)
@@ -24,7 +24,7 @@
  * ENHANCEMENTS, OR MODIFICATIONS.
  * ***************************************************************************
  **/
-int ibm_test(int rank, int size)
+static int ibm_test(int rank, int size)
 {
   int success = 1;
 #define MAXLEN  10000
index 773d74e..1d91408 100644 (file)
@@ -8,7 +8,8 @@
  */
 
 #include <stdio.h>
-#include "mpi.h"
+#include <unistd.h>
+#include <mpi.h>
 
 int main(int argc, char *argv[])
 {
index 2f68c91..8833cea 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <mpi.h>
 
-int ibm_test(int rank, int size)  {
+static int ibm_test(int rank, int size)  {
 
 #define MAXLEN  10000
 
@@ -62,7 +62,7 @@ int ibm_test(int rank, int size)  {
 /**
  * small test: the root sends a single distinct double to other processes
  **/
-int small_test( int rank, int size ) {
+static int small_test( int rank, int size ) {
         int success=1;
         int retval;
         int sendcount=1; // one double to each process
index 2c80d60..e34a212 100644 (file)
 /* your hostfile, do 'mpirun -machinefile hostfile -np 4 first    */
 
 #include <stdio.h>
+#include <unistd.h>
 #include <mpi.h>
 
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
   const int tag = 42;           /* Message tag */
   int id, ntasks, source_id, dest_id, err, i;
index da30874..3f3aeee 100644 (file)
@@ -1,7 +1,7 @@
 #include "mpi.h"
 #include <stdio.h>
 
-int test(int myid, int numprocs) {
+static int test(int myid, int numprocs) {
 // The tags should match on the sender and receiver side.
 // The distinction between sendtag and recvtag is mainly
 // useful to make some other Recv or Send calls match the sendrecv. 
@@ -13,7 +13,6 @@ int test(int myid, int numprocs) {
     int left, right;
     int buffer[BUFLEN], buffer2[BUFLEN];
     int i;
-    MPI_Request request;
     MPI_Status status;
 
     for (i=0;i<BUFLEN;i++) {
index a87a4e1..bf4d3df 100644 (file)
@@ -3,8 +3,9 @@
 
 int main(int argc, char *argv[])
 {
-  int worldrank, localrank;
-  MPI_Comm localcomm;
+  int worldrank;
+//  int localrank;
+//  MPI_Comm localcomm;
   MPI_Init(&argc, &argv);
   MPI_Comm_rank(MPI_COMM_WORLD, &worldrank);
   printf("MPI_Comm_split is not implemented\n");