Reputation: 1
I am confusing about DESCINIT's lld parameter.
I set a
subrows(int(full_data_dims_b(1), kind = 4), m_b, nprow)
subrows as defined
integer function subrows(global_rows, block_rows, row_procs)
integer global_rows, block_rows, row_procs
subrows = (global_rows / (block_rows * row_procs)) * block_rows + min(mod(global_rows , &
& (block_rows * row_procs)), block_rows)
end function subrows
enter code here
My descinit is
call DESCINIT( &
desca, &
int(full_data_dims_a(1), kind=4), &
int(full_data_dims_a(2), kind=4), &
m_a, &
n_a, &
0, &
0, &
ictxt, &
& subrows(int(full_data_dims_a(1), kind = 4), m_a, nprow), &
& error)
My program finally cause segmentation fault.
Allocating this memory area
dset_id_a = open_dataset(file_id, dsetname_a)
dspace = open_dataspace(dset_id_a)
ndims_a = get_simple_extent_ndims(dspace)
Upvotes: 0
Views: 85
Reputation: 7432
Descinit
initializes an array descriptor for ScaLAPACK, the distributed memory version of LAPACK. As the link explains LLD
is the "The leading dimension of the local array storing the local blocks of the distributed matrix". Thus it is almost always the local, on process, first dimension of the memory allocated for the array for which you are creating the descriptor. Contrast this with M
and N
which are the global dimensions.
I'm not sure what your function is trying to achieve, but you probably want to look at NUMROC
Upvotes: 0