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

Fix compilation issue for some pair styles using ewald_const.h #4077

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

akohlmey
Copy link
Member

@akohlmey akohlmey commented Feb 13, 2024

Summary

When compiling the 7 Feb 2024 LAMMPS release using CMake there are compilation errors when some packages are installed (e.g. EXTRA-PAIR) but not KSPACE. This is due to the ewald_const.h header being part of the KSPACE package and the other packages installing (some) pair styles requiring KSPACE and the CMake scripting not excluding them from compilation. Rather than adding (complex) CMake code to remove those files from compilation, it is simpler to move the ewald_const.h file from src/KSPACE to src. This has the added benefit of enabling the use of it for pair styles with 'coul/dsf', for example, and thus further reducing the redundant definition of constant.

This also adds OpenMP compatibility detection with CrayClang compilers for very new CMake versions that do not flag it as Clang anymore and thus it won't fall under the Clang version check.

The plan is to release this as version 7 Feb 2024 - Update 1. Since this only affects custom compilations from source code, only source code tarballs need to be updated.

Related Issue(s)

Fixes #4076 and also addresses the issue raised in https://matsci.org/t/error-when-compiling-ewald-const-h-no-such-file-or-directory/53510

Author(s)

Axel Kohlmeyer, Temple U

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).

Post Submission Checklist

  • 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
  • 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

@akohlmey akohlmey self-assigned this Feb 13, 2024
@akohlmey akohlmey marked this pull request as ready for review February 13, 2024 13:37
Copy link
Contributor

@stanmoore1 stanmoore1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve

@akohlmey akohlmey merged commit 254a849 into lammps:develop Feb 13, 2024
4 checks passed
@akohlmey akohlmey deleted the fix_ewald_const_issue branch February 13, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

[BUG] Release branch fails to build with EXTRA-PAIR
3 participants