[CP2K:3930] dbcsr matrix help
Urban Borštnik
urban.b... at gmail.com
Fri Jul 20 08:01:13 UTC 2012
Hi,
for starters I would point you to the the src/dbcsr_lib directory of the
CP2K source code (pointers on how to get it are on
http://www.cp2k.org/). Specifically, have a look at the
dbcsr_test_multiply.F file.
I see issues you want to solve.
One is to create a distribution from scratch. If you don't care about
specific block sizes, then the two basic routines you will need are
create_bl_distribution and dbcsr_distribution_new, both found in
dbcsr_dist_operations.F. You have to run the first one twice, once for
rows and another time for columns. It returns two managed arrays: block
sizes and the the block distribution. The block sizes array is a
sequential list of block sizes; the sum of these is equal to the number
of elements in your matrix row/column. The block distribution array is
a mapping from the blocks to processor rows/columns.
The other issue is how to fill the array. The dbcsr_make_random_matrix
in dbcsr_test_methods.F can serve as an example, or you can look at the
copy_fm_to_dbcsr subroutine in CP2K's cp_dbcsr_operations.F file (this
latter routine is used to convert a block-cyclic--distributed
ScaLAPACK-type matrix to DBCSR). The way to go really depends on how
big your matrices are. If it doesn't fit in memory on one computer,
then it gets a bit trickier
Best regards,
Urban.
On Thu, 2012-07-19 at 13:56 -0700, Adam wrote:
> Hi,
>
> I'm a sophomore student at lanl, relatively new to fortran. I'm
> supposed find a way to square large sparse matrices in parallel. I
> found a way to do this with the dbcsr part of cp2k, I was wondering
> how you would go about setting the distribution of a dbcsr_matrix
> based on a square matrix you read in from a file (for example:
> REAL(8):: DATA(10, 10) ).
>
> Any help is greatly appreciated,
> Adam
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "cp2k" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cp2k/-/90DwGN9Ux6IJ.
> To post to this group, send email to cp... at googlegroups.com.
> To unsubscribe from this group, send email to cp2k
> +unsub... at googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cp2k?hl=en.
More information about the CP2K-user
mailing list