There is a python JSON package that accepts many things, so I think it 
depends on what particular object you want to save.

   Note that the JSON thing could be in addition to pickle and not save strange 
internal PETSc BuildSystem objects.

   Barry


> On Jan 9, 2025, at 4:32 PM, Matthew Knepley <knep...@gmail.com> wrote:
> 
> On Thu, Jan 9, 2025 at 3:06 PM Barry Smith <bsm...@petsc.dev 
> <mailto:bsm...@petsc.dev>> wrote:
>> 
>>   Matt,
>> 
>>      Don't pickle them up just json them up and they will be portable to all 
>> tools.
> 
> Does Python have a JSON out for all objects?
> 
>   Thanks,
> 
>     Mat
>  
>>   Barry
>> 
>> 
>>> On Jan 9, 2025, at 2:15 PM, Matthew Knepley <knep...@gmail.com 
>>> <mailto:knep...@gmail.com>> wrote:
>>> 
>>> On Thu, Jan 9, 2025 at 1:44 PM Mark Adams <mfad...@lbl.gov 
>>> <mailto:mfad...@lbl.gov>> wrote:
>>>> I would probably add: 'grep Implementation:  
>>>> ${PETSC_DIR}/${PETSC_ARCH}/llib/petsc/conf/configure.log'
>>>> to your run script.
>>>> Or something that greps on MPI: and prints the next 4 lines.
>>> 
>>> Hi Randy,
>>> 
>>> PETSc gets this info from
>>> 
>>>   ${PETSC_ARCH}/lib/petsc/conf/RDict.db
>>> 
>>> which is a pickled Python dictionary of all the configure output. I wrote 
>>> an example
>>> of pulling that data out, and _someone_ deleted it:
>>> 
>>>   
>>> https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/blob/v3.0.0/bin/configVars.py?ref_type=tags__;!!G_uCfscf7eWS!fi0gF2MPDJUgBdXt9ScHTRZ1K4OaHjMjj-bel1fwKstSXS8fJ1eHShbIMQsYPGRi4AEw1XcJjh2B0G-Al1GO918$
>>>   
>>> <https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/blob/v3.0.0/bin/configVars.py?ref_type=tags__;!!G_uCfscf7eWS!YHzfvx7POQpHGF3pPcyxIv7p4vYMjCf5LGpy_6AcyuuK8zKOIFBdFBi6ZTqOdqxqQiIA-tAS7HGoZaoqRNeq$>
>>> 
>>>   Thanks,
>>> 
>>>      Matt
>>>  
>>>> Would that work?
>>>> Mark
>>>> 
>>>> On Thu, Jan 9, 2025 at 12:23 PM Randall Mackie <rlmackie...@gmail.com 
>>>> <mailto:rlmackie...@gmail.com>> wrote:
>>>>> Dear PETSc team:
>>>>> 
>>>>> At the bottom of the configuration file, various things are printed out, 
>>>>> like the MPI implementation:
>>>>> 
>>>>> MPI:
>>>>>   Version:    3
>>>>>   mpiexec: /state/std2/openmpi-5.0.3-oneapi/bin/mpiexec
>>>>>   Implementation: openmpi
>>>>>   OMPI_VERSION: 5.0.3
>>>>>  
>>>>> We would like to pick these up and write them to our own output files.
>>>>> 
>>>>> What PETSc variables have this information? 
>>>>> 
>>>>> Especially the implementation.
>>>>> 
>>>>> 
>>>>> Thank you,
>>>>> 
>>>>> Randy M.
>>> 
>>> 
>>> 
>>> --
>>> 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
>>> 
>>> https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fi0gF2MPDJUgBdXt9ScHTRZ1K4OaHjMjj-bel1fwKstSXS8fJ1eHShbIMQsYPGRi4AEw1XcJjh2B0G-A-j1Vbqs$
>>>   
>>> <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!YHzfvx7POQpHGF3pPcyxIv7p4vYMjCf5LGpy_6AcyuuK8zKOIFBdFBi6ZTqOdqxqQiIA-tAS7HGoZTlw8ELe$>
>> 
> 
> 
> 
> --
> 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
> 
> https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fi0gF2MPDJUgBdXt9ScHTRZ1K4OaHjMjj-bel1fwKstSXS8fJ1eHShbIMQsYPGRi4AEw1XcJjh2B0G-A-j1Vbqs$
>   
> <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fi0gF2MPDJUgBdXt9ScHTRZ1K4OaHjMjj-bel1fwKstSXS8fJ1eHShbIMQsYPGRi4AEw1XcJjh2B0G-AQAtVvk0$
>  >

Reply via email to