Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Do not enable OpenMP by default for gcc 9.x with CMake #1483
Temporary workaround for the incompatibility of OpenMP support in gcc 9.x and the OpenMP directives in LAMMPS. To avoid unexpected failure to compile with CMake, we don't automatically enable the 'BUILD_OMP' flag in that case. This way people that just run cmake to compile LAMMPS will by default get a working executable and no rather cryptic error messages. Manually enabling OpenMP will still cause compilation failures unless the script in
This is primarily intended for the upcoming stable release to avoid frequent reports of "LAMMPS broken with gcc 9" by people that are not aware, that OpenMP would be enabled by default, even if they are not using it. It needs a more permanent solution that re-enables OpenMP support for the affected compilers, but it is not clear at the moment, what a good approach would be.
Axel Kohlmeyer (Temple U)
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