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

Improper use of cache in parallel builds opening sequential files #1715

Closed
edwardhartnett opened this issue May 7, 2020 · 1 comment · Fixed by #1717
Closed

Improper use of cache in parallel builds opening sequential files #1715

edwardhartnett opened this issue May 7, 2020 · 1 comment · Fixed by #1717

Comments

@edwardhartnett
Copy link
Contributor

While working on a fortran issue (Unidata/netcdf-fortran#253) I noticed this code in hdf5open.c:

#else /* only set cache for non-parallel. */
    if (H5Pset_cache(fapl_id, 0, nc4_chunk_cache_nelems, nc4_chunk_cache_size,
                     nc4_chunk_cache_preemption) < 0)
        BAIL(NC_EHDFERR);
    LOG((4, "%s: set HDF raw chunk cache to size %d nelems %d preemption %f",
         __func__, nc4_chunk_cache_size, nc4_chunk_cache_nelems,
         nc4_chunk_cache_preemption));
#endif /* USE_PARALLEL4 */

This is only setting the cache for non-parallel I/O builds.

It's true that the cache should not be used with parallel I/O, but parallel I/O builds can also do sequential opens. So cache should be applied as long as the file was not opened parallel, even if parallel I/O was built in. This should not be an ifdef, but an if statement.

I will address this after I finish with the fortran issue.

@edwardhartnett
Copy link
Contributor Author

OK, I have a fix for this issue.

The issue was preventing HPC systems from benefiting from higher cache settings (see #1541).

Since the netCDF cache settings were not being used for parallel builds, HPC users will not see the benefits of the increased cache sizes, which is a bummer.

The PR I'm about to put up fixes that.

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

Successfully merging a pull request may close this issue.

1 participant