cp2k / dbcsr

DBCSR: Distributed Block Compressed Sparse Row matrix library
https://cp2k.github.io/dbcsr/
GNU General Public License v2.0
135 stars 47 forks source link

#857: conditionally rely on PARALLEL WORKSHARE #859

Open hfp opened 1 month ago

hfp commented 1 month ago
alazzaro commented 1 month ago

Thanks @hfp I will take a look next week...

hfp commented 1 month ago

Thanks @hfp I will take a look next week...

Might be easier now (less work, only three files). I separated some cleanup work (#860).

hfp commented 1 month ago

@mkrack this single PR is apparently resolving all runtime issues with Intel Fortran Compiler (IFX) in CP2K/DBCSR. There is still the question why PARALLEL WORKSHARE DEFAULT(none) SHARED(...) IF(spawn) with spawn=.NOT. omp_in_parallel() does not work as opposed to the code shown here (but this might be well-covered by a bug report). Further, see https://github.com/cp2k/dbcsr/issues/857#issuecomment-2416094575 - it can be of interest for CP2K.

hfp commented 1 month ago

@alazzaro any feedback welcome - so far, no issues with this code on my side, I am actively using it since sending the PR.

hfp commented 1 month ago

Objective of this implementation is to exercise a way to preserve the (parallel) workshare. It does not judge (or confirms) whether the workshare is beneficial or not.

alazzaro commented 1 month ago

@hfp thanks, I will review everything next week and make a new RC that we can push to CP2K for more testings

hfp commented 1 day ago

Hold on merging this PR. I pulled in more expertise. I will reply on the original issue https://github.com/cp2k/dbcsr/issues/857, and revise/close this PR accordingly.