Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix io-shared test, which was just a little bit too non deterministic.
authorAugustin Degomme <adegomme@gmail.com>
Fri, 6 Mar 2020 13:54:22 +0000 (14:54 +0100)
committerAugustin Degomme <adegomme@gmail.com>
Fri, 6 Mar 2020 13:54:22 +0000 (14:54 +0100)
Some pocesses could enter the seek_shared call before other entered the previous write_shared, changing the shared pointer value under their feet. Or not.

teshsuite/smpi/CMakeLists.txt
teshsuite/smpi/io-shared/io-shared.c
teshsuite/smpi/io-shared/io-shared.tesh

index f8e184e..411911d 100644 (file)
@@ -69,7 +69,7 @@ if(enable_smpi)
 
   foreach(x coll-allgather coll-allgatherv coll-allreduce coll-alltoall coll-alltoallv coll-barrier coll-bcast
             coll-gather coll-reduce coll-reduce-scatter coll-scatter macro-sample pt2pt-dsend pt2pt-pingpong
-           type-hvector type-indexed type-struct type-vector bug-17132 timers io-simple io-simple-at io-all io-all-at  io-ordered topo-cart-sub) #io-shared
+           type-hvector type-indexed type-struct type-vector bug-17132 timers io-simple io-simple-at io-all io-all-at io-shared io-ordered topo-cart-sub)
     ADD_TESH_FACTORIES(tesh-smpi-${x} "thread;ucontext;raw;boost" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/${x} ${x}.tesh)
   endforeach()
 
index e4b90d2..d3cb157 100644 (file)
@@ -46,9 +46,10 @@ int main( int argc, char *argv[] )
         fprintf( stderr, "Count not zero (%d) on write\n", count );fflush(stderr);
     }
 
+    MPI_Barrier(comm);
     MPI_File_seek_shared( fh, 0, MPI_SEEK_SET );
     MPI_Barrier(comm);
-    
+
     memset( &status, 0xff, sizeof(MPI_Status) );
     MPI_File_read_shared( fh, buf, 1, MPI_INT, &status );
     MPI_Get_count( &status, MPI_INT, &count );
index ad8c201..69f4894 100644 (file)
@@ -12,28 +12,29 @@ $ ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile_io -p
 > (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
 > (0@bob) Write in MPI_File /scratch/testfile, 4 bytes written, readsize 4 bytes, movesize 4
 > (0@bob) Position after write in MPI_File /scratch/testfile : 4
-> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
-> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
+> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 4
 > (2@bob) Write in MPI_File /scratch/testfile, 4 bytes written, readsize 4 bytes, movesize 4
-> (2@bob) Position after write in MPI_File /scratch/testfile : 4
-> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
-> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 0
+> (2@bob) Position after write in MPI_File /scratch/testfile : 8
+> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 8
 > (3@carl) Write in MPI_File /scratch/testfile, 4 bytes written, readsize 4 bytes, movesize 4
-> (3@carl) Position after write in MPI_File /scratch/testfile : 4
-> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 4
+> (3@carl) Position after write in MPI_File /scratch/testfile : 12
+> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 12
 > (1@carl) Write in MPI_File /scratch/testfile, 4 bytes written, readsize 4 bytes, movesize 4
-> (1@carl) Position after write in MPI_File /scratch/testfile : 8
+> (1@carl) Position after write in MPI_File /scratch/testfile : 16
+> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
+> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
 > (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 0
 > (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 0
 > (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0
 > (0@bob) Read in MPI_File /scratch/testfile, 4 bytes read, readsize 4 bytes, movesize 4
 > (0@bob) Position after read in MPI_File /scratch/testfile : 4
 > (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 4
-> (2@bob) Read in MPI_File /scratch/testfile, 0 bytes read, readsize 4 bytes, movesize 4
-> (2@bob) Position after read in MPI_File /scratch/testfile : 4
-> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 4
-> (3@carl) Read in MPI_File /scratch/testfile, 0 bytes read, readsize 4 bytes, movesize 4
-> (3@carl) Position after read in MPI_File /scratch/testfile : 4
-> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 4
+> (2@bob) Read in MPI_File /scratch/testfile, 4 bytes read, readsize 4 bytes, movesize 4
+> (2@bob) Position after read in MPI_File /scratch/testfile : 8
+> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 8
+> (3@carl) Read in MPI_File /scratch/testfile, 4 bytes read, readsize 4 bytes, movesize 4
+> (3@carl) Position after read in MPI_File /scratch/testfile : 12
+> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 12
 > (1@carl) Read in MPI_File /scratch/testfile, 4 bytes read, readsize 4 bytes, movesize 4
-> (1@carl) Position after read in MPI_File /scratch/testfile : 8
+> (1@carl) Position after read in MPI_File /scratch/testfile : 16
+