[petsc-dev] Type mismatch warnings

Barry Smith bsmith at petsc.dev
Fri Aug 19 14:59:01 CDT 2022



  
I think the two solutions are

1)  to have an interface for each object type (they could possibly all call the same fortran stub function (that won't have an interface definition so that the call inside the interface (for each object type) won't issue an error or warning. 

2) there is a way to use a * (I forgot the exact syntax in an interface to indicate anything can be pass through that variable) but it is not in Fortran 95 (I'm not sure when it was introduced) so it may not be portable enough.

 Barry

> On Aug 19, 2022, at 1:34 PM, Blaise Bourdin <bourdin at mcmaster.ca> wrote:
> 
> Hi,
> 
> Does anybody know if there is a magic gfortran flag to get rid of type mismatch warnings?
> These pop up when using PetscObjectSetName with two different petsc objects, for instance.
> 
> 	Warning: Type mismatch between actual argument at (1) and actual argument at (2) (TYPE(tdm)/TYPE(tpetscsf)).
> 
> Regards,
> Blaise
> 
>> Tier 1 Canada Research Chair in Mathematical and Computational Aspects of Solid Mechanics
> Professor, Department of Mathematics & Statistics
> Hamilton Hall room 409A, McMaster University
> 1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada 
> https://www.math.mcmaster.ca/bourdin | +1 (905) 525 9140 ext. 27243
> 



More information about the petsc-dev mailing list