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

Parallel NetCDF: file mode creation/opening needs the parallel library choice bit. #689

Open
andreapiacentini opened this issue Sep 5, 2024 · 1 comment
Assignees

Comments

@andreapiacentini
Copy link

andreapiacentini commented Sep 5, 2024

In core/src/ParallelNetcdfFile.cpp the open_par function calls NetCDF nc_open_par: if parallelism is enabled in NetCDF, the mode has to specify if the NC_MPIIO or NC_PNETCDF mode is chosen, otherwise an Invalid argument exception is raised.
Adding | MPIIO in the calls inside the switch (fMode) section fixed the problems, but it can be tailored as a choice.
Cf, from XIOS, src/io/onetcdf4.cpp.

I also noticed that the MPI_Info info argument is passed uninitialized to NetCDF. It should be set to MPI_INFO_NULL if no hint is passed to NetCDF. This is done in XIOS (same file), but could be let open to optimization (probably a bit too much geeky, though).
There a choice from removing the info argument from the API of open_par and set it to MPI_INFO_NULL inside or to propagate the initialization to the callers.

@andreapiacentini
Copy link
Author

This behavior appears to be related to the version of NetCDF-C. Updating to 4.9.2 on my PC solved the issue. Notice that 4.6.1, 4.6.2 and 4.7.1 are still widely used (more recent version have proven hard to tune on lustre filesystems)

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

3 participants