Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fixing a possible bug, I should use parse_double() instead of atoi() if I want to...
authorGeorge Markomanolis <george@markomanolis.com>
Fri, 8 Feb 2013 12:02:24 +0000 (14:02 +0200)
committerGeorge Markomanolis <george@markomanolis.com>
Fri, 8 Feb 2013 12:02:24 +0000 (14:02 +0200)
examples/smpi/replay/actions_alltoall.txt [new file with mode: 0644]
examples/smpi/replay/actions_alltoallv.txt [new file with mode: 0644]
examples/smpi/replay/actions_bcast_reduce_datatypes.txt [new file with mode: 0644]
examples/smpi/replay/actions_waitall.txt [new file with mode: 0644]
src/smpi/smpi_replay.c

diff --git a/examples/smpi/replay/actions_alltoall.txt b/examples/smpi/replay/actions_alltoall.txt
new file mode 100644 (file)
index 0000000..7660765
--- /dev/null
@@ -0,0 +1,12 @@
+0 init
+1 init
+2 init
+
+0 allToAll 500 500
+1 allToAll 500 500
+2 allToAll 500 500
+
+
+0 finalize
+1 finalize
+2 finalize
diff --git a/examples/smpi/replay/actions_alltoallv.txt b/examples/smpi/replay/actions_alltoallv.txt
new file mode 100644 (file)
index 0000000..cd4f95c
--- /dev/null
@@ -0,0 +1,12 @@
+0 init
+1 init
+2 init
+
+0 allToAllV 100 1 40 30 1 20 150 1000 1 80 100 1 20 110
+1 allToAllV 1000 80 1 40 1 100 160 1000 40 1 30 10 70 140
+2 allToAllV 1000 100 30 1 1 120 150 1000 30 40 1 1 50 60
+
+
+0 finalize
+1 finalize
+2 finalize
diff --git a/examples/smpi/replay/actions_bcast_reduce_datatypes.txt b/examples/smpi/replay/actions_bcast_reduce_datatypes.txt
new file mode 100644 (file)
index 0000000..69545b7
--- /dev/null
@@ -0,0 +1,27 @@
+0 init 1
+1 init 1
+2 init 1
+
+0 bcast 5e8 1 0
+1 bcast 5e8 1 0
+2 bcast 5e8 1 0
+
+0 compute 5e8
+1 compute 2e8
+2 compute 5e8
+
+0 bcast 5e8 0 3
+1 bcast 5e8 0 3
+2 bcast 5e8 0 3
+
+0 compute 5e8
+1 compute 2e8
+2 compute 5e8
+
+0 reduce 5e8 5e8 0 4
+1 reduce 5e8 5e8 0 4
+2 reduce 5e8 5e8 0 4
+
+0 finalize
+1 finalize
+2 finalize
diff --git a/examples/smpi/replay/actions_waitall.txt b/examples/smpi/replay/actions_waitall.txt
new file mode 100644 (file)
index 0000000..d7e3799
--- /dev/null
@@ -0,0 +1,19 @@
+0 init
+1 init
+2 init
+
+0 Irecv 1 2000
+1 Isend 0 2000
+2 Irecv 1 3000
+
+0 Irecv 2 3000
+1 Isend 2 3000
+2 Isend 0 3000
+
+0 waitAll
+1 waitAll
+2 waitAll
+
+0 finalize
+1 finalize
+2 finalize
index 23c57ce..d7990bf 100644 (file)
@@ -487,8 +487,8 @@ static void action_allReduce(const char *const *action) {
 static void action_allToAll(const char *const *action) {
   double clock = smpi_process_simulated_elapsed();
   int comm_size = smpi_comm_size(MPI_COMM_WORLD);
-  int send_size = atoi(action[2]);
-  int recv_size = atoi(action[3]);
+  int send_size = parse_double(action[2]);
+  int recv_size = parse_double(action[3]);
   void *send = xbt_new0(int, send_size*comm_size);  
   void *recv = xbt_new0(int, send_size*comm_size);
   
@@ -505,8 +505,7 @@ static void action_allToAll(const char *const *action) {
     smpi_coll_tuned_alltoall_bruck(send, send_size, MPI_CURRENT_TYPE,
                                    recv, recv_size, MPI_CURRENT_TYPE,
                                    MPI_COMM_WORLD);
-  } else if (send_size < 3000) {
-  
+  } else if (send_size < 3000) {  
     smpi_coll_tuned_alltoall_basic_linear(send, send_size, MPI_CURRENT_TYPE,
                                           recv, recv_size, MPI_CURRENT_TYPE,
                                           MPI_COMM_WORLD);
@@ -552,8 +551,8 @@ static void action_allToAllv(const char *const *action) {
   int *senddisps = xbt_new0(int, comm_size);  
   int *recvdisps = xbt_new0(int, comm_size);  
   
-  send_buf_size=atoi(action[2]);
-  recv_buf_size=atoi(action[3+2*comm_size]);
+  send_buf_size=parse_double(action[2]);
+  recv_buf_size=parse_double(action[3+2*comm_size]);
 
   int *sendbuf = xbt_new0(int, send_buf_size);  
   int *recvbuf = xbt_new0(int, recv_buf_size);