mpich icon indicating copy to clipboard operation
mpich copied to clipboard

Incorrect test for default_striping_factor

Open mpichbot opened this issue 9 years ago • 4 comments

Originally by [email protected] on 2011-04-19 08:19:25 -0500


When the current ~mpich2-1.3.2p1/src/mpi/romio/test/file_info.c is run and the inquiry for the default_striping_factor returns a value of 2, an error message will always be printed about a striping_factor having an incorrect value. Just plug '2' into the equations to see that this is the case. The mod proposed below corrects this problem and is probably the code that was intended to be run. A couple of comments are also repaired or enhanced as well.

wilber~/MPICH2/functional/runrt/romio_io> diff file_info.1.3.2p1.mod.c file_info.1.3.2p1.orig.c
28c28
<  * error, default will be to increment error count for true error conditions

---
>  * error, default will be to increment errror cound for true error conditions
202c202
<    on Lustre, Intel PFS and IBM PIOFS file systems and are ignored elsewhere. 

---
>    on Intel PFS and IBM PIOFS file systems and are ignored elsewhere. 
253,256c253,255
<           if (default_striping_factor - 1 > 0) {
<                       if (atoi(value) != default_striping_factor-1) {
<                   errs++;
<                   if (verbose) fprintf(stderr, "striping_factor is %d; should be %d\n",

---
>           if ((default_striping_factor - 1 > 0) && (atoi(value) != default_striping_factor-1)) {
>               errs++;
>               if (verbose) fprintf(stderr, "striping_factor is %d; should be %d\n",
258d256
<               }
260,263c258,260
<             else {
<               if (atoi(value) != default_striping_factor) {
<                   errs++;
<                   if (verbose) fprintf(stderr, "striping_factor IS %d; should be %d\n",

---
>           else if (atoi(value) != default_striping_factor) {
>               errs++;
>               if (verbose) fprintf(stderr, "striping_factor is %d; should be %d\n",
265d261
<               }

mpichbot avatar Oct 14 '16 17:10 mpichbot

Originally by [email protected] on 2011-04-19 08:23:16 -0500


Attachment added: file_info.c (11.9 KiB)

mpichbot avatar Oct 14 '16 17:10 mpichbot

mpicc  -o file_info file_info.c  && mpirun -n 2  ./file_info -fname tmp.txt
 No Errors

Looks like it has been fixed?

hzhou avatar Mar 21 '22 16:03 hzhou

Oh, this is about src/mpi/romio/test/file_info.c

hzhou avatar Mar 21 '22 16:03 hzhou

@roblatham00 Could you take care of this (old) ticket?

hzhou avatar Mar 21 '22 16:03 hzhou

I determined that the reported issue no longer exist. The check of default_striping_factor has been removed already.

This commit -- d2cb66671016753efd22f3293ed8984c97b91441 -- fixes it.

hzhou avatar Aug 14 '22 21:08 hzhou