[CIG-SHORT] Adding to the libraries

Ehsan Haghighat ehsanh at mit.edu
Sat Aug 5 10:32:38 PDT 2017


> On Aug 5, 2017, at 8:53 AM, Matthew Knepley <knepley at rice.edu> wrote:
> 
> On Fri, Aug 4, 2017 at 7:52 PM, Ehsan Haghighat <ehsanh at mit.edu <mailto:ehsanh at mit.edu>> wrote:
> Added few blank lines to the source file, also removed the materials_wrap.cxx from modulesrc.
> 
> Great, this tells you that something is obviously broken, so go back to the beginning to figure out what.
> 
> 1) Start with a clean source tree and build tree. Does PyLith build? Can you run a test?

I just made a clean installation from the source. It does compile. I can run the tests. 

> 
> 2) Add a source file in the source tree and alter Makefile.am there. Does 'make' in the build tree run automake?

Added the source file and made the changes in the Makefile.am. I still get the same response:
...:~/dev-test/build/pylith$ make
make: Nothing to be done for 'all’.

> 
> 3) Now does a change to your new file cause a compilation?

Can you confirm where should I call “make"? In “build/pylith”, where I build the whole project for the first time, or in “build/pylith/pylith-build”?
When I call “make pylith”, it rebuilds the whole library. 

> 
>    Matt 
>> On Aug 4, 2017, at 8:51 PM, Matthew Knepley <knepley at rice.edu <mailto:knepley at rice.edu>> wrote:
>> 
>> On Fri, Aug 4, 2017 at 7:47 PM, Ehsan Haghighat <ehsanh at mit.edu <mailto:ehsanh at mit.edu>> wrote:
>> Matt,
>> 
>> I just made a small change to the code,
>> 
>> What change?
>> 
>>    Matt
>>  
>> and run make. This is the message:
>> 
>> : ~/dev/build/pylith$ make
>> make: Nothing to be done for 'all’.
>> 
>> :~/dev/build/pylith$ make install
>> make[1]: Entering directory '/home/ehsanhaghighat/dev/build/pylith'
>> make[1]: Nothing to be done for 'install-exec-am'.
>> make[1]: Nothing to be done for 'install-data-am'.
>> make[1]: Leaving directory '/home/ehsanhaghighat/dev/build/pylith'
>> 
>> Nothing happens.
>> 
>> Ehsan
>> 
>> 
>> 
>>> On Aug 4, 2017, at 5:29 PM, Ehsan Haghighat <ehsanh at mit.edu <mailto:ehsanh at mit.edu>> wrote:
>>> 
>>> I will try again, but calling make did not capture the changes then I did this. The message was  something like "it is up to date, nothing to be done"...
>>> 
>>> On Aug 4, 2017, at 5:19 PM, Matthew Knepley <knepley at rice.edu <mailto:knepley at rice.edu>> wrote:
>>> 
>>>> On Fri, Aug 4, 2017 at 3:44 PM, Ehsan Haghighat <ehsanh at mit.edu <mailto:ehsanh at mit.edu>> wrote:
>>>> Hi Matt,
>>>> 
>>>> These are the steps I took and successfully added a new material (it is a copy of DruckerPrager3D) 
>>>> 
>>>> — Created the material in the libsrc 
>>>> — Created the material in the pylith
>>>> — Added the necessary changes to the modulesrc and Makefile.am (everyplace that DruckerPrager3D was added)
>>>> 
>>>> From here it is wrong.
>>>> 
>>>>  1) DO NOT CALL Automake yourself. It will be called automatically by the build system
>>>> 
>>>>  2) DO NOT CALL Swig yourself. It will be called automatically by the build system
>>>> 
>>>> Just call 'make' from the root of the source tree.
>>>> 
>>>>    Matt
>>>>  
>>>> — Called automake in folder “build/pylith/pylith-2.2.0/
>>>> — Called “swig -python -c++ materials.i” in folder “build/pylith/pylith-2.2.0/modulesrc/materials”
>>>> — Called “make pylith” from “build/pylith” folder.
>>>> 
>>>> My question is if there is a way to skip explicit call of “automake” and “swig”?
>>>> 
>>>> Ehsan
>>>> 
>>>> 
>>>> 
>>>>> On Aug 4, 2017, at 3:46 PM, Matthew Knepley <knepley at rice.edu <mailto:knepley at rice.edu>> wrote:
>>>>> 
>>>>> On Fri, Aug 4, 2017 at 2:38 PM, Ehsan Haghighat <ehsanh at mit.edu <mailto:ehsanh at mit.edu>> wrote:
>>>>> Hi Brad,
>>>>> 
>>>>> What I do is similar to what is briefed in the document. However, the compilation process is still not very clear to me.
>>>>> 
>>>>> When I call ‘make’ or ‘make install’ it does not find the changes in subfolder; that’s why I call “make pylith” and then it rebuilds the pylith. However, it will not call automake or swig. Any suggestions here?
>>>>> 
>>>>> I cannot know exactly what you are doing from this description. First, show exactly what you typed. Second, show the output.
>>>>> 
>>>>>    Matt
>>>>>  
>>>>> Ehsan
>>>>> 
>>>>> 
>>>>> 
>>>>> > On Aug 4, 2017, at 1:38 PM, Brad Aagaard <baagaard at usgs.gov <mailto:baagaard at usgs.gov>> wrote:
>>>>> >
>>>>> > Ehsan,
>>>>> >
>>>>> > Please see the example for adding a material in the templates/materials directory discussed in Section 9.2 in the PyLith v2.2.0 manual.
>>>>> >
>>>>> > automake should run automatically when you run "make" in the build directory; you should not need to do it separately. Note that we have not been successful getting PyLith to run properly with SWIG versions 3.0.3 and later. See https://github.com/geodynamics/pylith/issues/28 <https://github.com/geodynamics/pylith/issues/28>.
>>>>> >
>>>>> > I highly recommend initially following the templates/materials example. If you would like to contribute the material back to PyLith, please fork from the PyLith Git repository and make a pull request.
>>>>> >
>>>>> > Regards,
>>>>> > Brad
>>>>> >
>>>>> > On 8/4/17 8:19 AM, Ehsan Haghighat wrote:
>>>>> >> I built once from the source. After that, I added a new material to
>>>>> >> libsrc/modulesrc/pylith, similar to other materials. Then I just call
>>>>> >> “make pylith” form “build/pylith” folder. Where should I call ‘make’ and
>>>>> >> ‘make install”?
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >>> On Aug 4, 2017, at 11:15 AM, Matthew Knepley <knepley at rice.edu <mailto:knepley at rice.edu>
>>>>> >>> <mailto:knepley at rice.edu <mailto:knepley at rice.edu>>> wrote:
>>>>> >>>
>>>>> >>> On Fri, Aug 4, 2017 at 8:39 AM, Ehsan Haghighat <ehsanh at mit.edu <mailto:ehsanh at mit.edu>
>>>>> >>> <mailto:ehsanh at mit.edu <mailto:ehsanh at mit.edu>>> wrote:
>>>>> >>>
>>>>> >>>    Hi,
>>>>> >>>
>>>>> >>>    I would like to extended/add some libraries to the PyLith, for
>>>>> >>>    instance a new material. Searching to find out how another
>>>>> >>>    material is implemented, I realized I need to run automake again
>>>>> >>>    to correctly reflect changes in Makefile.am. What about the
>>>>> >>>    materials_wrap.cxx? How this can be recreated? I am using the
>>>>> >>>    “swig -python materials.i”, however the generated wrapper looks
>>>>> >>>    very different from the original one. Can you please confirm the
>>>>> >>>    steps I am taking? Is there any documents to describe the steps to
>>>>> >>>    add libraries to the pylith.
>>>>> >>>
>>>>> >>>
>>>>> >>> If you want to do new development, you should be building from source.
>>>>> >>> Are you? If so, you just need to do 'make' and 'make install'.
>>>>> >>>
>>>>> >>>   Matt
>>>>> >>>
>>>>> >>>
>>>>> >>>    Thanks,
>>>>> >>>    Ehsan
>>>>> >>>
>>>>> >>>
>>>>> >>>    _______________________________________________
>>>>> >>>    CIG-SHORT mailing list
>>>>> >>>    CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org> <mailto:CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>>
>>>>> >>>    http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>>>> >>>    <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>>
>>>>> >>>
>>>>> >>>
>>>>> >>> _______________________________________________
>>>>> >>> CIG-SHORT mailing list
>>>>> >>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org> <mailto:CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>>
>>>>> >>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>>>> >>
>>>>> >
>>>>> > _______________________________________________
>>>>> > CIG-SHORT mailing list
>>>>> > CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>>>>> > http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> CIG-SHORT mailing list
>>>>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>>>>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>>>> 
>>>>> _______________________________________________
>>>>> CIG-SHORT mailing list
>>>>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>>>>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>>> 
>>>> _______________________________________________
>>>> CIG-SHORT mailing list
>>>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>>>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>>> 
>>>> _______________________________________________
>>>> CIG-SHORT mailing list
>>>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>>>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>_______________________________________________
>>> CIG-SHORT mailing list
>>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>> 
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>> 
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
> 
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
> 
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/cig-short/attachments/20170805/a635ba72/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1846 bytes
Desc: not available
URL: <http://lists.geodynamics.org/pipermail/cig-short/attachments/20170805/a635ba72/attachment-0001.bin>


More information about the CIG-SHORT mailing list