[petsc-users] VecGetArrayReadF90 with gfortran
Samuel Lanthaler
s.lanthaler at gmail.com
Fri Mar 23 10:37:02 CDT 2018
Thanks for your answers.
@Timothee: I think normally, it should be fine to use the pointer like
an array. At least, I have done the same in some other cases. But I can
try anyways.
@Barry: Replacing the copy by a for-loop does not seem to help in this
case: the output pointer has LBOUND=1 and UBOUND=0, SIZE=0, so that
trying to access any index leads to a segfault.
On 03/23/2018 04:30 PM, Smith, Barry F. wrote:
> Use a loop to do the copy
>
> At line 127 of file allreduce.f90
> Fortran runtime error: Array bound mismatch for dimension 1 of array 'copy_buffer' (10/0)
>
>
>
>> On Mar 23, 2018, at 9:10 AM, Samuel Lanthaler <s.lanthaler at gmail.com> wrote:
>>
>> Hi all,
>>
>> I am having trouble using the function VecGetArrayReadF90 under gfortran. I have created a minimal example and put it in the attachment. Basically, it appears that the input pointer is empty upon return from VecGetArrayReadF90. The code runs fine, when compiled with ifort, so I don't know what's going on.
>>
>> I am attaching the code and makefile that I used, as well as the command line output that I can see. Though the errors are just to do with the fact that the output pointer is empty, so the command line output is not all that helpful...
>>
>> Thanks in advance for your help!
>> Sam
>> <output.txt><makefile><allreduce.f90>
More information about the petsc-users
mailing list