[petsc-dev] GCC8 Fortran length changes from int to size_t
Smith, Barry F.
bsmith at mcs.anl.gov
Mon May 7 10:54:02 CDT 2018
> On May 7, 2018, at 3:56 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>
> On Mon, 7 May 2018 at 03:11, Jed Brown <jed at jedbrown.org> wrote:
>
>> Lisandro Dalcin <dalcinl at gmail.com> 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 BIND(C) interface?
>>>
>>>> The latter. Usage should not change for existing Fortran users.
>>>
>>> Things may end up being involved anyway, even if using ISO_C_BINDINGS.
>>>
>>> http://fortranwiki.org/fortran/show/Generating+C+Interfaces#strings
>
>> I guess I don't understand. Are you concerned about the string copying?
>> Note that FIXCHAR (used in current interfaces) allocates memory.
>
> Well, no, my point is that an automatic interface generator based on
> ISO_C_BINDINGS (as Barry wanted) may prove slightly harder to implement
> than expected.
I see no benefit in using the ISO_C_BINDINGS for the Fortran functions with char * arguments either automatically or manually so let's stick to the current model.
Barry
>
>
> --
> Lisandro Dalcin
> ============
> Research Scientist
> Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
> Extreme Computing Research Center (ECRC)
> King Abdullah University of Science and Technology (KAUST)
> http://ecrc.kaust.edu.sa/
>
> 4700 King Abdullah University of Science and Technology
> al-Khawarizmi Bldg (Bldg 1), Office # 0109
> Thuwal 23955-6900, Kingdom of Saudi Arabia
> http://www.kaust.edu.sa
>
> Office Phone: +966 12 808-0459
More information about the petsc-dev
mailing list