| 48afe810 | 21-Sep-2019 |
Satish Balay <balay@mcs.anl.gov> |
fix compile error
/usr/home/glci/builds/kbKx1xLp/0/petsc/petsc/src/dm/impls/plex/plex.c: In function 'PetscErrorCode DMPlexCheckCellShape(DM, PetscBool, PetscReal)': /usr/home/glci/builds/kbKx1xLp/0
fix compile error
/usr/home/glci/builds/kbKx1xLp/0/petsc/petsc/src/dm/impls/plex/plex.c: In function 'PetscErrorCode DMPlexCheckCellShape(DM, PetscBool, PetscReal)': /usr/home/glci/builds/kbKx1xLp/0/petsc/petsc/src/dm/impls/plex/plex.c:7200:78: error: invalid cast from type 'PetscScalar' {aka 'std::complex<double>'} to type 'double' ierr = PetscSynchronizedPrintf(comm, "%g", (double) coords[i*cdim+d]);CHKERRQ(ierr); ^
show more ...
|
| fc02256f | 12-Sep-2019 |
Lawrence Mitchell <lawrence@wence.uk> |
plex: Fix voting scheme in point sf creation when rebalancing
We previously used a two-round system when using random shifts to compute point ownership. This, however, could result in incorrect resu
plex: Fix voting scheme in point sf creation when rebalancing
We previously used a two-round system when using random shifts to compute point ownership. This, however, could result in incorrect results if the vote from two different ranks happened to coincide. At which point the second entry being compared acts a tie-breaker with the MPI standard requiring that the minimum value wins.
Consider an SF:
PetscSF Object: 2 MPI processes type: basic sort=rank-order [0] Number of roots=1, leaves=1, remote ranks=1 [0] 0 <- (0,0) [1] Number of roots=1, leaves=1, remote ranks=1 [1] 0 <- (0,0)
If we reduce with MAXLOC where the leafdata is:
Rank 0:
(1, 5)
Rank 1:
(1, 4)
We end up with
(1, 4) in the rootdata on rank 0.
Now to determine the correct rank, we do a subsequence reduce with MAXLOC where now the leaf data is:
Rank 0:
(1, 0)
Rank 1:
(1, 1)
And end up with
(1, 0) in the rootdata on rank 0.
We therefore construct the incorrect entry:
(0, 4)
Rather than either (0, 5) or (1, 4).
The solve this, do the reduction in one go on a 3-tuple of integers, carrying both the rank and index we will select.
show more ...
|