Commit Graph

82 Commits

Author SHA1 Message Date
24324ae734 Add parallel task and update old emu tests
All task-related events now require the body id as argument.
Additionally, in nOS-V, nested tasks require the parents to be paused.
2024-03-13 17:07:32 +01:00
50837d6173 Port Nanos6 model to tasks with bodies
For now we still allow Nanos6 to use the relaxed nest model, so a nested
task can begin the execution without the parent being paused.
2024-03-13 17:07:32 +01:00
815633221d Port nOS-V model to task bodies
The nOS-V events are modified in two ways: 1) to create a parallel task
the new VTC event must be used and 2) all task events for both normal
(VTc) and parallel (VTC) tasks require an extra argument in the payload
to indicate the body id. As a consequence, the nOS-V model version is
now increased to 2.0.0.

Additionally, all the channel PRV flags are set to PRV_SKIPDUPNULL, so
duplicates are only emitted if they are not null. It solves the problem
when a task switches to another task with the same body id.

A new Paraver configuration is added for the body id.
2024-03-13 17:07:26 +01:00
4993197fb9 Add nOS-V attach and detach API events
Instead of showing the "attached" state with the VH{aA} events, we show
when the call to nosv_attach() and nosv_detach() take place. The old
VH{aA} events are now ignored. Bumps the nOS-V model version to 1.1.0.
2024-02-15 17:59:41 +01:00
df0e7b2bd4 Test generated events match documentation
The test ensures that the generated documentation of emulation events is
kept up to date. To locate the events.md file, the source root path is
now exported to tests in OVNI_SOURCE_DIR.

The "Built on ..." message with the date of the build is removed as
otherwise it will always make the comparison fail.
2024-01-30 12:02:02 +01:00
0439399f05 Fix ovni_thread_isready() after ovni_thread_free()
Until now, the value returned by ovni_thread_isready() was still
non-zero when the thread stream was destroyed in ovni_thread_free()
This was making it impossible to detect when a stream was destroyed.

This change makes it return 0 after ovni_thread_free() by using a new
finished flag. The flag keeps track on then the stream is destroyed,
preventing double initialization of a free stream.
2023-12-19 17:30:20 +01:00
6d584c646c Install ovniver with the runpath set
When running ovniver without LD_LIBRARY_PATH set, the loader couldn't
find any ovni installation and therefore was failing to start the
program. With this change we set the RUNPATH (not RPATH) of ovniver to
the installation libdir, so when no other libovni library is loaded via
LD_LIBRARY_PATH the one provided by the same source as ovniver is used.

The value of LD_LIBRARY_PATH is also printed so we can determine where
it may be loading libovni. Using LD_DEBUG=libs will give more
information of the search process.

Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/163
2023-12-12 17:06:24 +01:00
0f7ccc89de Add -a flag in ovniemu to enable all models
The experimental flag -a is used to ease the transition to the usage of
ovni_thread_require(), as it may be posible to have traces in which not
all libraries have requested their model. The flag causes all emulation
models to be enabled. This flag is considered experimental and it may be
removed or renamed in future versions.
2023-12-11 14:29:40 +01:00
c424a3177d Test temporal directories are removed at the end 2023-11-16 12:39:15 +01:00
423e3b15d2 Test multiple calls to ovni_thread_require() 2023-11-16 12:39:14 +01:00
93fdfd51de Add flush-tmpdir test 2023-11-16 12:39:14 +01:00
6b0b5bfbbd Add require test for missing models 2023-11-16 12:39:14 +01:00
72b7eb8332 Mark the finalization of streams
The emulator will now check that all threads are properly finalyzed by
calling ovni_thread_free(), as required by the specification. For now
only a warning is issued, which is enough to determine the cause of
potential emulator panics.

The ovni model is now always enabled.
2023-11-16 12:39:14 +01:00
25cf46036d Add no-require emulation test 2023-11-16 12:39:14 +01:00
6f7ce4063f Enable all models if the require key is missing
Allows programs to update to a new libovni library without breaking the
instrumentation. Only until the first call to ovni_thread_require() the
models are enabled on demand.
2023-11-16 12:39:14 +01:00
354f2f50eb Register emulation models only if required
Until now, emulation models were always being registered via probe(),
which causes the emulator to initialize all the channels. To reduce the
overhead, the channels were not connected or registered in the bay
until the first event of that model was received. This delayed connect
was causing issues in muxes where the newly connected model required
refreshing the touched channels. Which in turn was causing unexpected
PRV events.

By determining which models we need to enable, we can remove the delayed
connect mechanism and just enable those models at initialization time,
and connect the channels.
2023-11-16 12:39:05 +01:00
428e0b44b8 Add emu test for ovni_thread_require 2023-11-16 12:21:50 +01:00
c13d57f0f6 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>
2023-11-14 17:26:43 +01:00
4b4f1bd218 Don't modify nOS-V subsystem state on task pause
In nOS-V, when a task was paused via the VTp event, two things were
happening: 1) the task state was set to pause and 2) the subsystem state
"Task: Running" was being popped.

This causes a problem when a task calls nosv_submit() in blocking mode,
as it will call nosv_pause() which will emit a VTp event from a
subsystem different than "Task: Running".

To solve this conflict, we handle the subsystems state and the task
state separately with the VTp and VTr events. The subsystem state "Task:
Running" no longer is connected to the state of the task and only shows
if we entered the body of the task or not. It has now been renamed to
"Task: In body".

The new state "Task: In body" represents that the task body has begun
the execution and is still in the stack, but the task may be paused. The
subsystem is not changed by the VTp (pause) or VTr (resume) events.

Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/128
2023-10-23 11:26:17 +02:00
0df018cf5f Fix segfault reading empty streams
The check_clock_gate() was trying to access to the first event in all
streams. However, streams that are empty don't have any event, so they
cause a NULL dereference. Skipping not active streams avoids the
problem.
2023-10-23 10:07:44 +02:00
0db35980a0 Add a test for multiple values of OVNI_TRACEDIR 2023-10-23 07:49:28 +00:00
Kevin Sala
afb81172a7 Add MPI emu tests 2023-09-06 18:11:19 +02:00
Kevin Sala
1e2102c0a0 Add TAMPI emu tests 2023-08-22 18:13:29 +02:00
f8c6b7c7c0 Improve the version error message
Use the terminology want/got to determine which version the user is
requested and the version the library provides.
2023-07-25 19:55:51 +02:00
48df02f102 Always use the project version
Don't duplicated versions so we avoid the problem of missing one
instance to be updated.
2023-07-07 10:42:40 +02:00
929af74d3f Add sort-flush test 2023-06-28 12:28:40 +02:00
fb435842b2 Add nosv multiple-segment test 2023-04-25 17:00:42 +02:00
ff340df5b5 Disable flush-overhead test 2023-04-19 10:57:10 +00:00
4a936dcb99 Add test to prevent re-running tasks in Nanos6
For now is disabled until we have a better instrumentation for task
states.
2023-04-17 15:58:19 +00:00
b16c30a5e6 Add Absorbing state to the idle view in Nanos6 2023-04-14 13:39:37 +00:00
6cafd347ce Add support for sponge subsystem state in Nanos6 2023-04-14 13:39:37 +00:00
676e30b4ca Order looms and processes by rank if given 2023-04-14 08:35:21 +00:00
602daabe23 Fix copyright years 2023-04-06 15:33:15 +00:00
c30a5d94b5 Add emu breakdown test for zero values 2023-04-06 15:33:15 +00:00
f848ddb37f Increase the flush overhead limit to 2 ms
The current CI disk is slower doing the flushes.
2023-04-05 15:35:37 +02:00
848a1de963 Constraint _GNU_SOURCE in compat.c only 2023-03-24 12:08:45 +00:00
ddbb7dd9f4 Add include-what-you-use
Adds forwards declarations in headers and includes all headers in
sources, even if they are found by transitive includes.
2023-03-24 12:08:45 +00:00
f22d9084ba Ensure all looms have at least one CPU 2023-03-24 12:08:45 +00:00
c0afc79d4e Use OK() and ERR() in unit tests
Also remove prefixes and trailing new lines in err() and die()
2023-03-24 12:08:45 +00:00
82f1cc287d Update copyright years to 2021-2023 2023-03-24 12:08:45 +00:00
78c4bba62e Match the PRV event in delayed-connect-ss test
Ensures the delayed connect of the CPU and thread muxes still causes the
output to be updated properly.
2023-03-24 12:08:45 +00:00
c57bef14a3 Add switch-same-type emu test for Nanos6 2023-03-24 12:08:45 +00:00
aab6808f4e Ensure the appid and the rank are emitted too 2023-03-24 12:08:45 +00:00
34c9f34f04 Get the gid from nanos6 task types too 2023-03-24 12:08:45 +00:00
4aebe81940 Document ss-mismatch nanos6 test 2023-03-24 12:08:45 +00:00
97dac6e83b Add switch-same-type nosv test
Generates a script with the values of the delta clock, PRV type and
value to be matched in the .prv traces, to ensure the emulator emitted
the switching type event.
2023-03-24 12:08:45 +00:00
803945dbc8 Return the gid of the created type 2023-03-24 12:08:45 +00:00
864ce4222f Store the first and last clock of emu events
Allows the tests to know the relative clock that will appear in the PRV
trace (with one rank only).
2023-03-24 12:08:45 +00:00
69506e5079 Update burst test regex 2023-03-24 12:08:45 +00:00
899b82c36f Update flush-overhead too 2023-03-24 12:08:45 +00:00