ScaLAPACK Archives

[Scalapack] Bug in BLACS with return datatypes

Hey guys, 

I think I found an original 1996 bug :)

The following functions in BLACS return a "non integer" datatype. Now the 
problem is that BLACS doesn't have a .h file, so basically all functions are 
automatically inferred to be "int func(int)". This has worked in the past 
because most of the time the returned datatype was int compatible. This is not 
the case anymore (in particular in Open MPI, MPI_Comm is a pointer (64bit) and 
therefore doesn't fit in a 32bit int.

MPI_Datatype GetMpiGetType()
MPI_Datatype GetMpiGetType()
MPI_Comm Cblacs2Sys_handle()
double Cdwalltime00() 

There are several possible course of action from there.
1. Have all functions have a prototype in Bdef.h, that would solve all the bugs 
internal to Scalapack, but would still leave users vulnerable.
2. Change the prototypes so that instead of return values, they are passed as 
pointer arguments. Could break backward compatibility.
3. Have Blacks/Scalapack show a full .h API file to users (in a sense, a public 

I have done the Bdef.h fix. If you are interested I can contribute it. 


* Dr. Aur?lien Bouteiller
* Researcher at Innovative Computing Laboratory
* University of Tennessee
* 1122 Volunteer Boulevard, suite 309b
* Knoxville, TN 37996
* 865 974 9375

<Prev in Thread] Current Thread [Next in Thread>

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or