Non-deterministic output with multiple OpenMP runtimes in the same process
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- c
- Área
- performance
Línea de trabajo
Comienza con las llamadas concurrentes a cblas_sgemv descritas en el informe y con la implementación de Realm OpenMP en runtime/realm/openmp/openmp_api.cc. Reproduce los casos deterministas y concurrentes utilizando dos runtimes de OpenMP y, después, inspecciona el estado de OpenBLAS involucrado en esas llamadas. Se considera terminado cuando las llamadas concurrentes producen una salida determinista sin romper el comportamiento compatible.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I observe non-deterministic output when calling into cblas_sgemv concurrently from two different threads each of which are bound to a different copy of an OpenMP runtime in the same process. I built OpenBLAS 0.3.5 with USE_OPENMP=1, USE_THREAD=1, NUM_PARALLEL=2, and NUM_THREADS=40. Each copy of the OpenMP runtime has 20 threads in its thread pool, and I call 'openblas_set_num_threads' to 20 once before doing any other OpenBLAS calls (which with 2 copies of the OpenMP runtime results in 40 total threads, the same as NUM_THREADS). Everything is deterministic if I take care to ensure that one thread completes its call to cblas_sgemv before the second thread does its call cblas_sgemv. However, if both threads call into cblas_sgemv concurrently each with their own OpenMP runtime, then non-determinism results. My guess is that there is one or more global variables somewhere in OpenBLAS that is/are suffering from a race with concurrent invocations each with OpenMP but I've been so far unable to find it in the source.
Note you can't reproduce this with any of the standard OpenMP runtimes (e.g. the ones shipped by GCC, LLVM, or Intel as they all have global variables that prevent multiple copies of their OpenMP runtimes from existing concurrently in the same process). I'm using the copy of OpenMP provided by the Realm runtime which does support concurrent copies of the OpenMP runtime existing in the same process:
https://github.com/StanfordLegion/legion/blob/stable/runtime/realm/openmp/openmp_api.cc
I realize this is a very unusual use case for you to consider, but I'm hoping that it's an easy fix to just get rid of one or a few global variables somewhere.
- Lenguaje dominante
- C
- Estrellas
- 7.6k
- Forks
- 1.7k
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 42
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenMathLib/OpenBLAS
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
OpenMathLib/OpenBLAS#6029 · 21 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
OpenMathLib/OpenBLAS#6028 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
OpenMathLib/OpenBLAS#6005 · 21 comentarios · 2 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
OpenMathLib/OpenBLAS#5930 · 2 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
OpenMathLib/OpenBLAS#5870 · 4 comentarios ·
Todos los issues de OpenMathLib/OpenBLAS
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
HarbourMasters/Shipwright#7229 ·
-
Error while building from source Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comentario ·