[petsc-users] Question on ksp examples ex14f.F

Danyang Su danyang.su at gmail.com
Sat May 3 20:01:35 CDT 2014


Thank, Barry. After turning off "check array bound" option, it can work 
without any problem.

Danyang
On 03/05/2014 4:48 PM, Barry Smith wrote:
> On May 3, 2014, at 2:33 PM, Danyang Su <danyang.su at gmail.com> wrote:
>
>> Hi All,
>>
>> The codes can run successfully in release mode, but in debug mode, it causes the following error.
>> forrtl: severe (408): fort: (11): Subscript #1 of the array XX has value -665625807 which is less than the lower bound of 1
>>
>> I can get rid of this error by replacing VecGetArray to VecGetArrayF90 and do not use idx in XX. The same problem exists in ltog from DMDAGetGlobalIndices().
>>
>> Is there any other way to avoid this kind of error in fortran since the release mode can run without error?
>> Is this caused by the configuration in Fortran?
>      Certain Fortran compilers add extra code which check for out of array bounds access. Found out how to turn it off your your compiler. For example https://software.intel.com/en-us/forums/topic/271337  and do some googling.
>
>     Barry
>
>> Thanks and regards,
>>
>> Danyang



More information about the petsc-users mailing list