Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails writing a scalar of type MPI_BYTE with hdf5 1.10.5 #1462

Closed
1 of 11 tasks
jedwards4b opened this issue Aug 13, 2019 · 6 comments
Closed
1 of 11 tasks

Fails writing a scalar of type MPI_BYTE with hdf5 1.10.5 #1462

jedwards4b opened this issue Aug 13, 2019 · 6 comments

Comments

@jedwards4b
Copy link
Contributor

Please provide as much of the following information as you can, as applicable to the issue being reported. Naturally, not all information is relevant to every issue, but the more information we have to start, the better!

Environment Information

Feel free to skip this if the issue is related to documentation, a feature request, or general discussion.

  • What platform are you using? (please provide specific distribution/version in summary)
    • [ X] Linux
    • Windows
    • OSX
    • Other
    • NA
  • 32 and/or 64 bit?
    • 32-bit
    • 64-bit
  • What build system are you using?
    • autotools (configure)
    • cmake
  • Can you provide a sample netCDF file or C code to recreate the issue?
    • Yes (please attach to this issue, thank you!)
    • No
    • Not at this time

Summary of Issue

Fails in hdf5 1.10.5 to write a single scalar of type MPI_BYTE, see issue
https://jira.hdfgroup.org/servicedesk/customer/portal/2/SUPPORT-503

Steps to reproduce the behavior

Currently this is in a pio test case, I will try to eliminate pio and submit a netcdf only testcase.

@jedwards4b
Copy link
Contributor Author

A testcase is provided in NCAR/ParallelIO#1582

@edhartnett
Copy link
Contributor

I am adding this test to nc_test4/tst_parallel5.c. Works fine with HDF5-1.10.5. I'm now running it thru my CI to test older versions of HDF5.

@edhartnett
Copy link
Contributor

edhartnett commented Aug 14, 2019

I have added a test to tst_parallel5.c, based on your test code. I create a netCDF-4 file with parallel I/O, define a scalar var, write a value to it, then close the file. Then I reopen the file with nc_open_par() and read the scalar to confirm its value.

if (!mpi_rank)
        printf("*** testing NC_BYTE type and parallel I/O...");
    {
        /* This test is related to
         * https://github.com/Unidata/netcdf-c/issues/1462. */
        int ncid, varid;
        signed char test_data_in, test_data = 42;

        /* Crate a file with a scalar NC_BYTE value. */
        if (nc_create_par(FILE, NC_NETCDF4, MPI_COMM_WORLD, MPI_INFO_NULL,
                          &ncid)) ERR;
        if (nc_def_var(ncid, "fred", NC_BYTE, 0, NULL, &varid)) ERR;
        if (nc_enddef(ncid)) ERR;
        if (nc_put_var_schar(ncid, varid, &test_data));
        if (nc_close(ncid)) ERR;

        /* Reopen the file and check. */
        if (nc_open_par(FILE, 0, comm, info, &ncid)) ERR;
        if (nc_get_var_schar(ncid, varid, &test_data_in));
        if (test_data_in != test_data) ERR;
        if (nc_close(ncid)) ERR;
    }
    if (!mpi_rank)
        SUMMARIZE_ERR;

This is the file that's created:

netcdf tst_parallel5 {
variables:
	byte fred ;
data:

 fred = 42 ;
}

This test passes with current master on my workstation. I put up a PR, and it's running through the various CI systems now...

@jedwards4b
Copy link
Contributor Author

It seems to be dependent on the version of mpi. It fails with mpt/2.19 and mpt/2.20 but passes with all other mpi libraries I've tried.

@edhartnett
Copy link
Contributor

OK, this issue can be closed, as this appears to be an MPI implementation issue.

@epourmal
Copy link

epourmal commented Dec 2, 2019

We confirmed in HDF5 that this is MPI I/O library issue. See HDFFV-10882.

@WardF WardF closed this as completed Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants