> On Apr 7, 2018, at 11:03 PM, Rongliang Chen <rongliang.c...@gmail.com> wrote:
> 
> Hi Barry,
> 
> I tried the petsc-3.7.7 and my code works fine. Any suggestions for debug 
> this? Thanks.

   Works for 3.7.7 but not 3.8? I'm afraid you'll need to use git bisect, this 
will tell you exactly what change in PETSc breaks your code.

   Barry

> 
> Best,
> Rongliang
> 
> On 04/08/2018 11:22 AM, Smith, Barry F. wrote:
>> 
>>> On Apr 7, 2018, at 10:11 PM, Rongliang Chen <rongliang.c...@gmail.com> 
>>> wrote:
>>> 
>>> Thanks Barry! I created the ISLocalToGlobalMapping after I loaded in the 
>>> mesh and before the matrix creation. The block size for the 
>>> ISLocalToGlobalMappingCreate is 7. In my code, the mapping is already in 
>>> the form that one number per block since the petsc-3.6 requests this. So 
>>> when I updated from 3.6 to 3.8, I did not make any changes for the 
>>> ISLocalToGlobalMapping. The petsc-3.8 updated this mapping? And what should 
>>> I do for this?
>>        The block change was from 3.5 to 3.6 so I am not sure what the 
>> problem is.
>> 
>>    is your code Fortran or C?
>> 
>>    Barry
>> 
>>     It's slower but you could try to see if you can get your code working 
>> with 3.7 first to determine if the problem comes up between 3.6 and 3.7
>> 
>>> Best,
>>> Rongliang
>>> 
>>> On 04/08/2018 05:22 AM, Smith, Barry F. wrote:
>>>>> On Apr 7, 2018, at 1:57 PM, Rongliang Chen <rongliang.c...@gmail.com> 
>>>>> wrote:
>>>>> 
>>>>> Hi Barry,
>>>>> 
>>>>> Thanks for your reply. I checked the isrow with ISView (see bellow for 
>>>>> the output) and I found that the output of the 3.6 (output-3.6.txt) and 
>>>>> 3.8 (output-3.8.txt) are totally different. I do not know why. By the 
>>>>> way, the block size of my code should be 7 but the output of the isrow in 
>>>>> 3.8 shows that it is 8.
>>>>> 
>>>>> I did not set the ASM blocks by myself. I only created a local to global 
>>>>> mapping and use it to create the matrix with MatCreateBAIJ. The ASM setup 
>>>>> is done by petsc.
>>>>    There are some changes with the local to global mapping that is perhaps 
>>>> causing your difficulties. There use to be an MatSetLocalToGlobalMapping() 
>>>> and MatSetLocalToGlobalMappingBlock() they are gone and there is now a 
>>>> block size associated with the mapping. There is now one number per block 
>>>> instead of 1 number per index. Where do you get the ISLocalToGlobalMapping 
>>>> from() and what is its block size set too?
>>>> 
>>>>    Barry
>>>> 
>>>>> Best,
>>>>> Rongliang
>>>>> 
>>>>> 
>>>>> On 04/07/2018 11:20 PM, Smith, Barry F. wrote:
>>>>>>    For BAIJ matrices with ASM preconditioner the index sets that define 
>>>>>> the ASM blocks must contain all the points in a block or none of them. 
>>>>>> The code is detecting this is not the case; I don't know why this would 
>>>>>> be different between 3.8 and 3.6
>>>>>> 
>>>>>>    You can use the option -start_in_debugger and put a break point in 
>>>>>> MatCreateSubMatrix_SeqBAIJ() then do
>>>>>> 
>>>>>> call ISView(isrow,0)
>>>>>> 
>>>>>> and look at the indices printed. Do the sets of indices match the block 
>>>>>> size?
>>>>>> 
>>>>>> How do you set the ASM blocks for your code?  They must be not set 
>>>>>> correctly when bs > 1.
>>>>>> 
>>>>>> 
>>>>>>    Barry
>>>>>> 
>>>>>> Perhaps in 3.6 we did less error checking and so did not detect the 
>>>>>> error in that case.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> On Apr 7, 2018, at 12:24 AM, Rongliang Chen <rongliang.c...@gmail.com> 
>>>>>>> wrote:
>>>>>>> 
>>>>>>> Hello everyone,
>>>>>>> 
>>>>>>> 
>>>>>>> I updated my code from petsc-3.6 to petsc-3.8 and got the following 
>>>>>>> error. But it works well if I set the block size to be 1. I am solving 
>>>>>>> an unstructured mesh problem. Any suggestions for debugging this are 
>>>>>>> welcome. Thanks.
>>>>>>> 
>>>>>>> 
>>>>>>> Best,
>>>>>>> 
>>>>>>> Rongliang
>>>>>>> 
>>>>>>> 
>>>>>>> [0]PETSC ERROR: --------------------- Error Message 
>>>>>>> --------------------------------------------------------------
>>>>>>> [0]PETSC ERROR: Nonconforming object sizes
>>>>>>> [0]PETSC ERROR: Index set does not match blocks
>>>>>>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
>>>>>>> for trouble shooting.
>>>>>>> [0]PETSC ERROR: Petsc Release Version 3.8.4, Mar, 24, 2018
>>>>>>> [0]PETSC ERROR: ./HiBflow on a 64bit-debug named rongliang-chen by 
>>>>>>> rlchen Sat Apr  7 13:14:20 2018
>>>>>>> [0]PETSC ERROR: Configure options --download-mpich --download-blacs 
>>>>>>> --download-scalapack --download-metis --download-parmetis 
>>>>>>> --download-exodusii --download-netcdf --download-hdf5 
>>>>>>> --with-debugging=1 --download-fblaslapack --download-ctetgen 
>>>>>>> --with-64-bit-indices
>>>>>>> [0]PETSC ERROR: #1 MatCreateSubMatrix_SeqBAIJ() line 184 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/mat/impls/baij/seq/baij2.c
>>>>>>> [0]PETSC ERROR: #2 MatCreateSubMatrices_SeqBAIJ() line 264 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/mat/impls/baij/seq/baij2.c
>>>>>>> [0]PETSC ERROR: #3 MatCreateSubMatrices() line 6764 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/mat/interface/matrix.c
>>>>>>> [0]PETSC ERROR: #4 PCSetUp_ASM() line 326 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/ksp/pc/impls/asm/asm.c
>>>>>>> [0]PETSC ERROR: #5 PCSetUp() line 924 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/ksp/pc/interface/precon.c
>>>>>>> [0]PETSC ERROR: #6 KSPSetUp() line 381 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/ksp/ksp/interface/itfunc.c
>>>>>>> [0]PETSC ERROR: #7 KSPSolve() line 612 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/ksp/ksp/interface/itfunc.c
>>>>>>> [0]PETSC ERROR: #8 SNESSolve_NEWTONLS() line 224 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/snes/impls/ls/ls.c
>>>>>>> [0]PETSC ERROR: #9 SNESSolve() line 4131 in 
>>>>>>> /home/rlchen/soft/petsc-3.8.4/src/snes/interface/snes.c
>>>>>>> [0]PETSC ERROR: #10 TimeStep() line 1751 in 
>>>>>>> /home/rlchen/soft/3D_fluid/3DBloodFlow/Cerebral/Twolevel-3.8/HiBflow.c
>>>>>>> [0]PETSC ERROR: #11 SolveTimeDependent() line 1315 in 
>>>>>>> /home/rlchen/soft/3D_fluid/3DBloodFlow/Cerebral/Twolevel-3.8/HiBflow.c
>>>>>>> [0]PETSC ERROR: #12 JoabCtxSolve() line 263 in 
>>>>>>> /home/rlchen/soft/3D_fluid/3DBloodFlow/Cerebral/Twolevel-3.8/HiBflow.c
>>>>>>> [0]PETSC ERROR: #13 main() line 158 in 
>>>>>>> /home/rlchen/soft/3D_fluid/3DBloodFlow/Cerebral/Twolevel-3.8/HiBflow.c
>>>>>>> 
>>>>> <output-3.6.txt><output-3.8.txt>
>>> 
> 

Reply via email to