[petsc-dev] size of PetscInt without grepping include

Barry Smith bsmith at mcs.anl.gov
Tue Oct 18 18:08:24 CDT 2011


On Oct 18, 2011, at 6:03 PM, Ethan Coon wrote:

> On Tue, 2011-10-18 at 17:54 -0500, Matthew Knepley wrote:
> 
>> 
>> 
>> You would need the whole BuildSystem in order to interpret it (and
>> maybe the PETSc parts as well). 
> 
> 
> Right, which defeats the purpose of having a python module that gets
> installed with PETSc to read/write binary files from python.  
> 
> I guess the way to get this info is to parse both petscconf.h and
> petscvariables to pull out datatypes used in the binary files.  The
> matlab scripts doing binary IO require you to know this ahead of time,
> but that seems a little silly when we should be able to get this info
> from the installation.  I just assumed that all of this would be defined
> somewhere in petscvariables.

   At configure time we could generate a MATLAB and Python "include file" that defined those things in a natural way. Then the various MATLAB and Python scripts would include that one configure generated file to get the definitions directly without the need for ugly parsing of petscvariables/petscconf.h each time the scripts are run.

    Barry

> 
> Ethan
> 
>> I
>> don't think this is that bad. Python does not have the Java
>> serialization model.
>> 
>> 
>>    Matt
>> 
>> 
>>        Ethan
>> 
>> 
>> 
>>>     Matt
>>> 
>>>        Ethan
>>> 
>>>        On Tue, 2011-10-18 at 16:24 -0500, Barry Smith
>>        wrote:
>>>> PETSC_USE_64BIT_INDICES
>>>        --
>>>        ------------------------------------
>>>        Ethan Coon
>>>        Post-Doctoral Researcher
>>>        Applied Mathematics - T-5
>>>        Los Alamos National Laboratory
>>>        505-665-8289
>>> 
>>>        http://www.ldeo.columbia.edu/~ecoon/
>>>        ------------------------------------
>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> What most experimenters take for granted before they begin
>>        their
>>> experiments is infinitely more interesting than any results
>>        to which
>>> their experiments lead.
>>> -- Norbert Wiener
>> 
>>        --
>>        ------------------------------------
>>        Ethan Coon
>>        Post-Doctoral Researcher
>>        Applied Mathematics - T-5
>>        Los Alamos National Laboratory
>>        505-665-8289
>> 
>>        http://www.ldeo.columbia.edu/~ecoon/
>>        ------------------------------------
>> 
>> 
>> 
>> 
>> 
>> 
>> -- 
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which
>> their experiments lead.
>> -- Norbert Wiener
> 
> -- 
> ------------------------------------
> Ethan Coon
> Post-Doctoral Researcher
> Applied Mathematics - T-5
> Los Alamos National Laboratory
> 505-665-8289
> 
> http://www.ldeo.columbia.edu/~ecoon/
> ------------------------------------
> 




More information about the petsc-dev mailing list