Adrien Gougeon [Mon, 12 Jun 2023 15:42:42 +0000 (17:42 +0200)]
task can now pass tokens (void*) to other tasks. add example using tokens and apache storm terminology
Arnaud Giersch [Fri, 9 Jun 2023 14:48:14 +0000 (16:48 +0200)]
Disable s4u-mc-bugged1-liveness-visited-ucontext only.
Sorry for the noise [ci-skip]
Arnaud Giersch [Fri, 9 Jun 2023 14:33:05 +0000 (16:33 +0200)]
Disable liveness model-checking tests outside Linux.
It seems to fall in an infinite loop under FreeBSD for example.
[ci-skip]
Arnaud Giersch [Fri, 9 Jun 2023 13:45:53 +0000 (15:45 +0200)]
Sometimes the expansion may work and the memory address should stay the same.
Martin Quinson [Fri, 9 Jun 2023 12:15:57 +0000 (12:15 +0000)]
Merge branch 'udpor-phase8' into 'master'
Add `ex(C)` computations for remaining primitives
See merge request simgrid/simgrid!147
Maxwell Pirtle [Fri, 2 Jun 2023 08:35:53 +0000 (10:35 +0200)]
Only compute extensions for enabled events
Maxwell Pirtle [Mon, 24 Apr 2023 07:01:59 +0000 (09:01 +0200)]
Add events with implicit bottom event
A bug was caught whereby events of the
form MUTEX* were not added properly
when following the pseudocode directly.
The problem is that SimGrid does not
explicitly represent the "bottom" event
with which every event in an unfolding is
implicitly dependent; instead, events are
simply processed without it. The implication
is such that technically, all events would
have the "previously-executed event" as
the bottom event if it was the first action taken
by the actor in the configuration, while SimGrid
will return a `std::nullopt_t` if no such
action has been taken.
The solution is very simple: we simply
add the event without any dependencies
(representing the root event) if the
previous event can't be found for the
action. This is the case in the
other pseudocode that exists, but
is a bit more subtle when readingh the
pseudocode for mutexes
Maxwell Pirtle [Thu, 20 Apr 2023 08:29:21 +0000 (10:29 +0200)]
Add partial implementation for MutexWait/MutexTest
The full implementation for computing extension
sets for MutexWait and MutexTest was *almost*
added in this commit. Again, though, we need to
be able to determine dependecies in the context
of mutex transitions which implies we need to
be have more information from the application side.
This work will be added in subsequent commits
Maxwell Pirtle [Thu, 20 Apr 2023 08:05:29 +0000 (10:05 +0200)]
Add ex(C) computation for mutex lock/unlock
The pseudcode for computing the incremental
portion of the extension set for the transitions
MUTEX_ASYNC_LOCK and MUTEX_UNLOCK were partially
added. What's importantly missing is one key
element of detecting dependencies in the specific
configuration context between a MUTEX_UNLOCK and
a MUTEX_WAIT. This will also prove to be an issue
when implementing the corresponding function for
MUTEX_WAIT.
Maxwell Pirtle [Wed, 19 Apr 2023 14:09:32 +0000 (16:09 +0200)]
Add tentative implementation of CommTest ex(C) pseudocode
Maxwell Pirtle [Wed, 19 Apr 2023 13:02:50 +0000 (15:02 +0200)]
Reorder loop processing in CommWait ex(C) comp
Maxwell Pirtle [Wed, 19 Apr 2023 08:53:08 +0000 (10:53 +0200)]
Add "working" UDPOR on small examples with CommWait independence
In forcing each CommWait transition to be
independent with all other CommWait transitions as
assumed in The Anh Pham's thesis, UDPOR appears to
correctly identify the errors in the few programs
that are used to test SimGrid's model checking
component.
Maxwell Pirtle [Tue, 18 Apr 2023 11:19:16 +0000 (13:19 +0200)]
Add ex(C) example with a small program
Incorporating extension set computations into
unit tests is rather difficult, as it requires
effectively enumerating each step followed by
UDPOR during one of its computations. This
commit adds one such expansion for a very simple
program with two threads each running two actions,
resulting in a single Mazurkiewicz trace.
More tests will be added with more actors
as a stress test for the more elaborate conditions
checked for when computing extension sets for
CommWait
Maxwell Pirtle [Tue, 18 Apr 2023 08:17:51 +0000 (10:17 +0200)]
Add monotonically-increasing IDs for UnfoldingEvent
UDPOR is inherently non-deterministic in the
sense that multiple routes may exist that UDPOR
can follow from any given configuration. Correctness
and optimality are not affected by these results;
however, we seek for SimGrid to have a deterministic
execution on all platforms while running UDPOR.
Prior to this commit, arbitrarily the first event in
an unordered set was selected. But since the "first"
event in an unordered set is implementation-defined,
we seek to avoid leaving it up to the standard library's
ordering and define instead an ordering ourselves.
This motivates assigning a monotonically-increasing
ID to each newly-created event. Note that since
events may be created and then ultimately
destroyed after UDPOR realizes it has created a duplicate
event (which can happen when computing the extension
set of two configurations whose extension sets overlap),
events that exist in the unfolding need not contain
a contiguous range of IDs.
To provide a deterministic order, we must first process
the transitions that are enabled from any given state
in a determinstic order so that events are discovered
in a determinstic order. Furthermore, we must always
pick events from the intersection of en(C) and A in
a determinstic order. Here, we always pick events
with the smallest assigned ID first.
Maxwell Pirtle [Mon, 17 Apr 2023 09:24:37 +0000 (11:24 +0200)]
Expand sanity-check tests for CommSend/CommRecv transitions
A very, very basic test was added to ensure that
the most trivial program was treated correctly.
More tests will be added which will make for more
interesting scenarios. The difficulty lies with
creating the unfolding itself: there's no better
way than to do so manually and to follow along
with where UDPOR would take us...
Maxwell Pirtle [Mon, 17 Apr 2023 08:38:29 +0000 (10:38 +0200)]
Add preliminary basic tests for ex(C) computation
Testing the correctness of the computation for
extension sets is critical, as extension sets
guide the entire UDPOR search. Unfortunately it
is also very difficult to create tests for computing
the extension sets...
Arnaud Giersch [Thu, 8 Jun 2023 20:35:40 +0000 (22:35 +0200)]
Factorize common code to cancel actions when a resource is turned off.
Martin Quinson [Wed, 7 Jun 2023 15:20:44 +0000 (15:20 +0000)]
Merge branch 'master' into 'master'
Enhancing guiding strategies for McSimGrid
See merge request simgrid/simgrid!161
mlaurent [Wed, 7 Jun 2023 15:03:32 +0000 (17:03 +0200)]
Fix CI tests
mlaurent [Wed, 7 Jun 2023 14:49:27 +0000 (16:49 +0200)]
Merge branch 'master' of https://framagit.org/simgrid/simgrid
mlaurent [Wed, 7 Jun 2023 14:12:38 +0000 (16:12 +0200)]
Better strategy documentation
Arnaud Giersch [Wed, 7 Jun 2023 07:37:02 +0000 (09:37 +0200)]
Buffers should not be considered by CommWaitTransition::depends.
Update tesh files accordingly.
mlaurent [Wed, 7 Jun 2023 13:26:35 +0000 (15:26 +0200)]
Use xbt::random instead of rand and srand
mlaurent [Wed, 7 Jun 2023 12:39:42 +0000 (14:39 +0200)]
Better warning message for max-depth
mlaurent [Wed, 7 Jun 2023 10:46:36 +0000 (12:46 +0200)]
Merge branch 'master' of https://framagit.org/simgrid/simgrid
Arnaud Giersch [Wed, 7 Jun 2023 09:44:02 +0000 (11:44 +0200)]
Remove unused parameters (sonar).
Arnaud Giersch [Wed, 7 Jun 2023 09:38:07 +0000 (11:38 +0200)]
Connect the right signal.
Arnaud Giersch [Wed, 7 Jun 2023 09:37:05 +0000 (11:37 +0200)]
Declare functions "const" (sonar).
Arnaud Giersch [Wed, 7 Jun 2023 09:03:12 +0000 (11:03 +0200)]
Another round of pointer-to-const for sonar.
Arnaud Giersch [Wed, 7 Jun 2023 08:44:40 +0000 (10:44 +0200)]
Use xbt_die instead of xbt_assert(false).
Arnaud Giersch [Wed, 7 Jun 2023 08:28:32 +0000 (10:28 +0200)]
Disable maybe throwing move constructor (sonar).
mlaurent [Tue, 6 Jun 2023 15:11:35 +0000 (17:11 +0200)]
Merge branch 'master' of https://framagit.org/simgrid/simgrid
Arnaud Giersch [Tue, 6 Jun 2023 13:07:10 +0000 (15:07 +0200)]
Sort MANIFEST.in.
[ci-skip]
mlaurent [Tue, 6 Jun 2023 12:19:49 +0000 (14:19 +0200)]
Few more CI tesh fixing
mlaurent [Tue, 6 Jun 2023 12:06:18 +0000 (14:06 +0200)]
Fix stat order for CI tests
Arnaud Giersch [Tue, 6 Jun 2023 10:51:16 +0000 (12:51 +0200)]
Fix build without MC.
mlaurent [Tue, 6 Jun 2023 10:05:29 +0000 (12:05 +0200)]
Merge branch 'master' of https://framagit.org/simgrid/simgrid
mlaurent [Tue, 6 Jun 2023 10:05:18 +0000 (12:05 +0200)]
Fix Manifest.in
Arnaud Giersch [Tue, 6 Jun 2023 10:02:17 +0000 (12:02 +0200)]
Clang-tidy: readability-qualified-auto.
Also add const qualifiers to pointers and references when possible.
Arnaud Giersch [Tue, 6 Jun 2023 09:59:15 +0000 (11:59 +0200)]
Define classes with "class".
Arnaud Giersch [Tue, 6 Jun 2023 09:48:30 +0000 (11:48 +0200)]
Postpone the destruction of Task::current_activity_.
Fixes heap-use-after-free spotted by ASan and valgrind.
Arnaud Giersch [Mon, 5 Jun 2023 20:42:27 +0000 (22:42 +0200)]
Various cleanups in Task plugin.
* reduce number of calls to simcall_answered
* use xbt::signal for the "on_this_*" signals
* reduce scope for static member "inited"
* remove intrusive_ptr_* function for derived classes
mlaurent [Tue, 6 Jun 2023 09:57:25 +0000 (11:57 +0200)]
Add factorisation for strategy and Use dynamic over static cast
mlaurent [Mon, 5 Jun 2023 18:56:26 +0000 (20:56 +0200)]
Merge branch 'master' of https://framagit.org/mwapl/simgrid
Martin Quinson [Mon, 5 Jun 2023 15:36:14 +0000 (17:36 +0200)]
Install package non-interactively on CI
Martin Quinson [Mon, 5 Jun 2023 15:18:25 +0000 (17:18 +0200)]
Another struct/class mismatch between forward declaration and actual use
Martin Quinson [Mon, 5 Jun 2023 14:12:43 +0000 (16:12 +0200)]
Enable the ODPOR/SDPOR tests in default builds also
Martin Quinson [Mon, 5 Jun 2023 14:02:13 +0000 (16:02 +0200)]
Please clang by not defaulting a constructor that it will delete
odpor_tests_private.hpp:24:3: error: explicitly defaulted default constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
DependentIfSameValueAction() = default;
^
odpor_tests_private.hpp:21:13: note: default constructor of 'DependentIfSameValueAction' is implicitly deleted because field 'value' of const-qualified type 'const int' would not be initialized
const int value;
^
mlaurent [Mon, 5 Jun 2023 14:09:11 +0000 (16:09 +0200)]
Merge branch 'master' of https://framagit.org/simgrid/simgrid
mlaurent [Mon, 5 Jun 2023 14:08:39 +0000 (16:08 +0200)]
Fix stat missorder at the end of DFSexplorer
Arnaud Giersch [Mon, 5 Jun 2023 13:45:33 +0000 (15:45 +0200)]
Cosmetics: whitespace cleanup (codefactor.io).
Arnaud Giersch [Mon, 5 Jun 2023 07:55:07 +0000 (09:55 +0200)]
Call CommImpl::set_iface(nullptr) as soon as the comm is finished, and make TSan happy with s4u-app-masterworkers-parallel tests.
Martin Quinson [Mon, 5 Jun 2023 13:51:06 +0000 (13:51 +0000)]
Merge branch 'fix-sonar-task' into 'master'
Fix sonar task
See merge request simgrid/simgrid!160
Adrien Gougeon [Mon, 5 Jun 2023 13:14:09 +0000 (15:14 +0200)]
more sonar fix
Adrien Gougeon [Mon, 5 Jun 2023 12:55:57 +0000 (14:55 +0200)]
fix sonar warnings
Martin Quinson [Mon, 5 Jun 2023 12:46:11 +0000 (12:46 +0000)]
Merge branch 'odpor-clean-ups' into 'master'
Address Comments/Errors from ODPOR/SDPOR Integration
See merge request simgrid/simgrid!159
Arnaud Giersch [Mon, 5 Jun 2023 12:37:21 +0000 (14:37 +0200)]
Fix RuntimeError: pybind11::handle::inc_ref() PyGILState_Check() failure.
See commit
2c2d94471739d82e9cbd370711f73377e0b17717 for details.
Martin Quinson [Mon, 5 Jun 2023 12:33:15 +0000 (14:33 +0200)]
CI pages: try to use the Debian version of the python packages
Martin Quinson [Mon, 5 Jun 2023 12:24:30 +0000 (14:24 +0200)]
Remove a test that was indended to show that this branch is never used
Maxwell Pirtle [Mon, 5 Jun 2023 12:17:08 +0000 (14:17 +0200)]
Complete missing docs for WakeupTreeNode
Maxwell Pirtle [Mon, 5 Jun 2023 12:00:50 +0000 (14:00 +0200)]
Add more documentation and fix forward declaration
mlaurent [Mon, 5 Jun 2023 11:59:56 +0000 (13:59 +0200)]
Merge branch 'master' of https://framagit.org/simgrid/simgrid
mlaurent [Mon, 5 Jun 2023 11:56:03 +0000 (13:56 +0200)]
Fix few typos and add random seed intializer
Martin Quinson [Mon, 5 Jun 2023 10:38:58 +0000 (12:38 +0200)]
Use Debian:12 for our build deps
Martin Quinson [Mon, 5 Jun 2023 10:26:59 +0000 (10:26 +0000)]
Merge branch 'rename-operation-task' into 'master'
rename operation to task
See merge request simgrid/simgrid!158
Martin Quinson [Mon, 5 Jun 2023 10:22:51 +0000 (10:22 +0000)]
Merge branch 'odpor-implementation' into 'master'
Introduce SDPOR and ODPOR into Simgrid
See merge request simgrid/simgrid!154
Fred Suter [Sun, 4 Jun 2023 18:52:18 +0000 (14:52 -0400)]
fire on_start for one-sided communication instead of on_send/recv
Fred Suter [Sun, 4 Jun 2023 18:37:18 +0000 (14:37 -0400)]
add Comm::on_this_send and Comm::on_this_recv
Fred Suter [Sun, 4 Jun 2023 16:22:46 +0000 (12:22 -0400)]
[no-ci] indicate which methods and signals are static in the doc
Fred Suter [Fri, 2 Jun 2023 21:17:22 +0000 (17:17 -0400)]
[no-ci] precise which methods of the Actor class are static
Arnaud Giersch [Fri, 2 Jun 2023 16:18:09 +0000 (18:18 +0200)]
This should be fixed now.
Arnaud Giersch [Fri, 2 Jun 2023 16:09:56 +0000 (18:09 +0200)]
A deleted Comm cannot be a valid iface anymore.
Adrien Gougeon [Fri, 2 Jun 2023 07:50:56 +0000 (09:50 +0200)]
rename operation to task. rename execute to fire.
Fred Suter [Thu, 1 Jun 2023 22:06:23 +0000 (18:06 -0400)]
properly remove the old signals and prevent MC to fire Comm::on_this_completion
Fred Suter [Thu, 1 Jun 2023 22:05:18 +0000 (18:05 -0400)]
react to the proper signals
Maxwell Pirtle [Thu, 1 Jun 2023 11:21:23 +0000 (13:21 +0200)]
Introduce ODPOR integration with multiple actions
Prior commits had missing integration with transitions
which could be executed multiple times in the form of
variants. This commit resolves those issues by making
two important modifications:
1. Determining the "current thing that actor X is
running" from a given state `s` has been modified
to reflect what we would expect if we asked the
question even after having exhausted all combinations;
the the case where all combinations have been executed,
the last variant is that which we would expect to be
considered the transition which were enabled at `s`.
This allows us to "fix" the spot in ODPOR where we
need to determine those actions enabled at a given
state `s`. We need to treat it as if only one variant
actually exists; for if there are differences in the
dependency structure for each variant, we wouldn't
want to erroneously deduce that an actor `X` were
a weak initial for some prefix `E'` of `E` and
for some extension `v` of `E'` based on what it
HAD run in the past.
2. In ODPOR, we now only insert members into the
sleep set when all variants of a transition have
been executed. This ensures that we are effectively
treating each variant in isolation from one another;
it is only when we reach the last variant that we
can finally go ahead and say "OK actor X you can
go into the sleep set now". Note that it's perfectly
possible for the actor to later end up in sleep sets
of states that occur *later on*; but for the sleep
set that is at *this* state, we'd want to be sure
only to add it after having explored the state space
with each variant. The reasoning is the same as in
point 1: we wouldn't want the sleep set to be based
on an action that the actor HAD run in the past as
the proxy representing what that actor is doing IN
THE PRESENT. If the dependencies were different among
the different variants, we'd have an issue if we
had previously added the other variants
Martin Quinson [Thu, 1 Jun 2023 11:20:43 +0000 (11:20 +0000)]
Merge branch 'python-repr' into 'master'
add repr for many simgrid objects
See merge request simgrid/simgrid!156
Adrien Gougeon [Thu, 1 Jun 2023 09:48:52 +0000 (11:48 +0200)]
switch repr to Class(objectname). fix python operation tests.
Maxwell Pirtle [Thu, 1 Jun 2023 09:10:18 +0000 (11:10 +0200)]
Add small test for insertions
Adrien Gougeon [Thu, 1 Jun 2023 08:49:52 +0000 (10:49 +0200)]
add repr for many simgrid objects. replace mailbox __str__ to match __repr__ of others objects. clang-format.
Maxwell Pirtle [Thu, 1 Jun 2023 07:16:30 +0000 (09:16 +0200)]
Add odpor_tests_private.hpp to MANIFEST.in
Arnaud Giersch [Thu, 1 Jun 2023 07:23:19 +0000 (09:23 +0200)]
ASan: yet another odr-violation to ignore.
Arnaud Giersch [Wed, 31 May 2023 08:48:26 +0000 (10:48 +0200)]
Add missing includes.
Arnaud Giersch [Wed, 31 May 2023 08:48:26 +0000 (10:48 +0200)]
Correct signature for deleted constructor.
Fred Suter [Wed, 31 May 2023 21:38:07 +0000 (17:38 -0400)]
firing on_this_completion breaks a lot of tests and I don't see how to fix this (@agiersch, any idea?)
Fred Suter [Wed, 31 May 2023 20:55:13 +0000 (16:55 -0400)]
add on_this_veto signal to Activities
Fred Suter [Wed, 31 May 2023 20:38:06 +0000 (16:38 -0400)]
forgot to fire signals
Fred Suter [Wed, 31 May 2023 20:27:26 +0000 (16:27 -0400)]
simplify example
Fred Suter [Wed, 31 May 2023 20:21:37 +0000 (16:21 -0400)]
add on_this_[suspend,resume] signals to Activities
Fred Suter [Wed, 31 May 2023 20:03:55 +0000 (16:03 -0400)]
add on_this_completion signal to Activities
Fred Suter [Wed, 31 May 2023 19:27:27 +0000 (15:27 -0400)]
add on_this_start signal to Activities
Fred Suter [Wed, 31 May 2023 14:10:41 +0000 (10:10 -0400)]
improve comment
Martin Quinson [Wed, 31 May 2023 15:11:10 +0000 (15:11 +0000)]
Merge branch 'doc-photovoltaic-plugin' into 'master'
add links to photovoltaic power/cost models in docs
See merge request simgrid/simgrid!155
Adrien Gougeon [Wed, 31 May 2023 14:18:34 +0000 (16:18 +0200)]
add links to power/cost models in docs
Maxwell Pirtle [Wed, 31 May 2023 13:18:31 +0000 (15:18 +0200)]
Add SDPOR backtracking simulation unit test
This commit adds a small unit test which
simulates the process of determining which
threads need to be added into the backtrack
set of a given state using SDPOR
Maxwell Pirtle [Wed, 31 May 2023 12:14:12 +0000 (14:14 +0200)]
Add more independence tests w.r.t a partial execution
Martin Quinson [Wed, 31 May 2023 12:30:47 +0000 (12:30 +0000)]
Merge branch 'operation-python' into 'master'
add python bindings for operations
See merge request simgrid/simgrid!153
Martin Quinson [Wed, 31 May 2023 12:23:45 +0000 (14:23 +0200)]
Merge branch 'simgrid-fork-plugin-photovoltaic'
Maxwell Pirtle [Wed, 31 May 2023 07:20:55 +0000 (09:20 +0200)]
Fix MANIFEST.in etc.
Fred Suter [Wed, 31 May 2023 01:38:16 +0000 (21:38 -0400)]
move on_start and on_completion from CommImpl to Comm