Department of Computer Engineering2024-11-092018978-3-319-96983-1978-3-319-96982-40302-974310.1007/978-3-319-96983-1_32-s2.0-85052918137http://dx.doi.org/10.1007/978-3-319-96983-1_3https://hdl.handle.net/20.500.14288/9350One potential problem when writing parallel programs with OpenMP is to introduce determinacy races where for a given input, the program may unexpectedly produce different final outputs at different runs. Such startling behavior can result from incorrect ordering of OpenMP tasks. We present a method to detect determinacy races in OpenMP tasks at runtime. Based on OpenMP program semantics, our proposed solution models an OpenMP program as a collection of tasks with inferred dependencies among them where a task is implicitly created with a parallel region construct or explicitly created with a task construct. We define happens-before relation among tasks based on such dependencies for determining an execution order when detecting determinacy races. Based on this formalization, we developed a tool, TaskSanitizer, which detects and reports concurrent memory accesses whose tasks do not have common dependencies. Finally, TaskSanitizer works at runtime, has been able to find bugs in micro-benchmarks and it is reasonably efficient to be utilized in a working environment.Computer scienceRuntime determinacy race detection for openMP tasksConference proceeding1611-33498510423000565355