I cannot remember why it is sizeof(PetscScalar) specifically. I do remember 
that having an alignment is crucial to DMNetwork and it can fail and crash if 
there is no alignment. So it is possible that the code will not work with the 
Cray compilers. 

   The attribute is checked in config/PETSc/configure.py; my guess is that 
since Cray is producing only a warning the configure check is saying that the 
attribute exists which maybe wrong in this situation. Can you take a look at 
the configure.log and see what it is reporting, or email it?

  My wild guess is that we should be turning off the attribute (during the 
configure process) for the Cray compiler to prevent generating bad code and 
crashing at run time. You could check if the DMNetwork code (possibly) works 
correctly with the Cray compiler by running the tests:

src/ksp/ksp/examples/tutorials/network/ex1.c:      requires: !complex double 
define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/ksp/ksp/examples/tutorials/network/ex1_nest.c:      requires: !complex 
double define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/ksp/ksp/examples/tutorials/network/ex2.c:      requires: !single double 
define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/ksp/ksp/examples/tutorials/network/makefile:#requiresdefine   
'PETSC_HAVE_ATTRIBUTEALIGNED'
src/snes/examples/tutorials/network/ex1.c:     requires: !complex double 
define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/snes/examples/tutorials/network/ex1.c:      requires: double !complex 
define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/snes/examples/tutorials/network/ex1.c:      requires: double !complex 
define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/snes/examples/tutorials/network/makefile:#requiresdefine   
'PETSC_HAVE_ATTRIBUTEALIGNED'
src/snes/examples/tutorials/network/power/makefile:#requiresdefine   
'PETSC_HAVE_ATTRIBUTEALIGNED'
src/snes/examples/tutorials/network/power/power.c:     requires: !complex 
double define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/snes/examples/tutorials/network/power/power.c:     requires: double 
!complex define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/snes/examples/tutorials/network/power/power.c:     requires: double 
!complex define(PETSC_HAVE_ATTRIBUTEALIGNED)
src/snes/examples/tutorials/network/power/power.h:} 
PETSC_ATTRIBUTEALIGNED(sizeof(PetscScalar));
src/snes/examples/tutorials/network/power/power.h:} 
PETSC_ATTRIBUTEALIGNED(sizeof(PetscScalar));
src/snes/examples/tutorials/network/power/power.h:} 
PETSC_ATTRIBUTEALIGNED(sizeof(PetscScalar));
src/snes/examples/tutorials/network/power/power.h:} 
PETSC_ATTRIBUTEALIGNED(sizeof(PetscScalar));

   Thanks

   Barry




> On Feb 1, 2019, at 11:47 AM, Hapla Vaclav via petsc-dev 
> <petsc-dev@mcs.anl.gov> wrote:
> 
> I've got this with Cray compiler
> 
>          CC arch-daint-cray-opt/obj/dm/impls/network/network.o
> CC-1160 craycc: WARNING File = 
> /scratch/snx3000/haplav/petsc/include/petsc/private/dmnetworkimpl.h, Line = 20
>  A reduction in alignment is ignored.
>  } PETSC_ATTRIBUTEALIGNED(sizeof(PetscScalar));
>    ^
> 
> CC-1160 craycc: WARNING File = 
> /scratch/snx3000/haplav/petsc/include/petsc/private/dmnetworkimpl.h, Line = 25
>  A reduction in alignment is ignored.
>  } PETSC_ATTRIBUTEALIGNED(sizeof(PetscScalar));
>    ^
> 
> Cray C : Version 8.7.3 
> (20180718184853_d127f1e88e6a577c0c4f008444940f2bcded38e8)
> Total warnings detected in 
> /scratch/snx3000/haplav/petsc/src/dm/impls/network/network.c: 2
> 
> 
> Is it something fixable?
> 
> Thanks
> 
> Vaclav

Reply via email to