Dear gdb group:
I am a new user of gdb. I have a stupid problems. When I set breakpoint in
my program, it seems that I can only set at the function. When I set in a line
of my code, it won't stop.For example, I can set the break point at
MatGetOwnershipRange(by break MatGetOwnershipRange), but if I want to stop at
do 10, II=Istart+1,Iend by (break do 10, II=Istart+1,Iend), it won't stop there.
i1 = 1
m = NN
n = NN
five = 27
call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-m',m,flg,ierr)
call PetscOptionsGetInt(PETSC_NULL_CHARACTER,'-n',n,flg,ierr)
call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
call MatCreate(PETSC_COMM_WORLD,A,ierr)
call MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n,ierr)
call MatSetType(A, MATAIJ,ierr)
call MatSetFromOptions(A,ierr)
call MatMPIAIJSetPreallocation(A,five,PETSC_NULL_INTEGER,five,
&
& PETSC_NULL_INTEGER,ierr)
call MatSeqAIJSetPreallocation(A,five,PETSC_NULL_INTEGER,ierr)
call MatGetOwnershipRange(A,Istart,Iend,ierr)
do 10, II=Istart+1,Iend
ROW_NUM=SPAI(II+1)-SPAI(II)
ALLOCATE(NCOL_PERROW(ROW_NUM),VALUE_PERROW(ROW_NUM))
KVAL_START=SPAI(II)
KVAL_END=SPAI(II+1)-1
NCOL_PERROW=SPAJ(KVAL_START:KVAL_END)
VALUE_PERROW=SPAA(KVAL_START:KVAL_END)
call
MatSetValues(A,i1,II-1,ROW_NUM,NCOL_PERROW,VALUE_PERROW,INSERT_VALUES,ierr)
DEALLOCATE(NCOL_PERROW,VALUE_PERROW)
10 continue
Another problem is that when I stop at MatGetOwnershipRange, I want to see the
value of i1 by print i1, it shows No symbol "i1" in current context.