Fix for nOS-V with ovni.level=2
When running without all the subsystem events enabled in nOS-V, it is possible to emit two consecutive VTx events, which would push twice the same value ST_TASK_BODY into the subsystem channel. This change relaxes the subsystem channel to accept duplicate stacked values. A regression test is also added. Reported-By: Raúl Peñacoba Veigas <raul.penacoba@bsc.es>
This commit is contained in:
		
							parent
							
								
									2d5046654d
								
							
						
					
					
						commit
						c13d57f0f6
					
				@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## [Unreleased]
 | 
					## [Unreleased]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Changed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Fix emulation for level 2 or lower in nOS-V with inline tasks by
 | 
				
			||||||
 | 
					  allowing duplicates in the subsystem channel.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## [1.4.0] - 2023-11-08
 | 
					## [1.4.0] - 2023-11-08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Added
 | 
					### Added
 | 
				
			||||||
 | 
				
			|||||||
@ -57,6 +57,9 @@ static const int chan_dup[CH_MAX] = {
 | 
				
			|||||||
	[CH_APPID] = 1,
 | 
						[CH_APPID] = 1,
 | 
				
			||||||
	[CH_TYPE] = 1,
 | 
						[CH_TYPE] = 1,
 | 
				
			||||||
	[CH_RANK] = 1,
 | 
						[CH_RANK] = 1,
 | 
				
			||||||
 | 
						/* Can push twice ST_TASK_BODY if we run without subsystem
 | 
				
			||||||
 | 
						 * events (level 2). */
 | 
				
			||||||
 | 
						[CH_SUBSYSTEM] = 1,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* ----------------- pvt ------------------ */
 | 
					/* ----------------- pvt ------------------ */
 | 
				
			||||||
 | 
				
			|||||||
@ -10,3 +10,4 @@ test_emu(mp-rank.c MP)
 | 
				
			|||||||
test_emu(switch-same-type.c)
 | 
					test_emu(switch-same-type.c)
 | 
				
			||||||
test_emu(multiple-segment.c MP NPROC 4)
 | 
					test_emu(multiple-segment.c MP NPROC 4)
 | 
				
			||||||
test_emu(task-pause-from-submit.c)
 | 
					test_emu(task-pause-from-submit.c)
 | 
				
			||||||
 | 
					test_emu(same-subsystem.c)
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										30
									
								
								test/emu/nosv/same-subsystem.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								test/emu/nosv/same-subsystem.c
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC)
 | 
				
			||||||
 | 
					 * SPDX-License-Identifier: GPL-3.0-or-later */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					#include "compat.h"
 | 
				
			||||||
 | 
					#include "instr.h"
 | 
				
			||||||
 | 
					#include "instr_nosv.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* With the introduction of ovni.level in nOS-V, we can have the
 | 
				
			||||||
 | 
					 * situation in which two VTx events are emitted without the subsystem
 | 
				
			||||||
 | 
					 * events. This causes the subsystem channel to push twice the same
 | 
				
			||||||
 | 
					 * value ST_TASK_BODY. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int
 | 
				
			||||||
 | 
					main(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						instr_start(0, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						instr_nosv_type_create(10);
 | 
				
			||||||
 | 
						instr_nosv_task_create(1, 10);
 | 
				
			||||||
 | 
						instr_nosv_task_create(2, 10);
 | 
				
			||||||
 | 
						instr_nosv_task_execute(1);
 | 
				
			||||||
 | 
						instr_nosv_task_execute(2);
 | 
				
			||||||
 | 
						instr_nosv_task_end(2);
 | 
				
			||||||
 | 
						instr_nosv_task_end(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						instr_end();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user