getfem-users
[Top][All Lists]

## Re: [Getfem-users] Performance issue

 From: Renard Yves Subject: Re: [Getfem-users] Performance issue Date: Sun, 29 Mar 2009 14:52:36 +0200 User-agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1)

```
Dear Kayhan,

For dense matrices, when it is interfaced with atlas the performance should
be the same than in Matlab because Matlab uses atlas for such computations.
If you want, you can send me your piece of code and I will have a look to it.

Regards,

Yves.

Kayhan Batmanghelich <address@hidden> a écrit :

```
```Dear gmm and getfem users,

```
I have a question about the performance of gmm. I had a piece of code in MATLAB and I need to convert to a C++ program. Personally, I found gmm very comprehensive and tried to use it. However, I am experiencing siginicant performance deacreas which is most probably caused by my own mistake but I cannot see it. I would be appreciated if any of you can help me in this regard.
```
```
My algorithm entails iterative matrix-matrix multiplication (both dense and sparse). Here is one of the problem I have:
```
```
Let's assume that W is 1000000x10 matrix and H is 10x20 matrix, in MATLAB it takes about 0.3 second to compute V = W*H but I try to do the same product using gmm library it takes about 11.0 seconds ! Here is a command I used to perform this task:
```
gmm::mult(W, H, V);

in which W, H and V are both Dense matrices:

gmm::dense_matrix< double >                       W ;
gmm::dense_matrix< double >                       H ;
gmm::dense_matrix< double >                       V ;

```
I tried linking to blas, lapack and atlas by adding #define GMM_USES_LAPACK to the program and linking to them as described in the following link in the documentation:
```
```
but I did not see any improvement in the performance. Since, there is suck a big gap between MATLAB and gmm time for the product computation, I speculate that I should have mess it up somewhere but I cannot see it. I would appreciate if anybody can help.
```

Regards,
Kayhan

```
```

```