PLASMA_Async interface

Open forum for general discussions relating to PLASMA.

PLASMA_Async interface

Postby waelali » Thu Jan 23, 2014 7:18 am

Dear all,
I have questions regarding PLASMA_Async interface.
How to call Async interface for two dependent routines, I mean by dependent that routine2 has to wait routine1 to start?
How this is differ if I have two independent routines?
Thanks inadvance
waelali
 
Posts: 5
Joined: Thu Jan 23, 2014 6:49 am

Re: PLASMA_Async interface

Postby admin » Sat Jan 25, 2014 4:34 pm

If you use the PLASMA Async interface to call two routines that are dependent,
than they will be scheduled such that the dependencies are preserved.
Some tasks of routine 2 can start before all the tasks of routine 1 are finished.
E.g., if you are solving a linear system of equations, you can call the factorization,
then the forward substitution, then the backward substitution. Forward / backward
substitution can start before the factorization is finished. The scheduler will preserve
dependencies at the level of individual tasks. You can also simply call PLASMA routine
that solves the system, in which case PLASMA will do just that, i.e., use the async mode
of operation to pipeline the stages. I hope it answers your question, but let me know if you
need more information. Also, it is a nice exercise to trace PLASMA, to see what really happens.
Best,
Jkaub
admin
Site Admin
 
Posts: 79
Joined: Wed May 13, 2009 1:27 pm

Re: PLASMA_Async interface

Postby admin » Sat Jan 25, 2014 4:37 pm

Also, you can use the Async interface to co-schedule completely independent routines,
e.g., two or more independent linear solves, etc. The benefit is that if one routine has
some load imbalance, the tasks from other routines will jump in to keep the core busy.
Jakub
admin
Site Admin
 
Posts: 79
Joined: Wed May 13, 2009 1:27 pm

Re: PLASMA_Async interface

Postby waelali » Mon Jan 27, 2014 3:49 am

Thank you, this is really helpful.
At each call I use one sequence and one request, for what we use PLASMA_Sequence_Wait(sequence), I thought that this command is to schedule two or more routines.

Also I am trying to install PLASMA 2.6.0 as follow:
./setup.py --cc=icc --fc=ifort --blaslib=-L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm --cflags=-O2 -I/opt/intel/composer_xe_2013.1.117/mkl/include -mkl=sequential --fflags=-O2 -I/opt/intel/composer_xe_2013.1.117/mkl/include --ldflags_fc=-nofor_main --downall
but I got "option -l not recognized". What is wrong in my command??

Thanks
waelali
 
Posts: 5
Joined: Thu Jan 23, 2014 6:49 am

Re: PLASMA_Async interface

Postby mateo70 » Mon Jan 27, 2014 5:34 am

Hello,

To complete what Jakub said, you can indeed do that with sequence. every async call using a same sequence will be in the same pipeline. If you use different sequence, it will be independent calls.
You can have a look at time_zpotri_tile.c to see the different ways of using the sequence to pipeline different functions.

Regarding the problem with the installer. As said: "-I" is not an option of the installer. You have to protect the options you give to fflags et cflags between quote:

--cflags="-O2 -I/opt/intel/composer_xe_2013.1.117/mkl/include -mkl=sequential" --fflags="-O2 -I/opt/intel/composer_xe_2013.1.117/mkl/include"

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

Re: PLASMA_Async interface

Postby waelali » Mon Jan 27, 2014 5:59 am

Thank you.
Is the following warning affect the performance:
WARNING: the following environment variables have been
set to 1:
OMP_NUM_THREADS, GOTO_NUM_THREADS, MKL_NUM_THREADS
Last edited by waelali on Tue Jan 28, 2014 1:38 am, edited 3 times in total.
waelali
 
Posts: 5
Joined: Thu Jan 23, 2014 6:49 am

Re: PLASMA_Async interface

Postby haidar » Mon Jan 27, 2014 10:09 am

WARNING: the following environment variables have been
set to 1:
OMP_NUM_THREADS, GOTO_NUM_THREADS, MKL_NUM_THREADS
Thanks

Depending on which routine you are using.
If you are using the eigenvalue and SVD routine that may affect your performance since these routine
require at some level a multi-thread BLAS.
Azzam
haidar
 
Posts: 13
Joined: Tue Sep 07, 2010 12:01 pm

Re: PLASMA_Async interface

Postby waelali » Tue Jan 28, 2014 1:38 am

How to modify the following to get rid of the warning:
./setup.py --cc=icc --fc=ifort --blaslib="-L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" --cflags="-O2 -I/opt/intel/composer_xe_2013.1.117/mkl/include -mkl=sequential" --fflags="-O2 -I/opt/intel/composer_xe_2013.1.117/mkl/include" --ldflags_fc="-nofor_main" --downall

I am calling PLASMA_dsyevd_Tile as follow:
{
double *W = (double *)malloc(n*1*sizeof(double));
double *Q = (double *)malloc(n*n*sizeof(double));
PLASMA_desc *descT;
int vec = PlasmaVec;
PLASMA_Alloc_Workspace_dsyevd(n, n, &descT);
int INFO = PLASMA_dsyevd_Tile( vec, PlasmaUpper, descA, W, descT, Q, n);
}
The matrix A is symmetric. I did not get the correct eigenvalues even that INFO = 0 !! Testing PLASMA_dsyevd give the correct eigenvalues.
Could you please help me in this.


Thanks
waelali
 
Posts: 5
Joined: Thu Jan 23, 2014 6:49 am

Re: PLASMA_Async interface

Postby haidar » Tue Jan 28, 2014 10:32 am

When you call the tile interface your matrix should be stored as tile-storage, is this your case?
otherwise if your matrix is stored as standard storage (Lapack storage, or columnwise storage)
then you should call the PLASMA_dsyevd interface.
are you checking the eigenvalue only or the eigenvalue/eigenvectors?
can you please send the main code.


For the compilation, replace -lmkl_sequential by -lmkl_intel_thread
add -openmp -DPLASMA_WITH_MKL to your compiling and linking flags (--cflags --ldflags_fc) or simply put --cc="icc -openmp -DPLASMA_WITH_MKL "

Azzam
haidar
 
Posts: 13
Joined: Tue Sep 07, 2010 12:01 pm


Return to User discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron