Re: [petsc-users] MatConvert changes distribution of local rows

2023-01-13 Thread Marius Buerkle
Hi,

 

Ok thanks for clarifying. 

 

It seems to work for the other mattypes at least with the lastest 3.18 version. I think i had the problem with come older version, but i can't remember the version number.

 

best and thanks,

marius

 
 

Gesendet: Freitag, 13. Januar 2023 um 17:25 Uhr
Von: "Pierre Jolivet" 
An: "Marius Buerkle" 
Cc: petsc-users@mcs.anl.gov
Betreff: Re: [petsc-users] MatConvert changes distribution of local rows


 
 

On 13 Jan 2023, at 9:18 AM, Marius Buerkle  wrote:
 




Matrix types is from MATMPIDENSE to MATSCALAPACK,





 

OK, that’s not possible, because PETSc and ScaLAPACK use different distributions for dense matrices.

 





but I think it happens also for other matrix types IIRC.





 

Which one?

 

Thanks,

Pierre

 






  

Gesendet: Freitag, 13. Januar 2023 um 16:58 Uhr
Von: "Pierre Jolivet" 
An: "Marius Buerkle" 
Cc: petsc-users@mcs.anl.gov
Betreff: Re: [petsc-users] MatConvert changes distribution of local rows


 


On 13 Jan 2023, at 8:49 AM, Marius Buerkle  wrote:
 




Hi,

 

I have a matrix A for which I defined the number of local rows per process manually using MatSetSizes. When I use MatConvert to change the matrix type it changes the number of local rows (to what one would get if MatSetSize is called with PETSC_DECIDE for number of local rows), which causes problems when doing MatVec producs and stuff like that. Is there any way to preserve the the number of local rows when using MatConvert?





 

This is most likely a bug, it’s not handled properly in some MatConvert() implementations.

Could you please share either the matrix types or a minimal working example?

 

Thanks,

Pierre

 





 

Best,

Marius






















Re: [petsc-users] MatConvert changes distribution of local rows

2023-01-13 Thread Pierre Jolivet


> On 13 Jan 2023, at 9:18 AM, Marius Buerkle  wrote:
> 
> Matrix types is from MATMPIDENSE to MATSCALAPACK,

OK, that’s not possible, because PETSc and ScaLAPACK use different 
distributions for dense matrices.

> but I think it happens also for other matrix types IIRC.

Which one?

Thanks,
Pierre

>   
> Gesendet: Freitag, 13. Januar 2023 um 16:58 Uhr
> Von: "Pierre Jolivet" 
> An: "Marius Buerkle" 
> Cc: petsc-users@mcs.anl.gov
> Betreff: Re: [petsc-users] MatConvert changes distribution of local rows
>  
> On 13 Jan 2023, at 8:49 AM, Marius Buerkle  wrote:
>  
> Hi,
>  
> I have a matrix A for which I defined the number of local rows per process 
> manually using MatSetSizes. When I use MatConvert to change the matrix type 
> it changes the number of local rows (to what one would get if MatSetSize is 
> called with PETSC_DECIDE for number of local rows), which causes problems 
> when doing MatVec producs and stuff like that. Is there any way to preserve 
> the the number of local rows when using MatConvert?
>  
> This is most likely a bug, it’s not handled properly in some MatConvert() 
> implementations.
> Could you please share either the matrix types or a minimal working example?
>  
> Thanks,
> Pierre
>  
>  
> Best,
> Marius



Re: [petsc-users] MatConvert changes distribution of local rows

2023-01-13 Thread Marius Buerkle
Matrix types is from MATMPIDENSE to MATSCALAPACK, but I think it happens also for other matrix types IIRC.

 
 

Gesendet: Freitag, 13. Januar 2023 um 16:58 Uhr
Von: "Pierre Jolivet" 
An: "Marius Buerkle" 
Cc: petsc-users@mcs.anl.gov
Betreff: Re: [petsc-users] MatConvert changes distribution of local rows


 


On 13 Jan 2023, at 8:49 AM, Marius Buerkle  wrote:
 




Hi,

 

I have a matrix A for which I defined the number of local rows per process manually using MatSetSizes. When I use MatConvert to change the matrix type it changes the number of local rows (to what one would get if MatSetSize is called with PETSC_DECIDE for number of local rows), which causes problems when doing MatVec producs and stuff like that. Is there any way to preserve the the number of local rows when using MatConvert?





 

This is most likely a bug, it’s not handled properly in some MatConvert() implementations.

Could you please share either the matrix types or a minimal working example?

 

Thanks,

Pierre

 





 

Best,

Marius












Re: [petsc-users] MatConvert changes distribution of local rows

2023-01-12 Thread Pierre Jolivet

> On 13 Jan 2023, at 8:49 AM, Marius Buerkle  wrote:
> 
> Hi,
>  
> I have a matrix A for which I defined the number of local rows per process 
> manually using MatSetSizes. When I use MatConvert to change the matrix type 
> it changes the number of local rows (to what one would get if MatSetSize is 
> called with PETSC_DECIDE for number of local rows), which causes problems 
> when doing MatVec producs and stuff like that. Is there any way to preserve 
> the the number of local rows when using MatConvert?

This is most likely a bug, it’s not handled properly in some MatConvert() 
implementations.
Could you please share either the matrix types or a minimal working example?

Thanks,
Pierre

>  
> Best,
> Marius



[petsc-users] MatConvert changes distribution of local rows

2023-01-12 Thread Marius Buerkle
Hi,

 

I have a matrix A for which I defined the number of local rows per process manually using MatSetSizes. When I use MatConvert to change the matrix type it changes the number of local rows (to what one would get if MatSetSize is called with PETSC_DECIDE for number of local rows), which causes problems when doing MatVec producs and stuff like that. Is there any way to preserve the the number of local rows when using MatConvert?

 

Best,

Marius