[petsc-dev] [petsc-users] PetscPrintf

Patrick Sanan patrick.sanan at gmail.com
Thu Apr 12 03:59:57 CDT 2018


I also happened to stumble across this yesterday. Is the length restriction
for the default printer (l assume from the array of 8*1024 chars in
PetscVFPrintfDefault() ) intended behavior to be documented, or a bug to be
fixed?

2018-04-12 2:16 GMT+02:00 Rongliang Chen <rongliang.chan at gmail.com>:

> Thanks Barry. I found petsc-3.6 and older versions did not have this
> restriction.
>
> Best,
> Rongliang
>
>
> On 04/12/2018 07:22 AM, Smith, Barry F. wrote:
>
>>    Yes, PetscPrintf() and related functions have a maximum string length
>> of about 8000 characters.
>>
>>     Barry
>>
>>
>> On Apr 11, 2018, at 6:17 PM, Rongliang Chen <rongliang.chan at gmail.com>
>>> wrote:
>>>
>>> Dear All,
>>>
>>>
>>> When I tried to print a long string using PetscPrintf() I found that it
>>> truncated the string. Attached is a simple example for this (run with
>>> single processor). I used PetscPrintf() and printf() to print the same
>>> string and the printf() seems OK. I am using petsc-3.8.4.
>>>
>>>
>>> Best,
>>>
>>> Rongliang
>>>
>>> <ex111.c>
>>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20180412/c03c74a4/attachment.html>


More information about the petsc-dev mailing list