It is possible to use the memory address of MPI_File for the MPI_File_open and the MPI_File_close functions as an id. This functions get the file handle as a reference and therefore the wrappers can log the address pointer as an unique id for the file handle. But other functions like MPI_File_read or MPI_File_write get the same file handle by value and not by reference. The memory address of MPI_File in these functions is the address of a copy of the original file handle. So the memory address is not a usable id to identify all function calls to the same file handle.
MPI_File itself can not be used as an unique id because this structure (or pointer to a structure, like in OpenMPI) is implementation defined and values in it can be changed during runtime. So it is not possible to use a value out of MPI_File or a hash or a hex dump of the whole structure (or pointer).
It is possible to use the memory address of MPI_File for the MPI_File_open and the MPI_File_close functions as an id. This functions get the file handle as a reference and therefore the wrappers can log the address pointer as an unique id for the file handle. But other functions like MPI_File_read or MPI_File_write get the same file handle by value and not by reference. The memory address of MPI_File in these functions is the address of a copy of the original file handle. So the memory address is not a usable id to identify all function calls to the same file handle.
MPI_File itself can not be used as an unique id because this structure (or pointer to a structure, like in OpenMPI) is implementation defined and values in it can be changed during runtime. So it is not possible to use a value out of MPI_File or a hash or a hex dump of the whole structure (or pointer).