Index: ompi/mca/io/romio/romio/adio/common/ad_open.c =================================================================== --- ompi/mca/io/romio/romio/adio/common/ad_open.c (revision 1913) +++ ompi/mca/io/romio/romio/adio/common/ad_open.c (working copy) @@ -5,6 +5,9 @@ * See COPYRIGHT notice in top-level directory. */ +#include +#include + #include "adio.h" #include "adio_extern.h" #include "adio_cb_config_list.h" @@ -226,8 +229,19 @@ } fd->access_mode = access_mode; - (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); + if ((ADIO_NFS == fd->file_system)) { + char *dirc = ADIOI_Strdup(filename); + char *dname = dirname (dirc); + int my_fd; + my_fd = open (dname, O_RDONLY); + //stat (my_fd, NULL); + close (my_fd); + ADIOI_Free(dirc); + free (dname); + (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); + } + /* if error, may be it was due to the change in amode above. therefore, reopen with access mode provided by the user.*/ fd->access_mode = orig_amode_wronly;