[Octopus-devel] [Octopus-notify] svn commit: r8566 - trunk/src/states by joseba
Xavier Andrade
xavier at tddft.org
Thu Nov 17 15:07:39 WET 2011
Hi Joseba,
Our interface call blas directly, passing the multidimensional array
and the numer of element and n1*n2*.... If n1 < ubound(dx, dim = 1)
then this will not work, since the area you want to copy is not
contiguous in memory.
This is a problem of our interface, I prefer to call blas directly.
Xavier
On Thu, Nov 17, 2011 at 7:28 AM, Joseba Alberdi <joseba.alberdi at ehu.es> wrote:
> Hi again,
>
> I found that blas _copy functions are the fastest way to copy a matrix. But
> if the matrix I want to copy is bigger than the elements I want to copy, I
> get an error from Octopus interface:
>
> ASSERT(ubound(dx, dim = 1) == n1)
> ASSERT(ubound(dy, dim = 1) == n1)
>
> Is there any problem if I change to be equal or greater? Like follows:
> ASSERT(ubound(dx, dim = 1) >= n1)
> ASSERT(ubound(dy, dim = 1) >= n1)
>
> I checked for my example and there is no problem. I also checked with the
> "make check" and neither there is no problem.
>
> Waiting for your answer
> Joseba
>
> az., 2011.eko azaren 16a 17:48(e)an, Xavier Andrade(e)k idatzi zuen:
>>
>> I know it is not the most important part of the code, in fact is only a
>> memcpy. By the way, there is any implementation of C memcpy in fortran? If
>> so it would be much faster than any OpenMP implementation. Otherwise we
>> could also to wrap it form C.
>>
>
> For this we should use blas _copy routines.
More information about the Octopus-devel
mailing list