Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make write verification work even without read test #89

Merged
merged 1 commit into from
Oct 6, 2018

Conversation

jyvet
Copy link
Contributor

@jyvet jyvet commented Sep 20, 2018

Context: IOR outputs errors when the '-w -W' flags are used
without '-r'. Write a file using with check write option
should be possible even without setting read.

This patch fixes a condition which was introduced for
HDFS to remove RDWR flag in some particular cases.
Write check was set with the write only flag but it
requieres the read flag.

Context: IOR outputs errors when the '-w -W' flags are used
without '-r'. Write a file using with check write option
should be possible even without setting read.

This patch fixes a condition which was introduced for
HDFS to remove RDWR flag in some particular cases.
Write check was set with the write only flag but it
requieres the read flag.
@glennklockwood glennklockwood self-assigned this Sep 21, 2018
@glennklockwood
Copy link
Contributor

Can you provide an example input that triggers the bug that this is fixing? I am not getting errors when I naively try to reproduce the issue:

$ ./test/_inst/bin/ior -w -W
IOR-3.2.0: MPI Coordinated Test of Parallel I/O
Began               : Fri Sep 21 18:05:40 2018
Command line        : ./test/_inst/bin/ior -w -W
Machine             : Darwin ...
TestID              : 0
StartTime           : Fri Sep 21 18:05:40 2018
Path                : ...
FS                  : 931.5 GiB   Used FS: 14.4%   Inodes: 8796093022208.0 Mi   Used Inodes: 0.0%

Options: 
api                 : POSIX
apiVersion          : 
test filename       : testFile
access              : single-shared-file
type                : independent
segments            : 1
ordering in a file  : sequential
ordering inter file : no tasks offsets
tasks               : 1
clients per node    : 1
repetitions         : 1
xfersize            : 262144 bytes
blocksize           : 1 MiB
aggregate filesize  : 1 MiB

Results: 

access    bw(MiB/s)  block(KiB) xfer(KiB)  open(s)    wr/rd(s)   close(s)   total(s)   iter
------    ---------  ---------- ---------  --------   --------   --------   --------   ----
write     2457.12    1024.00    256.00     0.000059   0.000255   0.000093   0.000407   0   
remove    -          -          -          -          -          -          0.000127   0   
Max Write: 2457.12 MiB/sec (2576.48 MB/sec)

Summary of all tests:
Operation   Max(MiB)   Min(MiB)  Mean(MiB)     StdDev   Max(OPs)   Min(OPs)  Mean(OPs)     StdDev    Mean(s) Test# #Tasks tPN reps fPP reord reordoff reordrand seed segcnt   blksiz    xsize aggs(MiB)   API RefNum
write        2457.12    2457.12    2457.12       0.00    9828.48    9828.48    9828.48       0.00    0.00041     0      1   1    1   0     0        1         0    0      1  1048576   262144       1.0 POSIX      0
Finished            : Fri Sep 21 18:05:40 2018

Granted, there's no obvious sign that the write check actually worked.

@jyvet
Copy link
Contributor Author

jyvet commented Sep 22, 2018

ah yeah sorry I should have provided more info (I thought the issue was for all backends). At least for POSIX, the open flag seems to be applied less striclty. With MPIIO (and IME) backends we get this:

./ior -vvv -a MPIIO -W -w -s 10 -t 1M -b 1M 
...
access    bw(MiB/s)  block(KiB) xfer(KiB)  open(s)    wr/rd(s)   close(s)   total(s)   iter
------    ---------  ---------- ---------  --------   --------   --------   --------   ----
Commencing write performance test: Sat Sep 22 15:04:38 2018
write     401.18     1024.00    1024.00    0.011977   0.010356   0.002564   0.024927   0   
Verifying contents of the file(s) just written.
Sat Sep 22 15:04:38 2018

ior ERROR: cannot access explicit, noncollective, MPI Access denied to file, error stack:
MPI_FILE_READ_AT(118): Cannot read from a file opened with amode MPI_MODE_WRONLY, (aiori-MPIIO.c:371)
[unset]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0

But, no error is displayed if the -r flag is used

./ior -vvv -a MPIIO -W -w -r -s 10 -t 1M -b 1M 
...
access    bw(MiB/s)  block(KiB) xfer(KiB)  open(s)    wr/rd(s)   close(s)   total(s)   iter
------    ---------  ---------- ---------  --------   --------   --------   --------   ----
Commencing write performance test: Sat Sep 22 15:06:14 2018
write     711.04     1024.00    1024.00    0.001194   0.010319   0.002521   0.014064   0   
Verifying contents of the file(s) just written.
Sat Sep 22 15:06:14 2018

Commencing read performance test: Sat Sep 22 15:06:14 2018
read      874.03     1024.00    1024.00    0.000303   0.010546   0.000562   0.011441   0   
remove    -          -          -          -          -          -          0.000502   0   
Max Write: 711.04 MiB/sec (745.58 MB/sec)
Max Read:  874.03 MiB/sec (916.49 MB/sec)

with this patch:

./ior -vvv -a MPIIO -W -w  -s 10 -t 1M -b 1M 
...
access    bw(MiB/s)  block(KiB) xfer(KiB)  open(s)    wr/rd(s)   close(s)   total(s)   iter
------    ---------  ---------- ---------  --------   --------   --------   --------   ----
Commencing write performance test: Sat Sep 22 15:08:05 2018
write     681.58     1024.00    1024.00    0.001836   0.010288   0.002518   0.014672   0   
Verifying contents of the file(s) just written.
Sat Sep 22 15:08:05 2018

remove    -          -          -          -          -          -          0.000662   0   
Max Write: 681.58 MiB/sec (714.69 MB/sec)

Summary of all tests:
Operation   Max(MiB)   Min(MiB)  Mean(MiB)     StdDev   Max(OPs)   Min(OPs)  Mean(OPs)     StdDev    Mean(s) Test# #Tasks tPN reps fPP reord reordoff reordrand seed segcnt   blksiz    xsize aggs(MiB)   API RefNum
write         681.58     681.58     681.58       0.00     681.58     681.58     681.58       0.00    0.01467     0      1   1    1   0     0        1         0    0     10  1048576  1048576      10.0 MPIIO      0
Finished            : Sat Sep 22 15:08:05 2018

@glennklockwood glennklockwood merged commit 9f56d8b into hpc:master Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants