pdgesvd sample program IN Visual Studio

Post here if you have a question about LAPACK or ScaLAPACK algorithm or data format

pdgesvd sample program IN Visual Studio

Postby darkcminor » Thu Feb 16, 2012 7:02 pm

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...
darkcminor
 
Posts: 2
Joined: Thu Feb 16, 2012 6:54 pm

Re: pdgesvd sample program IN Visual Studio

Postby admin » Thu Feb 16, 2012 7:23 pm

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
admin
Site Admin
 
Posts: 499
Joined: Wed Dec 08, 2004 7:07 pm

Re: pdgesvd sample program IN Visual Studio

Postby darkcminor » Fri Feb 17, 2012 6:08 pm

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
darkcminor
 
Posts: 2
Joined: Thu Feb 16, 2012 6:54 pm

Re: pdgesvd sample program IN Visual Studio

Postby admin » Fri Feb 17, 2012 6:28 pm

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
admin
Site Admin
 
Posts: 499
Joined: Wed Dec 08, 2004 7:07 pm


Return to Algorithm / Data

Who is online

Users browsing this forum: Exabot [Bot] and 0 guests