GEOS-DEV / GEOS-DEV/GEOS

Remove `printf` usage from MPM

Open
#2,895 0 comments 0 reactions 1 assignee View on GitHub

@cmcrook5 is already working on this.

Since Dec 14, 2023.

type: cleanup / refactor type: new
Dominant language
C++
Stars
287
Forks
109
Avg merge
4d 41m
Merged PRs (30d)
5

Description

Describe the issue
printf is being used here:
https://github.com/GEOS-DEV/GEOS/blob/develop/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsMPM.cpp#L2681

(1) we should prefer to use a GEOS_LOG macro with GEOS_FMT
(2) globalIndex is assumed to be long long in the print fmt string
(3) we should avoid output in kernels, even update kernels that are currently hard-coded to run on host

Proposed cleanup
Remove output from the kernel altogether, if it is required, prefer instead flagging particles in the kernel in some fashion and printing output outside the kernel.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.