mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-21 14:35:15 -04:00
Further adjusted block size for FM matrices to be multiple of VLEN (#3801)
- Attempts to delivers https://github.com/cp2k/cp2k/pull/3795#issuecomment-2520377292
This commit is contained in:
parent
e7c81ba798
commit
4939a6737d
1 changed files with 8 additions and 2 deletions
|
|
@ -206,12 +206,18 @@ CONTAINS
|
|||
vlen = m_cpuid_vlen()
|
||||
nmax_block = (fmstruct%nrow_global + fmstruct%context%num_pe(1) - 1)/ &
|
||||
(fmstruct%context%num_pe(1))*fmstruct%context%num_pe(1)
|
||||
IF (1 < vlen) nmax_block = nmax_block/vlen*vlen ! floor
|
||||
IF (1 < vlen) THEN ! flooring not ceiling (OOB)
|
||||
fmstruct%nrow_block = fmstruct%nrow_block/vlen*vlen
|
||||
nmax_block = nmax_block/vlen*vlen
|
||||
END IF
|
||||
fmstruct%nrow_block = MAX(MIN(fmstruct%nrow_block, nmax_block), 1)
|
||||
|
||||
nmax_block = (fmstruct%ncol_global + fmstruct%context%num_pe(2) - 1)/ &
|
||||
(fmstruct%context%num_pe(1))*fmstruct%context%num_pe(2)
|
||||
IF (1 < vlen) nmax_block = nmax_block/vlen*vlen ! floor
|
||||
IF (1 < vlen) THEN ! flooring not ceiling (OOB)
|
||||
fmstruct%ncol_block = fmstruct%ncol_block/vlen*vlen
|
||||
nmax_block = nmax_block/vlen*vlen
|
||||
END IF
|
||||
fmstruct%ncol_block = MAX(MIN(fmstruct%ncol_block, nmax_block), 1)
|
||||
END IF
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue