[petsc-dev] new format error
Pierre Jolivet
pierre at joliv.et
Thu Jun 9 09:37:38 CDT 2022
> On 9 Jun 2022, at 4:33 PM, Mark Adams <mfadams at lbl.gov> wrote:
>
> I rebased over master and now this branch fails source code check:
>
> SETERRQ() with trailing newline ----------------------
> 1346 <https://gitlab.com/petsc/petsc/-/jobs/2569478894#L1346>src/ksp/pc/impls/amgx/amgx.cxx:169: SETERRQ(amgx->comm, PETSC_ERR_LIB, "%s\n", msg); \
>
>
> Any idea how to best fix this?
That’s pretty self-explanatory: remove the trailing \n in your error message, i.e., "%s".
Thanks,
Pierre
> Thanks
>
> // XXX Need to add call in AmgX API that gracefully destroys everything
> // without abort etc.
> #define PetscCallAmgX(rc) do { \
> AMGX_RC err = (rc); \
> char msg[4096]; \
> switch (err) { \
> case AMGX_RC_OK: \
> break; \
> default: \
> AMGX_get_error_string(err, msg, 4096); \
> SETERRQ(amgx->comm, PETSC_ERR_LIB, "%s\n", msg); \
> } \
> } while (0)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220609/16ed0930/attachment.html>
More information about the petsc-dev
mailing list