[MPICH] Bug(s) in src/mpi/romio/adio/ad_ntfs_open.c

Robin Boerdijk robin_boerdijk at yahoo.com
Fri Jun 17 09:21:59 CDT 2005


Hi,

There is a bug in src/mpi/romio/adio/ad_ntfs_open.c. In line 40, the
second argument of the Windows CreateFile() call is hardcoded to be
GENERIC_READ | GENERIC_WRITE, but it looks like this argument should
have been set to the 'smode' variable that has been set up in the lines
before.

This bug causes MPI_File_open(..., MPI_MODE_RDONLY, ...) to fail on my
Windows machine when executed on more than one processor. The attached
test program shows this. This test program is designed so that it can
be included in the test/mpi/io directory and built and run using the
existing createprojects.wsf and runtests.wsf scripts.

One thing I noticed when running this test is that the error message
produced by MPI_File_open() is not very informative (something like
"Other I/O Error: No error"). I think this is caused by the fact that
line 60 of ad_ntfs_open.c uses strerror(errno) to produce the error
message but, apparently, Windows does not set errno when CreateFile()
fails. It would probably be better to use
GetLastError()/FormatMessage() to get the error code and produce an
error message. I hope this can be fixed as well (presumably in more
places than just here). 

Now we are on the topic, I would also like to suggest to include as
much information in the MPI error messages as possible. So not only the
error message produced by strerror() or FormatMessage(), but also the
original error code and, preferably, the name of the system call that
failed (so that I don't have to look it up in the source). Good error
messages help a lot in solving problems and it is one of the first
things I look at when judging the quality of a piece of software. I'd
be happy to assist in this effort if needed.

Best regards,

Robin Boerdijk

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rdwrat.c
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20050617/e83da367/attachment.diff>


More information about the mpich-discuss mailing list