question on Warning messages

Barry Smith bsmith at mcs.anl.gov
Tue Jun 10 23:27:13 CDT 2008


    Likely you want to switch to using VecGetArrayF90() anyways. All  
Fortran
compilers are F90 now and it makes codes cleaner.

    In fact, in our next release we will make F90 support the default  
and F77
the optional.

    Barry

On Jun 10, 2008, at 5:31 PM, Satish Balay wrote:

> On Tue, 10 Jun 2008, Randall Mackie wrote:
>
>> I was running my PETSc code with -info, and I noticed a bunch of
>> warnings that said:
>>
>> Efficiency warning, copying array in XXXGetArray() due to alignment
>> differences between C and Fortran.
>>
>> My code is written in Fortran, and these must be coming from all
>> the VecGetArray calls I make, but is this a serious issue and is
>> there some way to get proper alignment between C and Fortran?
>
> The problem here is: the variable you specify for offset is not
> aligned the same way as the array. And there is no way to specify [to
> compiler] how variables should be alighned.
>
> You can use VecGetArrayF90() [with a f90 compiler] - to avoid this
> problem.
>
> Satish
>
>




More information about the petsc-users mailing list