[CIG-SHORT] Adding to the libraries
Brad Aagaard
baagaard at usgs.gov
Sun Aug 6 12:20:02 PDT 2017
On 8/5/17 10:39 PM, Matthew Knepley wrote:
> On Sat, Aug 5, 2017 at 9:52 PM, Ehsan Haghighat <ehsanh at mit.edu
> <mailto:ehsanh at mit.edu>> wrote:
>
>
>>
>> The master branch is the current stable development version of
>> PyLith. It has some fixes since the v2.2.0 release. If you want
>> the v2.2.0 release, then use git to get the tagged version
>> matching the release.
>>
>> From https://stackoverflow.com/questions/791959/download-a-specific-tag-with-git
>> <https://stackoverflow.com/questions/791959/download-a-specific-tag-with-git>
>>
>> After the clone, you can list the tags with
>> $ git tag -l
>> and then checkout a specific tag:
>> $ git checkout tags/<tag_name>
>>
>> Even better, checkout and create a branch (otherwise you will be
>> on a branch named after the revision number of tag):
>>
>> $ git checkout tags/<tag_name> -b <branch_name>
>>
>
> What I understood is to install the latest version with
> "—with-pylith-git=master" and then get an earlier version. However,
> I remember once I tried to get the 2.1.0 on the 2.2.0 I faced
> incompatibilities between PETSc and Pylith. Do you think it will
> happen here? (at this time, I have to stick to the 2.1.0 version)
>
>
> Yes, if you want to rollback PyLith, you have to rollback PETSc to a
> compatible rev, which is easiest to do by date.
Let's take a step back and start from the beginning... you want to add a
material model to PyLith. Therefore, you need to work with an
installation that supports developing/extending PyLith. There are
multiple ways to do this:
1. Use the v2.2.0 (or later) binary package.
The binary package includes the compilers and SWIG, so you have the
necessary tools. Instead of rebuilding PyLith, in this case you would
follow the templates/materials example, not touching the main source
tree at all.
The disadvantage of this approach is that you cannot easily stay
updated with PyLith fixes. You have to download a new binary tarball and
rebuild your extension with each new release.
2. Install from source using the installer and the
--with-pylith-bit=BRANCH. Configuring the installer with these options
insures it builds the necessary tools (e.g., SWIG).
a. Use the PyLith master branch. This is the stable development
version. If you have any intention of keeping in sync with PyLith
development, this is the preferred option. You can easily merge in
updates/fixes we do and keep in sync going forward. We do our best not
to fix all bugs before merging features into the PyLith master branch.
With this approach the installer will also use the PETSc repository
(knepley/pylith branch) and the spatialdata master branch. We are
constantly making sure these three stay in sync.
b. Use a previous tagged version of PyLith and rollback PETSc to the
corresponding commit. As Matt said this is most easily done using the
date. You can also download the binary and run pylith --version to find
the PETSc commit corresponding to that PyLith release.
I am not sure why you would want to use a previous tagged version
rather than the stable development version.
3. Install from source using the installer to build the dependencies,
but use your own fork of the PyLith repository.
In github, you would fork the PyLith repository and clone it to your
local machine and build PyLith. You would still want to make sure you
use PETSc and spatialdata from the repository with the installer.
IMPORTANT NOTE: With option 2 or 3, I still **STRONGLY URGE** you to
follow the example in templates/materials to add a material. PyLith is
designed so that you can build a simple extension rather than working
with the main source tree! This approach is much easier to debug as it
only involves your new files.
If you have questions, please explain what your goal is and outline how
you plan to get there. It is much easier to steer you down the right
path if we know what your end goal is than respond to specific questions
that may be a result of heading down the wrong path.
Regards,
Brad
More information about the CIG-SHORT
mailing list