Re: [petsc-dev] cray warning - reduction in alignment ignored

2019-02-01 Thread Smith, Barry F. via petsc-dev


   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 
>  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



[petsc-dev] cray warning - reduction in alignment ignored

2019-02-01 Thread Hapla Vaclav via petsc-dev
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

Re: [petsc-dev] is DMSetDS not in master?

2019-02-01 Thread Mark Adams via petsc-dev
OK, it's not in Changes and there is one comment to it.

On Fri, Feb 1, 2019 at 10:50 AM Matthew Knepley  wrote:

> I removed it, since no one should use it anymore. You use
> DMSetField()+DMCreateDS() instead.
>
>   THanks,
>
> Matt
>
> On Fri, Feb 1, 2019 at 10:38 AM Mark Adams via petsc-dev <
> petsc-dev@mcs.anl.gov> wrote:
>
>> 10:37 master= ~/Codes/petsc$ git grep DMSetDS
>> src/dm/interface/dm.c:.seealso: DMGetDS(), DMSetDS()
>> 10:37 master= ~/Codes/petsc$
>>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/
> 
>


Re: [petsc-dev] is DMSetDS not in master?

2019-02-01 Thread Matthew Knepley via petsc-dev
I removed it, since no one should use it anymore. You use
DMSetField()+DMCreateDS() instead.

  THanks,

Matt

On Fri, Feb 1, 2019 at 10:38 AM Mark Adams via petsc-dev <
petsc-dev@mcs.anl.gov> wrote:

> 10:37 master= ~/Codes/petsc$ git grep DMSetDS
> src/dm/interface/dm.c:.seealso: DMGetDS(), DMSetDS()
> 10:37 master= ~/Codes/petsc$
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ 


[petsc-dev] is DMSetDS not in master?

2019-02-01 Thread Mark Adams via petsc-dev
10:37 master= ~/Codes/petsc$ git grep DMSetDS
src/dm/interface/dm.c:.seealso: DMGetDS(), DMSetDS()
10:37 master= ~/Codes/petsc$