Skip to content

H5Fget_access_plist does not return a valid faplid #15

@yzanhua

Description

@yzanhua

Summary

When using Cache Vol and Async Vol, it seems that H5Fget_access_plist does not return a valid faplid.
The returned id is non-negative but seems not a property list.

Error Details

% echo $HDF5_VOL_CONNECTOR 
cache_ext config=cache_1.cfg;under_vol=512;under_info={under_vol=0;under_info={}}

% mpirun -n 1 ./test
HDF5-DIAG: Error detected in HDF5 (1.13.3-1) MPI-process 0:
  #000: ../../hdf5-dev/src/H5Pfapl.c line 1487 in H5Pget_driver(): can't get driver
    major: Property lists
    minor: Can't get value
  #001: ../../hdf5-dev/src/H5Pfapl.c line 1444 in H5P_peek_driver(): not a file access property list
    major: Property lists
    minor: Inappropriate type
  #002: ../../hdf5-dev/src/H5Pint.c line 4067 in H5P_isa_class(): not a property list
    major: Invalid arguments to routine
    minor: Inappropriate type

Test Program

Click here to see the test program:
#include <hdf5.h>
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>

#define N 10

#define CHECK_ERR(A) {if (A < 0) { printf("Error at line %d: code %d\n", __LINE__, A); }}

int main(int argc, char **argv) {
  herr_t err = 0;

  int mpi_required;
  const char *file_name = "test.h5";

  hid_t fid = -1;          // File ID
  hid_t faplid = -1;       // File Access Property List
  hid_t plist_id = -1;
  hid_t faplid2 = -1;

  // init MPI
  err = MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &mpi_required);
  CHECK_ERR(err);

  // create file
  faplid = H5Pcreate(H5P_FILE_ACCESS);
  CHECK_ERR(faplid);
  H5Pset_fapl_mpio(faplid, MPI_COMM_WORLD, MPI_INFO_NULL);
  fid = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, faplid);
  CHECK_ERR(fid);

  // get faplid
  faplid2 = H5Fget_access_plist (fid);
  CHECK_ERR (faplid2);
  plist_id = H5Pget_driver (faplid2);  // Error occurs here

  if (fid >= 0)
    H5Fclose(fid);
  if (faplid >= 0)
    H5Pclose(faplid);

  MPI_Finalize();

  return 0;
}

Libraries Versions (commit number)

Click here to see the details
  1. HDF5 develop branch: HDFGroup/hdf5@b559857
  2. Argobots main branch: pmodels/argobots@dce6e72
  3. AsyncVol develop branch: HDFGroup/vol-async@0a92d23
  4. Cache Vol develop branch: f453900

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions