[mpich-discuss] file open error code checking

Rob Latham robl at mcs.anl.gov
Mon Apr 7 09:16:37 CDT 2014



On 04/06/2014 12:23 PM, Wei-keng Liao wrote:
> I can see error codes EISDIR and EEXIST are checked in ad_ufs_open.c
> and the corresponding MPI_ERR_BAD_FILE and MPI_ERR_FILE_EXISTS are generated.
>
> But this update does not appear on other file systems, such as Lustre and GPFS.
> PnetCDF needs an MPI-IO that can return the MPI_ERR_FILE_EXISTS class when the
> MPI_MODE_EXCL mode is set and the file exist. This class will correspond to
> NC_EEXIST in PnetCDF (when NC_NOCLOBBER is set in ncmpi_create and file exists).
>

Thanks, Wei-keng.  I wonder if we can do this error code setting up in 
common code so all the lower-level file system drivers get it automatically?

==rob


>
> ad_ufs_open.c
>
>    94         else if(errno == EISDIR) {
>    95             *error_code = MPIO_Err_create_code(MPI_SUCCESS,
>    96                                                MPIR_ERR_RECOVERABLE, myname,
>    97                                                __LINE__, MPI_ERR_BAD_FILE,
>    98                                                "**filename", 0);
>    99         }
>   100         else if(errno == EEXIST) {
>   101             *error_code = MPIO_Err_create_code(MPI_SUCCESS,
>   102                                                MPIR_ERR_RECOVERABLE, myname,
>   103                                                __LINE__, MPI_ERR_FILE_EXISTS,
>   104                                                "**fileexist", 0);
>   105
>   106         }
>
>
> Wei-keng
>
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA



More information about the discuss mailing list