From: degomme Date: Fri, 19 Apr 2019 08:41:02 +0000 (+0200) Subject: fix issue seen on 34f5b82ed231ecce . X-Git-Tag: v3.22.2~80 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fa0fb4079f99cf9ceda4ea3537b05f0723e48d29 fix issue seen on 34f5b82ed231ecce . We were writing inside an existing file, reducing its size for the fs. And then used_size was becoming <0, which for an unsigned is quite large. This seems to point to another issue in storage, as used_size might not be initialized properly --- diff --git a/src/plugins/file_system/s4u_FileSystem.cpp b/src/plugins/file_system/s4u_FileSystem.cpp index f570a6dcbd..fab8c9528f 100644 --- a/src/plugins/file_system/s4u_FileSystem.cpp +++ b/src/plugins/file_system/s4u_FileSystem.cpp @@ -140,8 +140,8 @@ sg_size_t File::write(sg_size_t size) XBT_DEBUG("WRITE %s on disk '%s'. size '%llu/%llu' '%llu:%llu'", get_path(), local_storage_->get_cname(), size, size_, sg_storage_get_size_used(local_storage_), sg_storage_get_size(local_storage_)); // If the storage is full before even starting to write - // if (sg_storage_get_size_used(local_storage_) >= sg_storage_get_size(local_storage_)) - // return 0; + if (sg_storage_get_size_used(local_storage_) >= sg_storage_get_size(local_storage_)) + return 0; /* Substract the part of the file that might disappear from the used sized on the storage element */ local_storage_->extension()->decr_used_size(size_ - current_position_); diff --git a/teshsuite/smpi/io-all/io-all.c b/teshsuite/smpi/io-all/io-all.c index 397e875498..72468b16b1 100644 --- a/teshsuite/smpi/io-all/io-all.c +++ b/teshsuite/smpi/io-all/io-all.c @@ -21,7 +21,7 @@ int main( int argc, char *argv[] ) MPI_Init( &argc, &argv ); comm = MPI_COMM_WORLD; - MPI_File_open( comm, (char*)"/scratch/lib/libsimgrid.so.3.6.2", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); + MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( 10 * sizeof(int) ); @@ -75,4 +75,4 @@ int main( int argc, char *argv[] ) MPI_Finalize(); return errs; -} \ No newline at end of file +} diff --git a/teshsuite/smpi/io-all/io-all.tesh b/teshsuite/smpi/io-all/io-all.tesh index 423412c05b..1e90e16834 100644 --- a/teshsuite/smpi/io-all/io-all.tesh +++ b/teshsuite/smpi/io-all/io-all.tesh @@ -6,47 +6,47 @@ $ ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile_io -p > [rank 1] -> carl > [rank 2] -> bob > [rank 3] -> carl -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 8 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 12 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 4 -> (3@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (3@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 16 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 12 -> (1@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (1@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 8 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 4 -> (2@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (2@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 12 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 8 -> (0@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (0@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 4 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 39 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 26 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 13 -> (3@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 12 bytes written, readsize 12 bytes, movesize 12 -> (3@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 51 -> (1@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 12 bytes written, readsize 12 bytes, movesize 12 -> (1@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 25 -> (0@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 12 bytes written, readsize 12 bytes, movesize 12 -> (0@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 12 -> (2@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 12 bytes written, readsize 12 bytes, movesize 12 -> (2@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 38 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 8 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 12 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 4 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 26 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 39 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 13 -> (3@carl) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 12 bytes read, readsize 12 bytes, movesize 12 -> (3@carl) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 51 -> (1@carl) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 12 bytes read, readsize 12 bytes, movesize 12 -> (1@carl) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 25 -> (2@bob) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 12 bytes read, readsize 12 bytes, movesize 12 -> (2@bob) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 38 -> (0@bob) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 12 bytes read, readsize 12 bytes, movesize 12 -> (0@bob) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 12 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 8 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 12 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 4 +> (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 : 16 +> (3@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) 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 : 12 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 8 +> (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 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 39 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 26 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 13 +> (3@carl) Write in MPI_File /scratch/testfile, 12 bytes written, readsize 12 bytes, movesize 12 +> (3@carl) Position after write in MPI_File /scratch/testfile : 51 +> (1@carl) Write in MPI_File /scratch/testfile, 12 bytes written, readsize 12 bytes, movesize 12 +> (1@carl) Position after write in MPI_File /scratch/testfile : 25 +> (0@bob) Write in MPI_File /scratch/testfile, 12 bytes written, readsize 12 bytes, movesize 12 +> (0@bob) Position after write in MPI_File /scratch/testfile : 12 +> (2@bob) Write in MPI_File /scratch/testfile, 12 bytes written, readsize 12 bytes, movesize 12 +> (2@bob) Position after write in MPI_File /scratch/testfile : 38 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 8 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 12 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 4 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 26 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 39 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 13 +> (3@carl) Read in MPI_File /scratch/testfile, 12 bytes read, readsize 12 bytes, movesize 12 +> (3@carl) Position after read in MPI_File /scratch/testfile : 51 +> (1@carl) Read in MPI_File /scratch/testfile, 12 bytes read, readsize 12 bytes, movesize 12 +> (1@carl) Position after read in MPI_File /scratch/testfile : 25 +> (2@bob) Read in MPI_File /scratch/testfile, 12 bytes read, readsize 12 bytes, movesize 12 +> (2@bob) Position after read in MPI_File /scratch/testfile : 38 +> (0@bob) Read in MPI_File /scratch/testfile, 12 bytes read, readsize 12 bytes, movesize 12 +> (0@bob) Position after read in MPI_File /scratch/testfile : 12 diff --git a/teshsuite/smpi/io-ordered/io-ordered.c b/teshsuite/smpi/io-ordered/io-ordered.c index c2117e5943..c34409adbe 100644 --- a/teshsuite/smpi/io-ordered/io-ordered.c +++ b/teshsuite/smpi/io-ordered/io-ordered.c @@ -21,7 +21,7 @@ int main( int argc, char *argv[] ) MPI_Init( &argc, &argv ); comm = MPI_COMM_WORLD; - MPI_File_open( comm, (char*)"/scratch/lib/libsimgrid.so.3.6.2", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); + MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( 10* sizeof(int) ); @@ -47,4 +47,4 @@ int main( int argc, char *argv[] ) MPI_Finalize(); return errs; -} \ No newline at end of file +} diff --git a/teshsuite/smpi/io-ordered/io-ordered.tesh b/teshsuite/smpi/io-ordered/io-ordered.tesh index bf6775c301..db525341e0 100644 --- a/teshsuite/smpi/io-ordered/io-ordered.tesh +++ b/teshsuite/smpi/io-ordered/io-ordered.tesh @@ -6,35 +6,35 @@ $ ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile_io -p > [rank 1] -> carl > [rank 2] -> bob > [rank 3] -> carl -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 80 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 40 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 120 -> (3@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 40 bytes written, readsize 40 bytes, movesize 40 -> (3@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 160 -> (1@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 40 bytes written, readsize 40 bytes, movesize 40 -> (1@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 80 -> (2@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 40 bytes written, readsize 40 bytes, movesize 40 -> (2@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 120 -> (0@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 40 bytes written, readsize 40 bytes, movesize 40 -> (0@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 40 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 80 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 40 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 120 -> (3@carl) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 40 bytes read, readsize 40 bytes, movesize 40 -> (3@carl) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 160 -> (1@carl) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 40 bytes read, readsize 40 bytes, movesize 40 -> (1@carl) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 80 -> (2@bob) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 40 bytes read, readsize 40 bytes, movesize 40 -> (2@bob) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 120 -> (0@bob) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 40 bytes read, readsize 40 bytes, movesize 40 -> (0@bob) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 40 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 80 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 40 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 120 +> (3@carl) Write in MPI_File /scratch/testfile, 40 bytes written, readsize 40 bytes, movesize 40 +> (3@carl) Position after write in MPI_File /scratch/testfile : 160 +> (1@carl) Write in MPI_File /scratch/testfile, 40 bytes written, readsize 40 bytes, movesize 40 +> (1@carl) Position after write in MPI_File /scratch/testfile : 80 +> (2@bob) Write in MPI_File /scratch/testfile, 40 bytes written, readsize 40 bytes, movesize 40 +> (2@bob) Position after write in MPI_File /scratch/testfile : 120 +> (0@bob) Write in MPI_File /scratch/testfile, 40 bytes written, readsize 40 bytes, movesize 40 +> (0@bob) Position after write in MPI_File /scratch/testfile : 40 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (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 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 80 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 40 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 120 +> (3@carl) Read in MPI_File /scratch/testfile, 40 bytes read, readsize 40 bytes, movesize 40 +> (3@carl) Position after read in MPI_File /scratch/testfile : 160 +> (1@carl) Read in MPI_File /scratch/testfile, 40 bytes read, readsize 40 bytes, movesize 40 +> (1@carl) Position after read in MPI_File /scratch/testfile : 80 +> (2@bob) Read in MPI_File /scratch/testfile, 40 bytes read, readsize 40 bytes, movesize 40 +> (2@bob) Position after read in MPI_File /scratch/testfile : 120 +> (0@bob) Read in MPI_File /scratch/testfile, 40 bytes read, readsize 40 bytes, movesize 40 +> (0@bob) Position after read in MPI_File /scratch/testfile : 40 +> (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 diff --git a/teshsuite/smpi/io-simple-at/io-simple-at.c b/teshsuite/smpi/io-simple-at/io-simple-at.c index fc084edda8..9ad28f14a5 100644 --- a/teshsuite/smpi/io-simple-at/io-simple-at.c +++ b/teshsuite/smpi/io-simple-at/io-simple-at.c @@ -21,7 +21,7 @@ int main( int argc, char *argv[] ) MPI_Init( &argc, &argv ); comm = MPI_COMM_WORLD; - MPI_File_open( comm, (char*)"/scratch/lib/libsimgrid.so.3.6.2", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); + MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( size * sizeof(int) ); @@ -66,4 +66,4 @@ int main( int argc, char *argv[] ) MPI_Finalize(); return errs; -} \ No newline at end of file +} diff --git a/teshsuite/smpi/io-simple-at/io-simple-at.tesh b/teshsuite/smpi/io-simple-at/io-simple-at.tesh index 6ac902fee6..5f6e87dc8e 100644 --- a/teshsuite/smpi/io-simple-at/io-simple-at.tesh +++ b/teshsuite/smpi/io-simple-at/io-simple-at.tesh @@ -6,27 +6,27 @@ $ ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile_io -p > [rank 1] -> carl > [rank 2] -> bob > [rank 3] -> carl -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 8 -> (0@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (0@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 4 -> (2@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (2@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 12 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 12 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 4 -> (3@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (3@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 16 -> (1@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (1@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 8 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 8 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 12 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 4 -> (3@carl) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes read, readsize 4 bytes, movesize 4 -> (3@carl) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 16 -> (1@carl) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes read, readsize 4 bytes, movesize 4 -> (1@carl) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 8 -> (0@bob) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes read, readsize 4 bytes, movesize 4 -> (0@bob) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 4 -> (2@bob) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes read, readsize 4 bytes, movesize 4 -> (2@bob) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 12 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 8 +> (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 +> (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 : 12 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 12 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 4 +> (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 : 16 +> (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 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 8 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 12 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 4 +> (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 : 16 +> (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 +> (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) Read in MPI_File /scratch/testfile, 4 bytes read, readsize 4 bytes, movesize 4 +> (2@bob) Position after read in MPI_File /scratch/testfile : 12 diff --git a/teshsuite/smpi/io-simple/io-simple.c b/teshsuite/smpi/io-simple/io-simple.c index c0ede9e2ec..f4563c35ab 100644 --- a/teshsuite/smpi/io-simple/io-simple.c +++ b/teshsuite/smpi/io-simple/io-simple.c @@ -21,7 +21,7 @@ int main( int argc, char *argv[] ) MPI_Init( &argc, &argv ); comm = MPI_COMM_WORLD; - MPI_File_open( comm, (char*)"/scratch/lib/libsimgrid.so.3.6.2", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); + MPI_File_open( comm, (char*)"/scratch/testfile", MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, &fh ); MPI_Comm_size( comm, &size ); MPI_Comm_rank( comm, &rank ); buf = (int *)malloc( size * sizeof(int) ); @@ -68,4 +68,4 @@ int main( int argc, char *argv[] ) MPI_Finalize(); return errs; -} \ No newline at end of file +} diff --git a/teshsuite/smpi/io-simple/io-simple.tesh b/teshsuite/smpi/io-simple/io-simple.tesh index 40f7852c7f..2bb859882b 100644 --- a/teshsuite/smpi/io-simple/io-simple.tesh +++ b/teshsuite/smpi/io-simple/io-simple.tesh @@ -6,27 +6,27 @@ $ ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile_io -p > [rank 1] -> carl > [rank 2] -> bob > [rank 3] -> carl -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 8 -> (0@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (0@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 4 -> (2@bob) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (2@bob) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 12 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 12 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 4 -> (3@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (3@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 16 -> (1@carl) Write in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes written, readsize 4 bytes, movesize 4 -> (1@carl) Position after write in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 8 -> (0@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 0 -> (2@bob) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 8 -> (3@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 12 -> (1@carl) Seeking in MPI_File /scratch/lib/libsimgrid.so.3.6.2, setting offset 4 -> (3@carl) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes read, readsize 4 bytes, movesize 4 -> (3@carl) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 16 -> (1@carl) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes read, readsize 4 bytes, movesize 4 -> (1@carl) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 8 -> (0@bob) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes read, readsize 4 bytes, movesize 4 -> (0@bob) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 4 -> (2@bob) Read in MPI_File /scratch/lib/libsimgrid.so.3.6.2, 4 bytes read, readsize 4 bytes, movesize 4 -> (2@bob) Position after read in MPI_File /scratch/lib/libsimgrid.so.3.6.2 : 12 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 8 +> (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 +> (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 : 12 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 12 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 4 +> (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 : 16 +> (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 +> (0@bob) Seeking in MPI_File /scratch/testfile, setting offset 0 +> (2@bob) Seeking in MPI_File /scratch/testfile, setting offset 8 +> (3@carl) Seeking in MPI_File /scratch/testfile, setting offset 12 +> (1@carl) Seeking in MPI_File /scratch/testfile, setting offset 4 +> (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 : 16 +> (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 +> (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) Read in MPI_File /scratch/testfile, 4 bytes read, readsize 4 bytes, movesize 4 +> (2@bob) Position after read in MPI_File /scratch/testfile : 12