Gentoo Archives: gentoo-science

From: Christoph Junghans <ottxor@g.o>
To: gentoo-science@l.g.o
Subject: Re: [gentoo-science] sci-physics/lammps: question on proper integration of mpi
Date: Sun, 12 May 2013 23:08:51
Message-Id: CANgp9kzgT=AVpKYHLz8Os1WODrstpuMRrxCPuqDo=Mxm5uOGUw@mail.gmail.com
In Reply to: [gentoo-science] sci-physics/lammps: question on proper integration of mpi by Nicolas Bock
1 Hi Nick,
2
3 thanks for your contribution.
4
5 I think there is no general answer to your question. It depends if it
6 is a disadvantage of running the mpi-version with 1 MPI process over
7 running the serial version. I imagine that LAMMPS enable some special
8 optimization if mpi is disabled as it can assume that everything
9 happens locally and no mpi message need to be send. On the other hand,
10 if the build of LAMMPS takes hours, one might prefer building it only
11 once. Do LAMMPS offer other palatalizations like OpenMP or Threads to
12 use multiple cores?
13
14 From a brief look at our patch I see the following issues:
15 - I am not sold on this Makefile patch and patching of the patch
16 approach, seems a bit fragile. It might be better to use the default
17 gcc Makefile and patch that. I prefer adding CC,CFLAGS etc, on emake
18 comandline, you could create a function to avoid writing it on every
19 emake call. (my_emake() { emake "$@" CC= CFLAGS=; } )
20 - sed calls need to secured with "|| die"
21 - DEPEND should be static, DEPEND="mpi? ( vitrual/mpi )" should do it
22 - virtual/fortran is missing in DEPEND or use fortran-2.eclass and
23 FORTRAN_NEEDED="fortran" instead.
24 - lammps-gzip enables normal gzip support, so the use flags should be
25 called gzip.
26
27 If you are unsure about some technical details in an ebuild, create a
28 pull request on github and somebody will give you advice in the
29 review.
30
31 Otherwise good job, looking forward to more commits from you,
32
33 Christoph
34
35 2013/5/12 Nicolas Bock <nicolasbock@×××××.com>:
36 > Hi,
37 >
38 > I recently added a lammps ebuild to the science overlay. It so far only
39 > builds the serial version, and has very limited support for build time
40 > options. I now added the mpi use flag and changed the ebuild so that it
41 > builds the mpi version. I have attached a patch against master that does
42 > this. I would like to get some feedback on those changes. Are they
43 > acceptable in this form? What should I have done differently? How would I go
44 > about writing an ebuild that builds both, the serial _and_ the mpi version
45 > in case the mpi use flag is set?
46 >
47 > Thanks already,
48 >
49 > nick
50 >
51
52
53
54 --
55 Christoph Junghans
56 http://dev.gentoo.org/~ottxor/

Replies

Subject Author
Re: [gentoo-science] sci-physics/lammps: question on proper integration of mpi Nicolas Bock <nicolasbock@×××××.com>