Commit Graph

970 Commits

Author SHA1 Message Date
Raúl Peñacoba Veigas
bf2b3b73a0 Add OpenMP emulation model
For now it only has support for subsystems

Co-authored-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2024-03-08 13:04:45 +01:00
454504d0cc Poison usleep()
It has been deprecated in POSIX.1-2001 and removed in POSIX.1-2008.
2024-02-20 14:01:18 +01:00
Raúl Peñacoba Veigas
3e7006cec7 Change usleep() to sleep_us() in RT tests 2024-02-20 14:01:18 +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
233e35e8ff Release version 1.6.0 2024-02-14 14:48:41 +01:00
4d95f046ea Add nosv nested init RT test 2024-02-13 16:24:37 +01:00
7a62e396cb Update nOS-V version for nested RT tests 2024-02-13 16:24:37 +01:00
68fc8b0eba Encode ovnievents output for HTML 2024-01-30 12:02:02 +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
402ea82847 Update CHANGELOG.md 2024-01-30 12:02:02 +01:00
e4da326c76 Update emulator event list
Generates the emulation event list by using the ovnievents tool.
2024-01-30 12:02:02 +01:00
028aa48b98 Add ovnievents tool to dump event definition
The tool dumps the list of events in Markdown, suitable to replace the
documentation page for the emulation events.
2024-01-30 12:02:02 +01:00
b878e5290a Add ovnidump(1) manual page 2024-01-30 12:02:02 +01:00
1792c650ec Add definitions for emulator events
Implements a small language parser to define the emulator events. The
event specification is parsed at emulation (when the emulator runs).
The ovnidump output now prints the events with the arguments formatted
as given in the event description.

It also introduces some consistency checks over the event MCVs, which
must begin with the model identifier and cannot be duplicated.
2024-01-30 12:01:56 +01:00
bae38d1d26 Describe event declaration language 2023-12-21 14:55:05 +01:00
a2b2d11b0d Release version 1.5.1 2023-12-20 15:33:41 +01:00
1930cc4fd6 Adjust the regex of spawn-task-external-bad test
Now the program fails in runtime directly as the stream is not
initialized when Nanos6 attempts to write events.
2023-12-20 12:08:47 +01:00
7212273141 Update nOS-V and Nanos6 for CI tests
The new versions include the call to ovni_thread_free() when a thread
finishes.
2023-12-20 12:07:42 +01:00
6bfacf0e1e Check the thread is ready before adding events
Prevents segmentation faults when accessing the NULL stream buffer
without a clear message of what is happening.
2023-12-19 17:30:31 +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
75833f5e21 Release version 1.5.0 2023-12-15 11:34:20 +01:00
1918ab6669 Always attempt to find Nanos6 and NODES
Causes the packages to always appear as found or not found in the
summary of cmake. Otherwise they were only checked if the compiler
supports the -fompss2 flag.
2023-12-15 11:06:41 +01:00
2b2a0eea8e Require nOS-V 2.0.0 for RT tests
We no longer need to detect support for instrumentation levels, as it is
included in 2.0.0.
2023-12-15 11:06:41 +01:00
ae7ef21014 Fix attach nOS-V RT test
The nosv_attach() function no longer needs a the type argument.
2023-12-15 11:06:41 +01:00
0a534f6c46 Simplify nanos6.toml config
Only the parts relevant to ovni are required.
2023-12-15 11:06:41 +01:00
1959ad047f Update runtimes to master with an overlay
Use an overlay to change CI packages recursively to also update
depedencies.
2023-12-15 11:06:41 +01:00
f56bc51dd5 flake.lock: Update
Flake lock file updates:

• Updated input 'bscpkgs':
    'git+https://git.sr.ht/~rodarima/bscpkgs?ref=refs/heads/master&rev=2a953d811c1e10d8d32b17a39e6eaf1b58afcd46' (2023-11-29)
  → 'git+https://git.sr.ht/~rodarima/bscpkgs?ref=refs/heads/master&rev=c4d5135fde108401417fdcdf5e1c8d11aeca4f32' (2023-12-07)
2023-12-15 11:05:59 +01:00
0496aeffc6 Close stream FD on ovni_thread_free()
This is required on FS like NFS as the cache coherence model states that
only after the file is closed the changes are actually propagated to the
server. It is not recomended to use NFS as OVNI_TMPDIR anyway.

Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/168
2023-12-14 16:08:25 +01:00
bf2b4af15a Ensure we use RUNPATH for ovniver
As cmake doesn't provide a way to use the RPATH or the RUNPATH, we
explicitly set the --enable-new-dtags linker flag. If the flag is not
supported by the compiler, the build is aborted.
2023-12-12 17:06:24 +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
998200d507 Always check thread metadata
The thread metadata file is mandatory for trace version 2, so the
emulator should fail if the file is not there or has the wrong version.
Old traces with version 1 are not supported.
2023-11-22 10:38:46 +01:00
c424a3177d Test temporal directories are removed at the end 2023-11-16 12:39:15 +01:00
3267ea873f Clean tmp directories when finishing
There were leftover temporal directories when using the OVNI_TMPDIR
variable, as we only remove the proccess ones. This change only attempts
to remove them if they are empty, and doesn't care about race
conditions. The removal process is just "best effort".
2023-11-16 12:39:15 +01:00
e002db72fd Correct documentation on thread metadata 2023-11-16 12:39:14 +01:00
2b18171e94 Update changelog 2023-11-16 12:39:14 +01:00
effdf36f7e Print the list of models in the emulator 2023-11-16 12:39:14 +01:00
927837df25 Don't write thread metadata on flush
The metadata was being written to the final directory, which may be too
slow to accept writes during runtime. The thread metadata needs to be
written anyway at ovni_thread_free() to set the finished flag, so we can
simply skip it.
2023-11-16 12:39:14 +01:00
c7e8b256d2 Fix gcc uninitialization warning confusion 2023-11-16 12:39:14 +01:00
423e3b15d2 Test multiple calls to ovni_thread_require() 2023-11-16 12:39:14 +01:00
855dd76678 Report libovni version from trace 2023-11-16 12:39:14 +01:00
93fdfd51de Add flush-tmpdir test 2023-11-16 12:39:14 +01:00
70e886fcfe Remove old model_version key from proc metadata 2023-11-16 12:39:14 +01:00
f02994c149 Document thread metadata in trace spec 2023-11-16 12:39:14 +01:00
f34479712a Add model version in documentation 2023-11-16 12:39:14 +01:00
d836b7e46d Include changelog in documentation 2023-11-16 12:39:14 +01:00
6b0b5bfbbd Add require test for missing models 2023-11-16 12:39:14 +01:00
58fe0d1b4b Improve error message for disabled model 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