Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ranks with unequal number of threads #886

Open
hfp opened this issue Jan 31, 2025 · 0 comments
Open

ranks with unequal number of threads #886

hfp opened this issue Jan 31, 2025 · 0 comments

Comments

@hfp
Copy link
Member

hfp commented Jan 31, 2025

It seems dbcsr_mm_multrec.F:309 can crash with OOB access if ranks have unequal number of threads?

A test script looks like:

#!/usr/bin/env bash
NPROC=$(nproc)
MYVAR=$1
VAR=$((MYVAR<NPROC?MYVAR:(NPROC-1)))
export OMP_NUM_THREADS=$((0<RANDOM%2?(NPROC-VAR):NPROC))
echo "OMP_NUM_THREADS=${OMP_NUM_THREADS}"
shift && eval "$*"

The actual test is:

mpirun -np 16 ./runbug.sh 2 /path/to/cp2k-exe/cp2k.psmp /path/to/benchmarks/QS_single_node/dbcsr.inp

This test assumes more than two threads per rank, and varies the number of OpenMP threads per rank by the given variation (2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant