[petsc-dev] Fwd: [petsc-maint #75297] Issue when saving an MPI dense matrix
Barry Smith
bsmith at mcs.anl.gov
Fri Jun 3 11:34:26 CDT 2011
This is a followup to the petsc-maint specifically for the petsc-developers
So it turns out that gcc has an option -Wconversion that warns one about ALL implicit conversions of sizes it does. This could be used to find all the places we pass PetscInt to MPI calls that require int but unfortunately it reports so much other stuff that it seems unusable. For example, see below.
So any suggestions on how we can make sure we fix all the passing PetscInt (64 bit) into MPI calls that expect int?
Barry
-*- mode: compilation; default-directory: "/Users/barrysmith/Src/petsc-dev/src/mat/impls/aij/mpi/" -*-
Compilation started at Fri Jun 3 11:14:21
make PETSC_DIR=/Users/barrysmith/Src/petsc-dev PETSC_ARCH=arch-64
/Users/barrysmith/Src/petsc-dev/arch-64/bin/mpicc -o mpiaij.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -Wconversion -I/Users/barrysmith/Src/petsc-dev/include -I/Users/barrysmith/Src/petsc-dev/arch-64/include -I/opt/local/include -D__INSDIR__=src/mat/impls/aij/mpi/ mpiaij.c
In file included from /Users/barrysmith/Src/petsc-dev/include/petscsys.h:372,
from /Users/barrysmith/Src/petsc-dev/include/petscis.h:7,
from /Users/barrysmith/Src/petsc-dev/include/petscvec.h:9,
from /Users/barrysmith/Src/petsc-dev/include/petscmat.h:6,
from /Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/mpi/mpiaij.h:5,
from mpiaij.c:2:
/Users/barrysmith/Src/petsc-dev/include/petscmath.h: In function 'PetscIsInfOrNanScalar':
/Users/barrysmith/Src/petsc-dev/include/petscmath.h:365: warning: passing argument 1 of '__inline_isinff' as 'float' rather than 'double' due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscmath.h:365: warning: passing argument 1 of '__inline_isnanf' as 'float' rather than 'double' due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscmath.h: In function 'PetscIsInfOrNanReal':
/Users/barrysmith/Src/petsc-dev/include/petscmath.h:368: warning: passing argument 1 of '__inline_isinff' as 'float' rather than 'double' due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscmath.h:368: warning: passing argument 1 of '__inline_isnanf' as 'float' rather than 'double' due to prototype
In file included from /Users/barrysmith/Src/petsc-dev/include/petscsys.h:1603,
from /Users/barrysmith/Src/petsc-dev/include/petscis.h:7,
from /Users/barrysmith/Src/petsc-dev/include/petscvec.h:9,
from /Users/barrysmith/Src/petsc-dev/include/petscmat.h:6,
from /Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/mpi/mpiaij.h:5,
from mpiaij.c:2:
/Users/barrysmith/Src/petsc-dev/include/petsclog.h: In function 'TypeSizeComm':
/Users/barrysmith/Src/petsc-dev/include/petsclog.h:333: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petsclog.h:333: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petsclog.h:334: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petsclog.h:334: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petsclog.h: In function 'StageLogGetCurrent':
/Users/barrysmith/Src/petsc-dev/include/petsclog.h:538: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petsclog.h:538: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petsclog.h:542: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petsclog.h:542: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
In file included from /Users/barrysmith/Src/petsc-dev/include/petscmat.h:6,
from /Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/mpi/mpiaij.h:5,
from mpiaij.c:2:
/Users/barrysmith/Src/petsc-dev/include/petscvec.h: In function 'VecSetValue':
/Users/barrysmith/Src/petsc-dev/include/petscvec.h:316: warning: passing argument 2 of 'VecSetValues' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscvec.h: In function 'VecSetValueLocal':
/Users/barrysmith/Src/petsc-dev/include/petscvec.h:456: warning: passing argument 2 of 'VecSetValuesLocal' with different width due to prototype
In file included from /Users/barrysmith/Src/petsc-dev/include/petscvec.h:490,
from /Users/barrysmith/Src/petsc-dev/include/petscmat.h:6,
from /Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/mpi/mpiaij.h:5,
from mpiaij.c:2:
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h: In function 'PetscLayoutFindOwner':
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:81: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:81: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h: In function 'VecGetArrayRead':
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:281: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:281: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h: In function 'VecRestoreArrayRead':
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:300: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:300: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h: In function 'VecGetArray':
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:320: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:320: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h: In function 'VecRestoreArray':
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:339: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:339: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:341: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:341: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h: In function 'VecStashValue_Private':
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:482: warning: passing argument 2 of 'VecStashExpand_Private' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:482: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:482: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h: In function 'VecStashValuesBlocked_Private':
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:504: warning: passing argument 2 of 'VecStashExpand_Private' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:504: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/vecimpl.h:504: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
In file included from /Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/mpi/mpiaij.h:5,
from mpiaij.c:2:
/Users/barrysmith/Src/petsc-dev/include/petscmat.h: In function 'MatSetValue':
/Users/barrysmith/Src/petsc-dev/include/petscmat.h:677: warning: passing argument 2 of 'MatSetValues' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscmat.h:677: warning: passing argument 4 of 'MatSetValues' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscmat.h: In function 'MatGetValue':
/Users/barrysmith/Src/petsc-dev/include/petscmat.h:679: warning: passing argument 2 of 'MatGetValues' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscmat.h:679: warning: passing argument 4 of 'MatGetValues' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscmat.h: In function 'MatSetValueLocal':
/Users/barrysmith/Src/petsc-dev/include/petscmat.h:681: warning: passing argument 2 of 'MatSetValuesLocal' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/petscmat.h:681: warning: passing argument 4 of 'MatSetValuesLocal' with different width due to prototype
In file included from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:5,
from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/mpi/mpiaij.h:5,
from mpiaij.c:2:
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h: In function 'MatPivotCheck_none':
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:494: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:494: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:496: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:496: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h: In function 'MatPivotCheck':
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:511: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:511: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:513: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:513: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:515: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:515: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:517: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/private/matimpl.h:517: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
In file included from /Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/mpi/mpiaij.h:5,
from mpiaij.c:2:
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h: In function 'MatSeqXAIJFreeAIJ':
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:94: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:94: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:96: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:96: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:97: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:97: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:98: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
/Users/barrysmith/Src/petsc-dev/include/../src/mat/impls/aij/seq/aij.h:98: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c: In function 'MatFindNonZeroRows_MPIAIJ':
mpiaij.c:77: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:77: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:79: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:79: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:101: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:101: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c: In function 'MatGetColumnNorms_MPIAIJ':
mpiaij.c:117: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:117: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:118: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:118: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:119: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:119: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:144: warning: passing argument 3 of 'MPI_Allreduce' with different width due to prototype
mpiaij.c:144: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:144: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:146: warning: passing argument 3 of 'MPI_Allreduce' with different width due to prototype
mpiaij.c:146: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:146: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:148: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:148: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c: In function 'MatDistribute_MPIAIJ':
mpiaij.c:176: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:176: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:177: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:177: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:178: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:178: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:180: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:180: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:184: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:184: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:185: warning: passing argument 4 of 'MatSetSizes' with different width due to prototype
mpiaij.c:185: warning: passing argument 5 of 'MatSetSizes' with different width due to prototype
mpiaij.c:185: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:185: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:186: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:186: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:187: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:187: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:188: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:188: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:189: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:189: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:196: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:196: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:202: warning: passing argument 2 of 'TypeSize' with different width due to prototype
mpiaij.c:202: warning: passing argument 2 of 'MPI_Send' with different width due to prototype
mpiaij.c:202: warning: passing argument 4 of 'MPI_Send' with different width due to prototype
mpiaij.c:202: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:202: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:205: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:205: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:206: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:206: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:207: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:207: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:219: warning: passing argument 4 of 'MPI_Send' with different width due to prototype
mpiaij.c:219: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:219: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:220: warning: passing argument 2 of 'TypeSize' with different width due to prototype
mpiaij.c:220: warning: passing argument 2 of 'MPI_Send' with different width due to prototype
mpiaij.c:220: warning: passing argument 4 of 'MPI_Send' with different width due to prototype
mpiaij.c:220: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:220: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:226: warning: passing argument 2 of 'TypeSize' with different width due to prototype
mpiaij.c:226: warning: passing argument 2 of 'MPI_Send' with different width due to prototype
mpiaij.c:226: warning: passing argument 4 of 'MPI_Send' with different width due to prototype
mpiaij.c:226: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:226: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:233: warning: passing argument 2 of 'TypeSize' with different width due to prototype
mpiaij.c:233: warning: passing argument 2 of 'MPI_Recv' with different width due to prototype
mpiaij.c:233: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:233: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:235: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:235: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:236: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:236: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:237: warning: passing argument 2 of 'TypeSize' with different width due to prototype
mpiaij.c:237: warning: passing argument 2 of 'MPI_Recv' with different width due to prototype
mpiaij.c:237: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:237: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:239: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:239: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:240: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:240: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:241: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:241: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:251: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:251: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:252: warning: passing argument 2 of 'TypeSize' with different width due to prototype
mpiaij.c:252: warning: passing argument 2 of 'MPI_Recv' with different width due to prototype
mpiaij.c:252: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:252: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:258: warning: passing argument 2 of 'MatSeqAIJSetPreallocation' with different width due to prototype
mpiaij.c:258: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:258: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:259: warning: passing argument 2 of 'MatMPIAIJSetPreallocation' with different width due to prototype
mpiaij.c:259: warning: passing argument 4 of 'MatMPIAIJSetPreallocation' with different width due to prototype
mpiaij.c:259: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:259: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:267: warning: passing argument 2 of 'MatSetValues' with different width due to prototype
mpiaij.c:267: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:267: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:271: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:271: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:273: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:273: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:274: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:274: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:281: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:281: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:285: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:285: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:289: warning: passing argument 2 of 'TypeSize' with different width due to prototype
mpiaij.c:289: warning: passing argument 2 of 'MPI_Send' with different width due to prototype
mpiaij.c:289: warning: passing argument 4 of 'MPI_Send' with different width due to prototype
mpiaij.c:289: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:289: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:295: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:295: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:296: warning: passing argument 2 of 'TypeSize' with different width due to prototype
mpiaij.c:296: warning: passing argument 2 of 'MPI_Recv' with different width due to prototype
mpiaij.c:296: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:296: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:304: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:304: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:305: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:305: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:308: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:308: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:309: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:309: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:313: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:313: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:316: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:316: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:319: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:319: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:320: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:320: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:321: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:321: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c: In function 'CreateColmap_MPIAIJ_Private':
mpiaij.c:342: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:342: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:344: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:344: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c: In function 'MatSetValuesRow_MPIAIJ':
mpiaij.c:435: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:435: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:440: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:440: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:443: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:443: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:446: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:446: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c: In function 'MatSetValues_MPIAIJ':
mpiaij.c:505: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 1 of '__builtin_expect' with different width due to prototype
mpiaij.c:505: warning: passing argument 2 of '__builtin_expect' with different width due to prototype
Begin forwarded message:
> From: Barry Smith <bsmith at mcs.anl.gov>
> Date: June 3, 2011 11:30:58 AM CDT
> To: petsc-maint <petsc-maint at mcs.anl.gov>, Simone Re <SRe at slb.com>, For users of the development version of PETSc <petsc-dev at mcs.anl.gov>
> Cc: Michele De Stefano <mstefano at milan.westerngeco.slb.com>, Federico Miorelli <FMiorelli at slb.com>, Federico Golfre' Andreasi <FAndreasi at slb.com>, Gwenola Michaud <GMichaud at slb.com>
> Subject: Re: [petsc-maint #75297] Issue when saving an MPI dense matrix
> Reply-To: petsc-maint <petsc-maint at mcs.anl.gov>
>
>
> Simone,
>
> This is because we are trying to send messages too long for MPI to handle. This is a problem for MPI for two reasons
>
> 1) MPI "count" arguments are always int, when we use 64 bit PetscInt (because of the --with-64-bit-indices PetscInt becomes long long int) this means we "may" be passing values too large as count values to MPI and because C/C++ automatically castes long long int arguments to int it ends up passing garbage values to the MPI libraries. Now I say "may" because this is only a problem if a count happens to be so large it won't fit in an int.
>
> 2) Even if the "count" values passed to MPI are correct int values, we've found that none of the MPI implementations handle "counts" correctly when they are within a factor of 4 or 8 of the largest value allowed in an int. This is because the MPI implementations improperly do things like convert from count to byte size by multiplying by sizeof(the type being passed) and store the result in an int (where it won't fit). We've harassed the MPICH folks about this but they consider it a low priority to fix.
>
> In a few places in PETSc where it uses MPI calls we have started to be very careful and make sure that we only use PetscMPIInt as count arguments to MPI calls and explicitly check that we can caste from PetscInt to PetscMPIInt and generate an error if the result won't fit. We also replace a single call to MPI_Send() and MPI_Recv() with our own routines MPILong_Send() and MPILong_Recv() that make several calls to MPI_Send() and MPI_Recv() each sufficiently small enough for MPI to handle.
> For example in MatView_MPIAIJ_Binary() we've updated the code to handle absurdly large matrices that cannot use the MPI calls directly.
>
> I will update the viewer and loader for MPIDense matrices to work correctly, but you will have to test it in petsc-dev (not petsc-3.1) Also, I have no machines with enough memory to do proper testing so you will need to test the code for me.
>
>
> Barry
>
>
>
>
> On Jun 3, 2011, at 9:31 AM, Simone Re wrote:
>
>> Dear Experts,
>> I'm facing an issue when saving an MPI dense matrix.
>>
>> My matrix has:
>>
>> - 5085 rows
>>
>> - 737352 columns
>> and the crash occurs when I run the program using 12 CPUs (for instance with 16 CPUs everything is fine).
>>
>> I built my program using both mvapich2 and Intel MPI 4 and it crashes in both cases.
>>
>> When I run my original program built against Intel MPI 4 I get the following.
>>
>> [4]PETSC ERROR: MatView_MPIDense_Binary() line 658 in src/mat/impls/dense/mpi/mpidense.c
>> [4]PETSC ERROR: MatView_MPIDense() line 780 in src/mat/impls/dense/mpi/mpidense.c
>> [4]PETSC ERROR: MatView() line 717 in src/mat/interface/matrix.c
>> [4]PETSC ERROR: ------------------------------------------------------------------------
>> [4]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
>> [4]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
>> [4]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[4]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
>> [4]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
>> [4]PETSC ERROR: to get more information on the crash.
>> [4]PETSC ERROR: --------------------- Error Message ------------------------------------
>> [4]PETSC ERROR: Signal received!
>> [4]PETSC ERROR: ------------------------------------------------------------------------
>> [4]PETSC ERROR: Petsc Release Version 3.1.0, Patch 7, Mon Dec 20 14:26:37 CST 2010
>> [4]PETSC ERROR: See docs/changes/index.html for recent updates.
>> [4]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
>> [4]PETSC ERROR: See docs/index.html for manual pages.
>> [4]PETSC ERROR: ------------------------------------------------------------------------
>> ...
>>
>> Unfortunately, when I run the sample program attached, I get the crash but I don't get the same error message.
>> I've attached also:
>>
>> - the error I get from the sample program (built using mvapich2)
>>
>> - configure.log
>>
>> - the command line I used to invoke the sample program
>>
>> Thanks and regards,
>> Simone Re
>>
>> Simone Re
>> Team Leader
>> Integrated EM Center of Excellence
>> WesternGeco GeoSolutions
>> via Celeste Clericetti 42/A
>> 20133 Milano - Italy
>> +39 02 . 266 . 279 . 246 (direct)
>> +39 02 . 266 . 279 . 279 (fax)
>> sre at slb.com<mailto:sre at slb.com>
>>
>>
>> Dear Experts,
>>
>> I’m facing an issue when saving an MPI dense matrix.
>>
>>
>>
>> My matrix has:
>>
>> - 5085 rows
>>
>> - 737352 columns
>>
>> and the crash occurs when I run the program using 12 CPUs (for instance with 16 CPUs everything is fine).
>>
>>
>>
>> I built my program using both mvapich2 and Intel MPI 4 and it crashes in both cases.
>>
>>
>>
>> When I run my original program built against Intel MPI 4 I get the following.
>>
>>
>>
>> [4]PETSC ERROR: MatView_MPIDense_Binary() line 658 in src/mat/impls/dense/mpi/mpidense.c
>>
>> [4]PETSC ERROR: MatView_MPIDense() line 780 in src/mat/impls/dense/mpi/mpidense.c
>>
>> [4]PETSC ERROR: MatView() line 717 in src/mat/interface/matrix.c
>>
>> [4]PETSC ERROR: ------------------------------------------------------------------------
>>
>> [4]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
>>
>> [4]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
>>
>> [4]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[4]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
>>
>> [4]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
>>
>> [4]PETSC ERROR: to get more information on the crash.
>>
>> [4]PETSC ERROR: --------------------- Error Message ------------------------------------
>>
>> [4]PETSC ERROR: Signal received!
>>
>> [4]PETSC ERROR: ------------------------------------------------------------------------
>>
>> [4]PETSC ERROR: Petsc Release Version 3.1.0, Patch 7, Mon Dec 20 14:26:37 CST 2010
>>
>> [4]PETSC ERROR: See docs/changes/index.html for recent updates.
>>
>> [4]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
>>
>> [4]PETSC ERROR: See docs/index.html for manual pages.
>>
>> [4]PETSC ERROR: ------------------------------------------------------------------------
>>
>> …
>>
>>
>>
>> Unfortunately, when I run the sample program attached, I get the crash but I don’t get the same error message.
>>
>> I’ve attached also:
>>
>> - the error I get from the sample program (built using mvapich2)
>>
>> - configure.log
>>
>> - the command line I used to invoke the sample program
>>
>>
>>
>> Thanks and regards,
>>
>> Simone Re
>>
>>
>>
>> Simone Re
>>
>> Team Leader
>>
>> Integrated EM Center of Excellence
>>
>>
>> WesternGeco GeoSolutions
>>
>> via Celeste Clericetti 42/A
>>
>> 20133 Milano - Italy
>>
>>
>> +39 02 . 266 . 279 . 246 (direct)
>>
>> +39 02 . 266 . 279 . 279 (fax)
>>
>> sre at slb.com
>>
>>
>>
>> <for_petsc_team.tar.bz2>
>
More information about the petsc-dev
mailing list