Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-07 Thread Smith, Barry F.
> On May 7, 2018, at 3:56 AM, Lisandro Dalcin wrote: > > On Mon, 7 May 2018 at 03:11, Jed Brown wrote: > >> Lisandro Dalcin writes: > > How do you exactly want to implement that? Totally replace these > special functions with

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-07 Thread Lisandro Dalcin
On Mon, 7 May 2018 at 03:11, Jed Brown wrote: > Lisandro Dalcin writes: > >> > How do you exactly want to implement that? Totally replace these > >> > special functions with the BIND(C) interface that calls directly the C > >> > function, or rather

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-06 Thread Jed Brown
Lisandro Dalcin writes: >> > How do you exactly want to implement that? Totally replace these >> > special functions with the BIND(C) interface that calls directly the C >> > function, or rather generate a native Fortran subroutine that calls >> > the C function through a

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-06 Thread Lisandro Dalcin
On Thu, 3 May 2018 at 20:21, Jed Brown wrote: > Lisandro Dalcin writes: > > On 3 May 2018 at 18:50, Smith, Barry F. wrote: > >> > >>Jeff, (and others), > >> > >> Do you know of a tool that can take a C prototype and

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-04 Thread Jed Brown
Jed Brown writes: > Huh? Or a test that uses enough arguments to not pass in registers if > you insist on creating a test failure. Alternatively, do what the > documentation says. If you doubt the documentation, we can check the > assembly. > > $ cat stringarg.f

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-03 Thread Jeff Hammond
Yes. John Linford (formerly of ParaTools, Inc. aka TAU team, now at ARM) developed such a thing for OpenSHMEM. Jeff -- Forwarded message -- I've written a Fortran bindings generator that uses ISO_C_BINDING to link a Fortran code to any SHMEM implementation with C linkage:

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-03 Thread Jed Brown
Lisandro Dalcin writes: > On 3 May 2018 at 18:50, Smith, Barry F. wrote: >> >>Jeff, (and others), >> >> Do you know of a tool that can take a C prototype and automatically >> generate the Fortran C binding interface definition? We currently

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-03 Thread Lisandro Dalcin
On 3 May 2018 at 18:50, Smith, Barry F. wrote: > >Jeff, (and others), > > Do you know of a tool that can take a C prototype and automatically > generate the Fortran C binding interface definition? We currently generate > stubs for C functions that have character

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-03 Thread Smith, Barry F.
Jeff, (and others), Do you know of a tool that can take a C prototype and automatically generate the Fortran C binding interface definition? We currently generate stubs for C functions that have character arguments manually and it would be great to remove that manual step. Thanks

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jed Brown
I think we still have to support some laggard compilers, but also, Fortran compilation is dog slow. Just compiling the interfaces takes as long as compiling all the C in PETSc (including Fortran stubs). Jeff Hammond writes: > Or you could just use ISO_C_BINDING. Decent

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jeff Hammond
Or you could just use ISO_C_BINDING. Decent compilers should support it. On Wed, May 2, 2018 at 8:56 AM, Jed Brown wrote: > See Fortran Language Issues. > > https://gcc.gnu.org/gcc-8/porting_to.html > > We'll have to test for this (probably compiler version) and change the

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jed Brown
Huh? Or a test that uses enough arguments to not pass in registers if you insist on creating a test failure. Alternatively, do what the documentation says. If you doubt the documentation, we can check the assembly. $ cat stringarg.f

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jed Brown
Matthew Knepley writes: > On Wed, May 2, 2018 at 1:14 PM, Jed Brown wrote: > >> Matthew Knepley writes: >> >> > On Wed, May 2, 2018 at 12:15 PM, Jed Brown wrote: >> > >> >> Lisandro Dalcin writes:

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Matthew Knepley
On Wed, May 2, 2018 at 1:14 PM, Jed Brown wrote: > Matthew Knepley writes: > > > On Wed, May 2, 2018 at 12:15 PM, Jed Brown wrote: > > > >> Lisandro Dalcin writes: > >> > >> > On Wed, 2 May 2018 at 17:29, Satish Balay

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jed Brown
Matthew Knepley writes: > On Wed, May 2, 2018 at 12:15 PM, Jed Brown wrote: > >> Lisandro Dalcin writes: >> >> > On Wed, 2 May 2018 at 17:29, Satish Balay wrote: >> > >> >> So we need a 64bit arm with gcc8 - for this

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Matthew Knepley
On Wed, May 2, 2018 at 12:15 PM, Jed Brown wrote: > Lisandro Dalcin writes: > > > On Wed, 2 May 2018 at 17:29, Satish Balay wrote: > > > >> So we need a 64bit arm with gcc8 - for this testcase failure? > > > > > > Or a big-endian

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jed Brown
Lisandro Dalcin writes: > On Wed, 2 May 2018 at 17:29, Satish Balay wrote: > >> So we need a 64bit arm with gcc8 - for this testcase failure? > > > Or a big-endian machine/OS ? Shouldn't be necessary, but why are we so concerned about making a test case

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Lisandro Dalcin
On Wed, 2 May 2018 at 17:29, Satish Balay wrote: > So we need a 64bit arm with gcc8 - for this testcase failure? Or a big-endian machine/OS ? -- Lisandro Dalcin Research Scientist Computer, Electrical and Mathematical Sciences & Engineering (CEMSE) Extreme

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Satish Balay
So we need a 64bit arm with gcc8 - for this testcase failure? Satish On Wed, 2 May 2018, Jed Brown wrote: > On x86-64 Linux, the first six integer arguments are passed in registers > (rdi, rsi, rdx, rcx, r8, r9). Multiple smaller integers are not packed > into these registers, but they are

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jed Brown
On x86-64 Linux, the first six integer arguments are passed in registers (rdi, rsi, rdx, rcx, r8, r9). Multiple smaller integers are not packed into these registers, but they are accessed as 32-bit (edi, ...). Satish Balay writes: > Well it should atleast bite for functions

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Satish Balay
Well it should atleast bite for functions that have 2 char arguments. Perhaps none of the tests are using these routines.. Satish On Wed, 2 May 2018, Jed Brown wrote: > Is the length passed in registers and incorrectly using the lower half > of the register provides the int part? > > Satish

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jed Brown
Is the length passed in registers and incorrectly using the lower half of the register provides the int part? Satish Balay writes: > hm - I have gfortran-8 on my laptop - but haven't seen any testsuite > regressions due to this change. > > Satish > > On Wed, 2 May 2018, Jed

Re: [petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Satish Balay
hm - I have gfortran-8 on my laptop - but haven't seen any testsuite regressions due to this change. Satish On Wed, 2 May 2018, Jed Brown wrote: > See Fortran Language Issues. > > https://gcc.gnu.org/gcc-8/porting_to.html > > We'll have to test for this (probably compiler version) and

[petsc-dev] GCC8 Fortran length changes from int to size_t

2018-05-02 Thread Jed Brown
See Fortran Language Issues. https://gcc.gnu.org/gcc-8/porting_to.html We'll have to test for this (probably compiler version) and change the PETSC_MIXED_LEN / PETSC_END_LEN to use size_t instead of int.