From a660f286b147674635edbaae1702c60f58540309 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 May 2021 12:39:25 -0400 Subject: [PATCH 1/4] internally forward LAMMPSHOME environment variable, if present, to PYTHONHOME --- src/lammps.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lammps.cpp b/src/lammps.cpp index 1d9a41b4d5..a218b9e08a 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -130,6 +130,16 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) : init_pkg_lists(); +#if defined(LMP_PYTHON) && defined(_WIN32) + // if the LAMMPSHOME environment variable is set, it should point + // to the location of the LAMMPS installation tree where we bundle + // the matching Python installation for use with the PYTHON package. + // this is currently only used on Windows with the windows installer packages + const char *lmpenv = getenv("LAMMPSHOME"); + if (lmpenv) { + _putenv(utils::strdup(fmt::format("PYTHONHOME={}",lmpenv))); + } +#endif // check if -mpicolor is first arg // if so, then 2 apps were launched with one mpirun command // this means passed communicator (e.g. MPI_COMM_WORLD) is bigger than LAMMPS From 89058e87129a60260388a48d74e0a563a7c6fff7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 May 2021 15:05:27 -0400 Subject: [PATCH 2/4] skip bundling GPLv3 lib --- cmake/presets/mingw-cross.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/presets/mingw-cross.cmake b/cmake/presets/mingw-cross.cmake index ab2b9f15a3..c2101d1d9a 100644 --- a/cmake/presets/mingw-cross.cmake +++ b/cmake/presets/mingw-cross.cmake @@ -5,7 +5,7 @@ set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-HDNNP USER-INTEL USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD USER-MESONT USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE USER-OMP - USER-PACE USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC + USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-YAFF) From 98023e73b914727688d7bba6571a15fd541abb26 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 May 2021 15:44:56 -0400 Subject: [PATCH 3/4] clarify GPL version and fix URLs --- doc/src/Intro_opensource.rst | 30 ++++++++++++++++-------------- doc/src/Manual.rst | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/doc/src/Intro_opensource.rst b/doc/src/Intro_opensource.rst index f9fe99e252..967656407a 100644 --- a/doc/src/Intro_opensource.rst +++ b/doc/src/Intro_opensource.rst @@ -2,18 +2,20 @@ LAMMPS open-source license -------------------------- LAMMPS is a freely-available open-source code, distributed under the -terms of the `GNU Public License `_, which means you can use or -modify the code however you wish. +terms of the `GNU Public License Version 2 `_, which means you can +use or modify the code however you wish for your own purposes, but have +to adhere to certain rules when redistributing it or software derived +from it or that includes parts of it. LAMMPS comes with no warranty of any kind. As each source file states in its header, it is a copyrighted code that is distributed free-of- -charge, under the terms of the `GNU Public License `_ (GPL). This -is often referred to as open-source distribution - see -`www.gnu.org `_ or `www.opensource.org `_. The legal -text of the GPL is in the LICENSE file included in the LAMMPS +charge, under the terms of the `GNU Public License Version 2 `_ +(GPLv2). This is often referred to as open-source distribution - see +`www.gnu.org `_ or `www.opensource.org `_. The +legal text of the GPL is in the LICENSE file included in the LAMMPS distribution. -.. _gnu: http://www.gnu.org/copyleft/gpl.html +.. _gnu: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html .. _gnuorg: http://www.gnu.org @@ -24,14 +26,14 @@ Here is a summary of what the GPL means for LAMMPS users: (1) Anyone is free to use, modify, or extend LAMMPS in any way they choose, including for commercial purposes. -(2) If you distribute a modified version of LAMMPS, it must remain -open-source, meaning you distribute it under the terms of the GPL. -You should clearly annotate such a code as a derivative version of -LAMMPS. +(2) If you **distribute** a modified version of LAMMPS, it must remain +open-source, meaning you distribute **all** of it under the terms of +the GPL. You should clearly annotate such a code as a derivative version +of LAMMPS. -(3) If you release any code that includes LAMMPS source code, then it -must also be open-sourced, meaning you distribute it under the terms -of the GPL. +(3) If you release any code that includes or uses LAMMPS source code, +then it must also be open-sourced, meaning you distribute it under +the terms of the GPL. (4) If you give LAMMPS files to someone else, the GPL LICENSE file and source file headers (including the copyright and GPL notices) should diff --git a/doc/src/Manual.rst b/doc/src/Manual.rst index 9207f75c39..61b5af0eff 100644 --- a/doc/src/Manual.rst +++ b/doc/src/Manual.rst @@ -11,7 +11,7 @@ computers. It was developed originally at Sandia National Laboratories, a US Department of Energy facility. The majority of funding for LAMMPS has come from the US Department of Energy (DOE). LAMMPS is an open-source code, distributed freely under the terms of -the GNU Public License (GPL). +the GNU Public License Version 2 (GPLv2). The `LAMMPS website `_ has a variety of information about the code. It includes links to an on-line version of this manual, a From 129c517abe357d4bcb44687faa2607bea809a690 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 May 2021 16:09:28 -0400 Subject: [PATCH 4/4] link to copy of GPLv2 inside of LAMMPS distribution --- doc/src/Intro_opensource.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Intro_opensource.rst b/doc/src/Intro_opensource.rst index 967656407a..635982fd18 100644 --- a/doc/src/Intro_opensource.rst +++ b/doc/src/Intro_opensource.rst @@ -2,20 +2,20 @@ LAMMPS open-source license -------------------------- LAMMPS is a freely-available open-source code, distributed under the -terms of the `GNU Public License Version 2 `_, which means you can +terms of the `GNU Public License Version 2 `_, which means you can use or modify the code however you wish for your own purposes, but have to adhere to certain rules when redistributing it or software derived from it or that includes parts of it. LAMMPS comes with no warranty of any kind. As each source file states in its header, it is a copyrighted code that is distributed free-of- -charge, under the terms of the `GNU Public License Version 2 `_ +charge, under the terms of the `GNU Public License Version 2 `_ (GPLv2). This is often referred to as open-source distribution - see `www.gnu.org `_ or `www.opensource.org `_. The legal text of the GPL is in the LICENSE file included in the LAMMPS distribution. -.. _gnu: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html +.. _gpl: https://github.com/lammps/lammps/blob/master/LICENSE .. _gnuorg: http://www.gnu.org