On 03/17/2015 09:07 AM, Joakim Hove wrote:
Hello;
at the OPM meeting in Trondheim we discussed changes to the opm-build
system. Two independent goals were identified:
1.Make the build system easier to maintain and improve for developers;
the main “solution” to this is to create a opm-cmake repository which
contains all the shared build files.
2.Create a managed build system which can handle downloading and
building of the required modules/third-party libraries transparently.
We will start with creating the common opm-cmake repository, and then
subsequently add in the managed build system when opm-cmake has
stabilized. Please free feel to look at and discuss the initial code:
Opm-cmake: https://github.com/joakim-hove/opm-cmake
Initial PR using opm-cmake: https://github.com/OPM/opm-core/pull/770
Managed build: https://github.com/akva2/opm-meta
Well, this is FANTASTIC! Anyone following this list, knows I have always
been (too?) vocal about portability; particularly since I'm not a coder
on this project (yet). That said, I have nothing but lofty ambitions
for the OPM project. I also and a strong advocate that the coders of OPM
make the final decision, so here are my thoughts to ponder, as the
coders of OPM make their decision.
Historically, I have ranted about porting OPM to a vary wide variety of
hardware running some form of (embedded) linux; arm64, DSPs, FPGA, GPUs,
any micro running a 64bit embedded linux stack, just to mention a few.
Clusters are rapidly becoming pedestrian computationally managed
resources; so portability is the life_blood of any new, highly visible
project like OPM, imho.
Along the line of portability, WE should have the option to replace any
and all modules with competing codes. Run those codes on a variety of
hardware and ponder those results. OPM should be the place where all
sorts of new twists on algo's like sparse matrix, FEM and such are
tested, imho. Subsurface physics touches on such a wide variety of
parameters in the world of physics, it is virtually unlimited for
testing new mathematical codes.
Previously, I have extolled the virtues of the Gentoo ebuild layout
for compiling from sources with some sort of structured, yet feature
rich environment. Surely I will endeavor to put each piece of the new
OPM codes into an ebuild, where folks can build from sources on gentoo
or use it as a guide to package up opm modules as they see fit. I use
the gentoo ebuild system because I have found nothing even close for
building up from 100% sources. Do educate me if you know of a better,
more dynamic, build system.
Here goes:
The media-libs/x264-0.0.20130506.ebuild is an excellent example to see a
very wide range of supported architectures:
KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc
~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos
~x86-macos"
In fact there is no limit to the different arch type one can readily
support.
And downloading sources:
HOMEPAGE="http://www.videolan.org/developers/x264.html"
if [[ ${PV} == 9999 ]]; then
inherit git-2
EGIT_REPO_URI="git://git.videolan.org/x264.git"
SLOT="0"
else
inherit versionator
MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
SRC_URI="http://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
Closer to home, here is the entire ebuild for opm-porsol (2013):
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$
EAPI=5
inherit cmake-utils
SRC_URI="https://github.com/OPM/${PN}/archive/release/${PV}/final.tar.gz
-> ${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64"
S=${WORKDIR}/${PN}-release-${PV}-final
RDEPEND="
dev-libs/boost
virtual/blas
virtual/lapack
sci-libs/dune-common
sci-libs/dune-geometry
sci-libs/dune-grid
sci-libs/dune-istl[superlu,umfpack]
sci-libs/umfpack
>=sci-libs/superlu-4.3
~sci-physics/dune-cornerpoint-${PV}
~sci-physics/opm-core-${PV}
~sci-physics/opm-material-${PV}"
DEPEND="${RDEPEND}"
src_configure() {
local mycmakeargs=(
-DBUILD_EXAMPLES=OFF
)
cmake-utils_src_configure
}
Note your "cmake" already is part of this package.
Here is one of the dune packages:
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$
EAPI=5
inherit cmake-utils
SRC_URI="https://github.com/OPM/${PN}/archive/release/${PV}/final.tar.gz
-> ${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64"
S=${WORKDIR}/${PN}-release-${PV}-final
RDEPEND="
dev-libs/boost
virtual/blas
virtual/lapack
sci-libs/dune-common
sci-libs/dune-geometry
sci-libs/dune-grid
sci-libs/dune-istl[superlu,umfpack]
sci-libs/umfpack
~sci-physics/opm-core-${PV}
>=sci-libs/superlu-4.3"
DEPEND="${RDEPEND}"
Pretty dam simple! One of the best things about these ebuilds via
portage is that portage/ebuild system is under very dynamic development.
You can even support different versions of the same code, using a
concept referred to as "slots".
EAPI 6 is on it's way! User patches are readily available so that coder
(any coder) can include a patch, build from sources, test and then post
to the developer's repository not only the code but the results from
their testing the patches. Rapidly, others can validate/challenge those
results!
http://devmanual.gentoo.org/ebuild-writing/functions/src_prepare/epatch/
Any a user/dev can use a variety of sources from local to github to CVS
etc etc, to build up codes from 100% sources. Here is the latest:
https://wiki.gentoo.org/wiki/Project:Portage/Sync
Gentoo is truly becoming the state of the art distro for software
development, particularly for open source. Understanding these tools
allows for others to port to a myriad of other distros, operating
systems and hardware architectures that are very divergent.
I look forward to fully supporting the newest OPM release on Gentoo
and helping folks use those gentoo portage ebuilds as guides for
understanding dependencies and other relationships between the OPM
components and other compatible codes.
Last: previously I have posted about a complete image build that builds
from 100% sources, is patchable/updatable and all fits onto a usb drive.
I'm still working on that, but, others are doing the same thing for a
variety of gentoo-derivative works from tor to penetration testing, to
(CI) continuous integration and clusters, so there is no reason it's not
going to work. It does take me too long sometimes to deliver, but, I
have excellent company on that front (just teasing......).
sincerely,
James
_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm