[petsc-dev] Error on large problems.

Mark Adams mfadams at lbl.gov
Mon Apr 20 05:39:34 CDT 2015


OK, so I can use %D ... done.

On Mon, Apr 20, 2015 at 12:36 AM, Jed Brown <jed at jedbrown.org> wrote:

> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150420/638fcbf6/attachment.html>


More information about the petsc-dev mailing list