[EXTERNAL] Re: including 3rd-party code in LAMMPS (license issue)

Axel has already provided his opinion. (I really appreciate the
time he spent replying.) I think I'd like to hear yours:

Hi - not sure I understand the various trade-offs here
and haven't been following the discussion. But here
are my comments ...

(1) LAMMPS doesn't actually depend on MPI or FFTW3. You can build
LAMMPS serially or with other FFTs, including KISS which is included.
So I don't think making Eigen a "requirement" to build LAMMPS is a good
idea.

(2) Users can build with USER-SMD via either make or CMake. It just
requires an additional "make lib-smd options" (for make) or CMake
variable setting. Both then download Eigen (if requested, only needed
one time), and build it as a lib so LAMMPS can link to it.

See this page for details:
http://lammps.sandia.gov/doc/Build_extras.html#user-smd

So the same could be done for a new USER-REACT and fix bond/react. If
only a new option of fix bond/react needs Eigen, you could probably
ifdef the code that calls Eigen and allow the same build as now w/out
Eigen.

It will reduce the number of people who can get fix bond/react to
work.

Do you mean this additional make step or CMake variable or something
else?

(3) I'm not clear on the issue with including an Eigen file in LAMMPS
itself (say in USER-REACT). If it's a social thing (not nice to Eigen
developers), then I can see why it would be better just to use their
full lib.

(4) I think writing your own eigen solver is potentially painful and
not worthwhile.

So my vote would be (2) and make it as easy as possible for users.
Similar to USER-SMD plus ifdef if users don't need the Eigen-dependent
options you are adding to fix bond/react.

Steve

Axel has already provided his opinion. (I really appreciate the
time he spent replying.) I think I’d like to hear yours:

Hi - not sure I understand the various trade-offs here
and haven’t been following the discussion. But here
are my comments …

(1) LAMMPS doesn’t actually depend on MPI or FFTW3. You can build
LAMMPS serially or with other FFTs, including KISS which is included.
So I don’t think making Eigen a “requirement” to build LAMMPS is a good
idea.

Sounds pretty reasonable.

(2) Users can build with USER-SMD via either make or CMake. It just
requires an additional “make lib-smd options” (for make) or CMake
variable setting. Both then download Eigen (if requested, only needed
one time), and build it as a lib so LAMMPS can link to it.

See this page for details:
http://lammps.sandia.gov/doc/Build_extras.html#user-smd

So the same could be done for a new USER-REACT and fix bond/react. If
only a new option of fix bond/react needs Eigen, you could probably
ifdef the code that calls Eigen and allow the same build as now w/out
Eigen.

It will reduce the number of people who can get fix bond/react to
work.

Do you mean this additional make step or

CMake variable

Yep. That’s all I meant. I suspect the majority of LAMMPS users download the LAMMPS binaries instead of compiling it. Asking them to compile it with special instructions forces them to learn more computer clue. (Perhaps that’s a good thing.). Any chance we could get the official binaries to include USER-REACT?

(3) I’m not clear on the issue with including an Eigen file in LAMMPS
itself (say in USER-REACT). If it’s a social thing (not nice to Eigen
developers), then I can see why it would be better just to use their
full lib.

I think it just makes it harder for the LAMMPS developers to maintain the code and to make decisions about changing licenses with all these hidden license bombs buried inside the code.

(4) I think writing your own eigen solver is potentially painful and
not worthwhile.

So my vote would be (2) and make it as easy as possible for users.
Similar to USER-SMD plus ifdef if users don’t need the Eigen-dependent
options you are adding to fix bond/react.

I can definitely add #ifdefs. That’s a great idea.
I’m in no position to issue demands, but if we can include the complete USER-REACT in the official LAMMPS binaries, then that would allay all of my concerns at least. Hopefully Jacob will chime in.

Thank you and Axel very much for reading my long emails. This issue was really holding me up.

Andrew

That is a discussion that you should have with the folks who actually maintain those respective binary packages. That would primarily be Christoph Junghans (for Fedora/EPEL/SuSE) and Anton Gladky (for Debian/Ubuntu) (both cc’d).

A good starting point for building LAMMPS for distributions should be the “most” preset with CMake. That includes many popular packages that can be built without automatic download. It skips LAMMPS packages where it would be better to install additional libraries through distribution specific binary packages (Eigen3 does not fall into that category, since it is a header-only package, so there is no runtime dependency). Those (and some other packages or settings like FFmpeg for generating movies) could then be enabled manually in addition, based on availability external(?) prerequisite packages like, for example, KIM-API or Plumed2.

Axel.

It would certainly be helpful for people if USER-REACT was included in the binaries. Regarding Eigen dependence, requiring this lib for new features is fine by me, and I’m not seeing an easy way around it in this case. I think we can ‘quarantine’ this dependence fairly easily. From a user perspective, this can be made clear by creating a variant of the bond/react command.