[CIG-SHORT] compiling PyLith

Brad Aagaard baagaard at usgs.gov
Wed Jul 2 18:28:43 PDT 2014


Antonio,

PyLith outputs the state variables for each material separately. This is 
the only way it makes sense, because different materials (bulk 
constitutive models) can have different state variables. If your domain 
is all of the same material (bulk constitutive model), then just use a 
single material. Variations in the parameters of the constitutive model 
should be done using a spatial database.

Regards,
Brad


On 7/2/14, 6:13 PM, Antonio Pio Rinaldi wrote:
> Hi Brad,
>
> I think I will do as you suggested.
> however I'm having trouble with getting the output via the material state variables.
> How can I get an output for all the cell regardless the material?
>
> the user guide tutorials only refer to the cases where one get the output for each of the assigned materials.
>
> Thanks a lot for your help,
> Antonio
>
> On Jun 30, 2014, at 5:20 PM, Brad Aagaard wrote:
>
>> On 06/29/2014 08:36 PM, Antonio Pio Rinaldi wrote:
>>> Brad,
>>>
>>> what I would like to is reading an external (ascii) file that
>>> contains information such as stress and or strain for each cell of
>>> the mesh (or for each grid point, although I would prefer cell), then
>>> perform calculation with Pylith (mechanical equilibrium, and or if
>>> fault reactivates with the provided stress block by block), and
>>> finally I would like Pylith to provide me a similar file with
>>> stresses and strain again for each block.
>>
>> Reading initial stresses and strains and outputting them are all available in the code. The input is in the form of spatial databases and the output is via the material state variables. Both are done at the quadrature points of a cell.
>>
>>> The final goal is to link Pylith with an external code, I was
>>> thinking that I could use some Python/Matlab script to do what I
>>> need, but if I can learn how to slightly modify Pylith would be just
>>> better for future implementation (e.g. improving performance by
>>> sharing memory instead of files).
>>
>> You are correct that this is more efficient and would require extending the code, which means you would need to build from source. I suggest you try the file approach first to see how much of a bottleneck it is before having to write your own code. Note that because we use PETSc DMPlex objects to store the mesh and vectors, the PETSc readers and viewers provide an easy way to read and dump raw data.
>>
>> Regads,
>> Brad
>>
>>> On Jun 30, 2014, at 5:02 AM, Brad Aagaard wrote:
>>>
>>>> Antonio,
>>>>
>>>> There is a chance you don't need to modify files. Can you explain
>>>> what you want to do?
>>>>
>>>> Regards, Brad
>>>>
>>>>
>>>> On 6/29/14, 11:52 AM, Antonio Pio Rinaldi wrote:
>>>>> Hi Brad,
>>>>>
>>>>> thanks for the reply. I have been running the examples using the
>>>>> binary and everything is fine, however I would need to modify
>>>>> some .cc and .py files for my research, and to do so I guess I
>>>>> would need to recompile the code.
>>>>>
>>>>> Is there a way to do some simply recompiling the binary, or do I
>>>>> have to recompile the source?
>>>>>
>>>>> Best regards, Antonio
>>>>>
>>>>> On Jun 29, 2014, at 8:46 PM, Brad Aagaard wrote:
>>>>>
>>>>>> Antonio,
>>>>>>
>>>>>> We highly recommend new users install via the binary until they
>>>>>> are comfortable using PyLith.  You do not need to run
>>>>>> "configure" if you use the binary. Simply untar the tarball and
>>>>>> run "source setup.sh" at the top level PyLith directory. See
>>>>>> the installation instructions in the PyLith manual for
>>>>>> details.
>>>>>>
>>>>>> Regards, Brad
>>>>>>
>>>>>>
>>>>>> On 6/28/14, 6:24 PM, Antonio Pio Rinaldi wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm totally new to PyLith, and before starting I already
>>>>>>> have problems compiling and installing the program on my mac
>>>>>>> 10.6.
>>>>>>>
>>>>>>> First of all I tried to use the binary files, but I'm not
>>>>>>> able to run the "configure" in the folder "src" (several
>>>>>>> errors, configure basically not able to locate the installed
>>>>>>> compilers, python, etc) What I would like to do is to modify
>>>>>>> some .cc files and recompile.
>>>>>>>
>>>>>>> I figured it out that maybe I needed to install from source
>>>>>>> using the installer provided on the website.
>>>>>>>
>>>>>>> But unfortunately (even though I followed all the
>>>>>>> instruction) I'm always getting errors. The installer
>>>>>>> correctly run the "configure" file (the one in the folder
>>>>>>> "build/pylith" as suggested), then after make it correctly
>>>>>>> install gcc, python, and some others, but it gets stuck while
>>>>>>> installing hdf5 with this error while running configure:
>>>>>>>
>>>>>>> "checking for Fortran flag to compile .f90 files... unknown
>>>>>>> configure: error: Fortran could not compile .f90 files"
>>>>>>>
>>>>>>> I tried to ignore this checking by changing a little the
>>>>>>> configure file for hdf5 (I know I was not suppose to change
>>>>>>> it, but I wanted to try) and in the end it runs correctly
>>>>>>> and installs hdf5.
>>>>>>>
>>>>>>> But again I got some other problems when trying to install
>>>>>>> netcdf (always while running configure).
>>>>>>>
>>>>>>> FULL DEFAULT (I didn't change it) COMMAND: ./configure
>>>>>>> --prefix=/Users/rinaldi/Desktop/pylith2/pylith
>>>>>>> CPPFLAGS="-I/Users/rinaldi/Desktop/pylith2/pylith/include "
>>>>>>> LDFLAGS="-L/Users/rinaldi/Desktop/pylith2/pylith/lib "
>>>>>>> CFLAGS="-g -O2" CXXFLAGS="-g -O2 -DMPICH_IGNORE_CXX_SEEK"
>>>>>>> FCFLAGS="" CC=mpicc CXX=mpicxx FC=mpif90 --enable-shared
>>>>>>> --disable-static --enable-netcdf-4 --disable-dap
>>>>>>>
>>>>>>> ERROR:
>>>>>>>
>>>>>>> checking for C-equivalent to Fortran routine "SUB"...
>>>>>>> configure: error: Could not compile conftest.f
>>>>>>>
>>>>>>> Can you help me with this?
>>>>>>>
>>>>>>> Thanks in advance, Best regards, Antonio Pio Rinaldi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Antonio Pio Rinaldi, PhD Postdoctoral Fellow, Earth Sciences
>>>>>>> Division Lawrence Berkeley National Laboratory 1 Cyclotron
>>>>>>> Rd., Mail Stop 74-0120 Berkeley, CA 94720, USA
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________ CIG-SHORT
>>>>>>> mailing list CIG-SHORT at geodynamics.org
>>>>>>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>>>>>
>>>
>>
>
>



More information about the CIG-SHORT mailing list