Shuld be 'const' some vector imput arguments in PLASMA?

Open forum for general discussions relating to PLASMA.

Shuld be 'const' some vector imput arguments in PLASMA?

Postby jgpallero » Mon Jul 30, 2012 6:24 am

Hello:

I see that some PLASMA functions like PLASMA_dpotrs, PLASMA_dgetri, PLASMA_dgetrs and others declare its vector arguments A and ipiv (where is needed) simply as
Code: Select all
double* A

and
Code: Select all
int* ipiv

In these cases A and ipiv are not modified by the function so the common practice is declere them as
Code: Select all
const double* A

and
Code: Select all
const int* ipiv

as LAPACKE and ATLAS do.

I think it is a good practice and I suggest it in PLASMA. On the other hand, this practice will prevents compiler warnings when these arguments are passed as const.
jgpallero
 
Posts: 29
Joined: Sat Jul 28, 2012 12:12 pm

Re: Shuld be 'const' some vector imput arguments in PLASMA?

Postby dobson156 » Mon Jul 30, 2012 7:06 am

I strongly agree with this.

It makes it very hard to use PLASMA on a code base that relies on const correctness without const casting or allocating and coping to mutable buffers.

PLASMA targets C89 and C++ compilers so other than time and effort :? it should be technically possible, unless there are issues with the Fortran interface.
dobson156
 
Posts: 11
Joined: Thu Jun 21, 2012 12:50 pm

Re: Shuld be 'const' some vector imput arguments in PLASMA?

Postby mateo70 » Mon Jul 30, 2012 11:36 am

Hello,

I add that to our tasks for the next releases. I don't think we will make it entirely for the next one, but maybe for the one next year.

Mathieu
mateo70
 
Posts: 98
Joined: Fri May 07, 2010 3:48 pm

Re: Shuld be 'const' some vector imput arguments in PLASMA?

Postby mateo70 » Mon Jul 30, 2012 7:59 pm

Hello,

I started to look at this problem, but LAPACKE which the C interface we use now in PLASMA to call LAPACK doesn't support const. I will report them the problem and when it will be fixed on their side, we will update plasma to integrate the const parameter.

Cheers,
Mathieu
mateo70
 
Posts: 98
Joined: Fri May 07, 2010 3:48 pm

Re: Shuld be 'const' some vector imput arguments in PLASMA?

Postby jgpallero » Tue Jul 31, 2012 3:27 am

mateo70 wrote:Hello,

I started to look at this problem, but LAPACKE which the C interface we use now in PLASMA to call LAPACK doesn't support const. I will report them the problem and when it will be fixed on their side, we will update plasma to integrate the const parameter.

Cheers,
Mathieu


I don't understand. In lapacke.h (http://www.netlib.org/lapack/lapacke.h) we can see the use of const in vector arguments. For example, in LAPACKE_dgetrs().
jgpallero
 
Posts: 29
Joined: Sat Jul 28, 2012 12:12 pm

Re: Shuld be 'const' some vector imput arguments in PLASMA?

Postby mateo70 » Tue Jul 31, 2012 10:04 am

My bad, the version installed on my laptop is out of date and doesn't contain them. You are right lapacke has the const in the last version.

Mathieu
mateo70
 
Posts: 98
Joined: Fri May 07, 2010 3:48 pm

Re: Shuld be 'const' some vector imput arguments in PLASMA?

Postby jgpallero » Wed Nov 14, 2012 4:54 am

Hello:

I've seen that PLASMA 2.5.0 is in the http repository (but not in the PLASMA web at the moment). When is planned to release it? And related with this thread, I've seen in plasma_d.h that const correctness of some vector arguments is not still managed. Is planned to do it?

Thanks
jgpallero
 
Posts: 29
Joined: Sat Jul 28, 2012 12:12 pm

Re: Shuld be 'const' some vector imput arguments in PLASMA?

Postby mateo70 » Wed Nov 14, 2012 6:52 am

Hello,

How did you notice that ? :)
This is a pre-release I generated for the MORSE project which extract PLASMA code to generate codes over Starpu and Wuark runtimes. This one will be released soon,probably even today.
Concerning the const in plasma_x.h, I forgot I planned to do that for this release, I will do it. For now, only the core_blas have the const parameter managed.
Finally, I was planning to release PLASMA this week, but some merge have been done in the trunk, and it will need some time to check this before to release. I will probably release the 2.5.0 actually on the server as a beta to fix bug from the previous one.

Regards,
Mathieu
mateo70
 
Posts: 98
Joined: Fri May 07, 2010 3:48 pm

Re: Shuld be 'const' some vector imput arguments in PLASMA?

Postby mateo70 » Wed Nov 14, 2012 9:30 am

Hello,

I just published on the website the release of 2.5.0 beta 1 which is in reality the tarball name 2.5.0 that you found on the website. The 2.5.0 will come later as soon as the extra algorithms will be fully integrated and checked.
I also released a new version of the installer that includes a patch to avoid problems with lapack revision during download/installation.

Regards,
Mathieu
mateo70
 
Posts: 98
Joined: Fri May 07, 2010 3:48 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron