Hi Christoph, thanks for the detailed answer. I have made a few changes to the ebuild, implementing what you suggested. The only thing missing right now is a better way to deal with the Makefile. I am working on that. In the meantime I have created a pull request.
Thanks again, nick On Sun, May 12, 2013 at 5:08 PM, Christoph Junghans <[email protected]>wrote: > Hi Nick, > > thanks for your contribution. > > I think there is no general answer to your question. It depends if it > is a disadvantage of running the mpi-version with 1 MPI process over > running the serial version. I imagine that LAMMPS enable some special > optimization if mpi is disabled as it can assume that everything > happens locally and no mpi message need to be send. On the other hand, > if the build of LAMMPS takes hours, one might prefer building it only > once. Do LAMMPS offer other palatalizations like OpenMP or Threads to > use multiple cores? > > From a brief look at our patch I see the following issues: > - I am not sold on this Makefile patch and patching of the patch > approach, seems a bit fragile. It might be better to use the default > gcc Makefile and patch that. I prefer adding CC,CFLAGS etc, on emake > comandline, you could create a function to avoid writing it on every > emake call. (my_emake() { emake "$@" CC= CFLAGS=; } ) > - sed calls need to secured with "|| die" > - DEPEND should be static, DEPEND="mpi? ( vitrual/mpi )" should do it > - virtual/fortran is missing in DEPEND or use fortran-2.eclass and > FORTRAN_NEEDED="fortran" instead. > - lammps-gzip enables normal gzip support, so the use flags should be > called gzip. > > If you are unsure about some technical details in an ebuild, create a > pull request on github and somebody will give you advice in the > review. > > Otherwise good job, looking forward to more commits from you, > > Christoph > > 2013/5/12 Nicolas Bock <[email protected]>: > > Hi, > > > > I recently added a lammps ebuild to the science overlay. It so far only > > builds the serial version, and has very limited support for build time > > options. I now added the mpi use flag and changed the ebuild so that it > > builds the mpi version. I have attached a patch against master that does > > this. I would like to get some feedback on those changes. Are they > > acceptable in this form? What should I have done differently? How would > I go > > about writing an ebuild that builds both, the serial _and_ the mpi > version > > in case the mpi use flag is set? > > > > Thanks already, > > > > nick > > > > > > -- > Christoph Junghans > http://dev.gentoo.org/~ottxor/ > >
