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

Find parallel NetCDF with cmake for USER-NETCDF #1819

Merged
merged 6 commits into from Jan 7, 2020
Merged

Conversation

@jotelha
Copy link
Contributor

jotelha commented Dec 20, 2019

Summary

USER-NETCDF module can be built with NetCDF or Parallel NetCDF library, or both. Depending on which one is available, different dump styles are compiled, namely "netcdf" for the former, "netcdf/mpiio" for the latter. So far, the new CMAKE build system fails to find and compile with Parallel NetCDF. An additional FindPNetCDF.cmake snippet in combination with some extensions within USER-NETCDF.cmake allow LAMMPS with USER-NETCDF to build both styles, depending on which library is available.

Author(s)

Johannes Hörmann, johannes.hoermann@imtek.uni-freiburg.de, johannes.laurin@gmail.com
FindPNetCDF.cmake snippet by unknown author from https://ftp.space.dtu.dk/pub/Ioana/pism0.6.1-10/CMake/FindPNetCDF.cmake, http://www.pism-docs.org

Please state name and affiliation of the author or authors that should be credited with the changes in this pull request. If this pull request adds new files to the distribution, please also provide a suitable "long-lived" e-mail address (ideally something that can outlive your institution's e-mail, in case you change jobs) for the corresponding author, i.e. the person the LAMMPS developers can contact directly with questions and requests related to maintenance and support of this contributed code.

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Note: The FindPNetCDF.cmake resides under GPL v3 at https://ftp.space.dtu.dk/pub/Ioana/pism0.6.1-10/CMake/FindPNetCDF.cmake and I am not sure whether this would conflict with LAMMPS GPL v2.

Backward Compatibility

Implementation Notes

Correctness was tested with various custom test cases for netcdf dump styles at https://github.com/jotelha/lammps-testing/tree/master/tests/examples/USER/netcdf

Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected

Post Submission Checklist

Please check the fields below as they are completed after the pull request has been submitted. Delete lines that don't apply

  • [*] The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • [*] The feature has been verified to work with the CMake based build system
  • A package specific README file has been included or updated
  • One or more example input decks are included

Further Information, Files, and Links

Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)

Conflicts:
	cmake/presets/forhlr2-gnu.cmake
@akohlmey akohlmey requested review from rbberger and junghans Dec 20, 2019
@akohlmey akohlmey self-assigned this Dec 20, 2019
@akohlmey akohlmey added the cmake label Dec 20, 2019
cmake/Modules/FindNetCDF.cmake Outdated Show resolved Hide resolved
cmake/Modules/FindNetCDF.cmake Outdated Show resolved Hide resolved
cmake/Modules/FindPNetCDF.cmake Outdated Show resolved Hide resolved
jotelha and others added 3 commits Dec 22, 2019
Co-Authored-By: Christoph Junghans <christoph.junghans@gmail.com>
Co-Authored-By: Christoph Junghans <christoph.junghans@gmail.com>
Co-Authored-By: Christoph Junghans <christoph.junghans@gmail.com>
@akohlmey

This comment has been minimized.

Copy link
Member

akohlmey commented Jan 6, 2020

@junghans @rbberger any more comments or requests? otherwise please approve. thanks.

jotelha and others added 2 commits Jan 7, 2020
Co-Authored-By: Christoph Junghans <christoph.junghans@gmail.com>
Co-Authored-By: Christoph Junghans <christoph.junghans@gmail.com>
@akohlmey akohlmey merged commit 8cc8c27 into lammps:master Jan 7, 2020
6 checks passed
6 checks passed
lammps/pull-requests/cmake/cmake-kokkos-omp-pr head run ended
Details
lammps/pull-requests/cmake/cmake-serial-pr head run ended
Details
lammps/pull-requests/kokkos-omp-pr head run ended
Details
lammps/pull-requests/openmpi-pr head run ended
Details
lammps/pull-requests/serial-pr head run ended
Details
lammps/pull-requests/shlib-pr head run ended
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.