[petsc-dev] Error on large problems.

Jed Brown jed at jedbrown.org
Sun Apr 19 23:36:57 CDT 2015


Barry Smith <bsmith at mcs.anl.gov> writes:

>> On Apr 19, 2015, at 3:54 PM, Mark Adams <mfadams at lbl.gov> wrote:
>> 
>> 
>> 
>> On Tue, Apr 7, 2015 at 12:56 AM, Barry Smith <bsmith at mcs.anl.gov> wrote: 
>>
>>   Note that in maint all your verbose printf used %d which gives nonsense for 64 bit integers so is unreliable. For example N=0
>> 
>> Is there a way to fix this?  %ld?
>
>   Not portable.

inttypes.h defines the macro PRId64 (and many related) that expand to
correctly print int64_t.  PetscPrintf translates %D so you don't need to
use the inttypes.h macros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150419/a7878a06/attachment.sig>


More information about the petsc-dev mailing list