cg: factorize code between MPI and non-MPI versions

3 jobs for !15 with distributed-cg in 26 minutes and 26 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Build
passed #992234
build

00:06:50

 
  Deploy
failed #992235
check

00:05:11

canceled #992236
simgrid

00:14:23

 
Name Stage Failure
failed
check Deploy
FAIL: implicit_stencil
+ uname -a
+ echo Running on Linux starpu-debian10amd64 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
Running on Linux starpu-debian10amd64 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
+ wc -l
+ grep ^FAIL: ../check_766
+ exit 77
Cleaning up file based variables
ERROR: Job failed: exit status 1