On Oct 31, 2012, at 9:38 AM, Dmitri Gribenko wrote:

>> The rationale here is that correct MPI applications should not need to add 
>> any extra compiler files to compile without warnings.
> 
> I would disagree with this.  Compiler warnings are most useful when
> they are on by default.  Only a few developers will turn on a warning
> because warnings are hard to discover and enabling a warning requires
> an explicit action from the developer.

Understood, but:

a) MPI explicitly allows this kind of deliberate mismatch.  It does not make 
sense to warn for things that are correct in MPI.

b) Warnings are significantly less useful if the user looks at them and says, 
"the compiler is wrong; I know that MPI says that this deliberate mismatch in 
my code is ok."

c) as such, these warnings are really only useful for the application where 
type/MPI_Datatype matching is expected/desired.  

Can these warnings be enabled as part of the warnings rollup -Wall option?  
That would be an easy way to find/enable these warnings.

> The pattern you described is an important one, but most MPI
> applications will have matching buffer types/type tags.  

I agree that most applications *probably* don't do this.  But significant 
developer in this community (i.e., Sandia) has at least multiple applications 
that *do* do it.  I can't ignore that.  :-(

> Applications
> that use code like that can disable the warning or silence it.
> 
> If the pattern you describe is extremely frequent, we could disable
> checking for 'char *' buffer type, just like for 'void *'.
> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to