Add OpenMP untied RT test
Executing the taskyield in a loop causes the runtime to maximize the probablily that we end up running the task again before we have the chance to emit the PPe event, so making the emulator panic as this breaks the current OpenMP task model.
This commit is contained in:
		
							parent
							
								
									88073d2205
								
							
						
					
					
						commit
						84ae4ee056
					
				| @ -47,6 +47,7 @@ openmp_rt_test(simple-task.c) | |||||||
| openmp_rt_test(task.c) | openmp_rt_test(task.c) | ||||||
| openmp_rt_test(taskloop.c) | openmp_rt_test(taskloop.c) | ||||||
| openmp_rt_test(taskwait.c) | openmp_rt_test(taskwait.c) | ||||||
|  | openmp_rt_test(task-untied.c) | ||||||
| openmp_rt_test(team-distribute.c) | openmp_rt_test(team-distribute.c) | ||||||
| openmp_rt_test(worksharing-and-tasks.c) | openmp_rt_test(worksharing-and-tasks.c) | ||||||
| openmp_rt_test(worksharing-mix.c BREAKDOWN) | openmp_rt_test(worksharing-mix.c BREAKDOWN) | ||||||
|  | |||||||
							
								
								
									
										22
									
								
								test/rt/openmp/task-untied.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								test/rt/openmp/task-untied.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | /* Copyright (c) 2025 Barcelona Supercomputing Center (BSC)
 | ||||||
|  |  * SPDX-License-Identifier: GPL-3.0-or-later */ | ||||||
|  | 
 | ||||||
|  | /*
 | ||||||
|  |  * Ensures that we can emit a sequence of PPx, PPe, PPx, PPe events for the same | ||||||
|  |  * OpenMP task to execute it again. | ||||||
|  |  * | ||||||
|  |  * See: https://gitlab.pm.bsc.es/rarias/ovni/-/issues/208
 | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | int | ||||||
|  | main(void) | ||||||
|  | { | ||||||
|  | 	#pragma omp parallel | ||||||
|  | 	#pragma omp master | ||||||
|  | 	#pragma omp task untied | ||||||
|  | 	{ | ||||||
|  | 		for (int i = 0; i < 10000; i++) { | ||||||
|  | 			#pragma omp taskyield | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user