Page 1 of 1

pdgesvd sample program IN Visual Studio

PostPosted: Thu Feb 16, 2012 7:02 pm
by darkcminor
I want to use SCALAPACK's pdgesvd routine, I have previously used this example for Lapack in Visual Studio, but, is there any sample program using pdgesvd instead of dgesvd



#include "stdafx.h"
#include <stdlib.h>
#include <stdio.h>

extern "C" void dgesvd_( char* jobu, char* jobvt, int* m, int* n, double* a,
int* lda, double* s, double* u, int* ldu, double* vt, int* ldvt,
double* work, int* lwork, int* info );


///SOME CODE INIT VARIABLES...
double arr[], double u[], double s[];
int m = M, n = N, lda = m, ldu = m, ldvt = n, info, lwork;
double wkopt;
double* work;
lwork = -1;
dgesvd_( "All", "All", &m, &n, arr, &lda, s, u, &ldu, vt, &ldvt, &wkopt, &lwork, &info );
lwork = (int)wkopt;
work = (double*)malloc( lwork*sizeof(double) );
dgesvd_( "All", "All", &m, &n, arr, &lda, s, u, &ldu, vt, &ldvt, work, &lwork, &info );
free( (void*)work );

//MORE CODE...

Re: pdgesvd sample program IN Visual Studio

PostPosted: Thu Feb 16, 2012 7:23 pm
by admin
Hey, which LAPACK libraries are you using under Windwos? the one's provided here? http://icl.cs.utk.edu/lapack-for-windows/lapack

At the moment, only ScaLAPACK 1.8.0 is available for Windows only with INTEL Compilers.
http://icl.cs.utk.edu/lapack-for-window ... index.html

I was planning to try to build ScaLAPACK 2.0.0 dll's for Windows but I had no user request to do so.
ScaLAPACK requires an MPI libraries, which one are you using?

Also, are you on a Cluster or on a multicore machine?
Julie

Re: pdgesvd sample program IN Visual Studio

PostPosted: Fri Feb 17, 2012 6:08 pm
by darkcminor
Yes, I am using the LAPACK libraries provided in http://icl.cs.utk.edu/lapack-for-windows/lapack

So I downloaded ScaLAPACK 1.8.0, And for MPI I have MPICH, and also the visual studio solution
http://icl.cs.utk.edu/lapack-for-window ... 0Solution/

I am running a multicore machine
Thanks in advance

Re: pdgesvd sample program IN Visual Studio

PostPosted: Fri Feb 17, 2012 6:28 pm
by admin
First, just to link with a multithreaded BLAS will drastically increase LAPACK Performance.
Second, if you want even more performance you should move to the new Linear Algebra multithreaded Library: PLASMA. This work is currently under development but I believe they have dgesvd available.
Best would be to contact the PLASMA team directly.
http://icl.cs.utk.edu/plasma/software/index.html

ScaLAPACK won't give you the best results on a Multicore machine.

Also it is to note that we are supporting Windows platform but not necessarily to the latest version, and also Windows is maybe not the most appropriate platform to get **free** multithreaded BLAS .

Julie