Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
14 months agomessing with git actions
Martin Quinson [Thu, 2 Mar 2023 07:44:09 +0000 (08:44 +0100)]
messing with git actions

14 months agoFix yaml syntax :(
Martin Quinson [Thu, 2 Mar 2023 07:42:02 +0000 (08:42 +0100)]
Fix yaml syntax :(

14 months agoAdd a github action to test our git on Debian11, regular and MC
Martin Quinson [Thu, 2 Mar 2023 07:37:31 +0000 (08:37 +0100)]
Add a github action to test our git on Debian11, regular and MC

This is triggered manually, when jenkins is off as right now

14 months agoPass on documentation's Design Goals section
Henri Casanova [Thu, 2 Mar 2023 02:38:48 +0000 (16:38 -1000)]
Pass on documentation's Design Goals section

14 months agoMore work on the documentation's Models section
Henri Casanova [Wed, 1 Mar 2023 23:38:37 +0000 (13:38 -1000)]
More work on the documentation's Models section

14 months agoNew function SMPI_app_instance_start() to easily start a MPI instance in your S4U...
Martin Quinson [Wed, 1 Mar 2023 20:44:56 +0000 (21:44 +0100)]
New function SMPI_app_instance_start() to easily start a MPI instance in your S4U simulation

14 months agoTry to fix a fixme blindly, just in case it was easy
Martin Quinson [Wed, 1 Mar 2023 19:56:56 +0000 (20:56 +0100)]
Try to fix a fixme blindly, just in case it was easy

14 months agoPass on the documentation's Introduction page. Minor grammatical fixes,
Henri Casanova [Wed, 1 Mar 2023 19:34:00 +0000 (09:34 -1000)]
Pass on the documentation's Introduction page. Minor grammatical fixes,
some rewrites and word changes, minor content removal due to redundancy.

15 months agoFix make distcheck
Martin Quinson [Tue, 28 Feb 2023 18:12:26 +0000 (19:12 +0100)]
Fix make distcheck

15 months agoMerge branch 'udpor-phase3' into 'master'
Augustin Degomme [Tue, 28 Feb 2023 15:59:29 +0000 (15:59 +0000)]
Merge branch 'udpor-phase3' into 'master'

Phase 2.5 of UDPOR Integration: Add Iterators for Subsets

See merge request simgrid/simgrid!134

15 months agoAdd src/xbt/.../subsets_tests.cpp to manifest file
Maxwell Pirtle [Tue, 28 Feb 2023 15:36:36 +0000 (16:36 +0100)]
Add src/xbt/.../subsets_tests.cpp to manifest file

15 months agoRemove CompatibilityGraph and friends
Maxwell Pirtle [Tue, 28 Feb 2023 14:52:20 +0000 (15:52 +0100)]
Remove CompatibilityGraph and friends

The CompatibilityGraph and friends that were
added in order to compute maximal sets of events
needlessly complicated the algorithm. A much
better approach was suggested which will be
implemented in the next phase.

While perhaps a rebase could also have been
performed, it would have required quite careful
precision. Since the end goal is the same and
there are better uses of our time, I simply opted
to tag on another commit

15 months agoAdd tests for LazyKSubsets and LazyPowerset
Maxwell Pirtle [Tue, 28 Feb 2023 14:31:54 +0000 (15:31 +0100)]
Add tests for LazyKSubsets and LazyPowerset

The LazyKSubsets and LazyPowerset are simply
wrappers around an iterator type which can
enumerate all subsets of a given iteration.

While this won't be used anymore to enumerate
all possible sets of events of the configuration
in the compatibility graph, which will soon be
removed, it will still be used (or a variant
thereof) when computing K-partial alternatives
later on

15 months agoAdd LazyPowerSet and LazyKSubsets
Maxwell Pirtle [Tue, 28 Feb 2023 10:30:28 +0000 (11:30 +0100)]
Add LazyPowerSet and LazyKSubsets

Two new classes were added that act effectively
as convenience methods around creating subset
iterators. The classes themselves act mostly
like iterators but are instead light-weight
"containers" which can be iterated over. Effectively,
they are contains which "contain" the entire
collection of subsets (of size k respectively) of
some collection without actually storing that collection
in memory.

15 months agoAdd more comments to subsets_iterator implementation
Maxwell Pirtle [Tue, 28 Feb 2023 10:14:43 +0000 (11:14 +0100)]
Add more comments to subsets_iterator implementation

15 months agoAdd powerset_iterator to simgrid::xbt
Maxwell Pirtle [Tue, 28 Feb 2023 09:24:35 +0000 (10:24 +0100)]
Add powerset_iterator to simgrid::xbt

The powerset_iterator, as its name suggests,
is an iterator which traverses over all elements
of the power set of the elements traversed by another
iterator. It makes heavy use of the subsets_iterator
from which it derives its functionality (delegation
rather than inheritance)

15 months agoUse boost::iterator_facade for subsets_iterator
Maxwell Pirtle [Tue, 28 Feb 2023 08:37:19 +0000 (09:37 +0100)]
Use boost::iterator_facade for subsets_iterator

The subsets_iterator class is now implemented
in terms of the boost::iterator_facade which simplies
the implementation considerably of the iterator. The
same approach will be used to write the implementation
for powerset_iterator and the history_iterator (the latter
used to traverse the history of a set of events)

15 months agoUpdate .mailmap [ci-skip]
Arnaud Giersch [Mon, 27 Feb 2023 16:13:35 +0000 (17:13 +0100)]
Update .mailmap [ci-skip]

15 months agodoc: Rework the intro pages
Martin Quinson [Mon, 27 Feb 2023 23:17:32 +0000 (00:17 +0100)]
doc: Rework the intro pages

15 months agoRemove subsets.cpp file
Maxwell Pirtle [Mon, 27 Feb 2023 15:40:48 +0000 (16:40 +0100)]
Remove subsets.cpp file

Since the subsets_iterator is defined using
templates, it needs to be defined solely in
the header file. Thus the cpp file is extraneous
and was removed

15 months agoAdd "working" (but untested) implementation of iterative subsets
Maxwell Pirtle [Mon, 27 Feb 2023 15:37:15 +0000 (16:37 +0100)]
Add "working" (but untested) implementation of iterative subsets

The k-subsets higher-order iterator appears to be
working as expected after fixing a couple of issues
while run under GDB. The next phase is to test this
iterator heavily on a number of different examples
to prove that the iteration works as expected.

Future commits will add two important data structures,
viz. the LazyPowerSet and the LazyKSubsets, both of
which will be used when computing cliques in the
compatibility graph later on

15 months agoAdd first "implementation" of k-subsets iterator
Maxwell Pirtle [Mon, 27 Feb 2023 14:47:04 +0000 (15:47 +0100)]
Add first "implementation" of k-subsets iterator

The higher-order iterator `subsets_iterator`
iterates over all subsets of a given iterator.
Eventually, we'll create the LazyPowerSet and
LazyKSubsets classes which will act as convenience
wrappers around the creation of a k-subset iterator

15 months agoAdd iterator files to xbt/utils
Maxwell Pirtle [Mon, 27 Feb 2023 12:46:14 +0000 (13:46 +0100)]
Add iterator files to xbt/utils

15 months agoPlug a memleak + experience that code out of the MC test for coverage
Martin Quinson [Mon, 27 Feb 2023 13:54:13 +0000 (14:54 +0100)]
Plug a memleak + experience that code out of the MC test for coverage

15 months agocosmetics in docs
Martin Quinson [Mon, 27 Feb 2023 10:08:38 +0000 (11:08 +0100)]
cosmetics in docs

15 months agoAsynchronous locks and fluid I/O streams were aded at some point
Martin Quinson [Mon, 27 Feb 2023 09:16:31 +0000 (10:16 +0100)]
Asynchronous locks and fluid I/O streams were aded at some point

15 months agoAdd 3 figures to the design goals + minor rewording
Martin Quinson [Sun, 26 Feb 2023 23:32:48 +0000 (00:32 +0100)]
Add 3 figures to the design goals + minor rewording

15 months agoUpdate release notes
Martin Quinson [Sun, 26 Feb 2023 21:45:53 +0000 (22:45 +0100)]
Update release notes

15 months agoFix most of the remaining code warnings
Maxwell Pirtle [Mon, 27 Feb 2023 08:20:49 +0000 (09:20 +0100)]
Fix most of the remaining code warnings

This commit fixes the majority of the code
warnings pointed out by SonarSource. There
are some others that will disappear with other
phases once e.g. the functions in UdporChecker
are actually implemented

15 months agoAdd default method for constructing full graph
Maxwell Pirtle [Mon, 27 Feb 2023 07:57:23 +0000 (08:57 +0100)]
Add default method for constructing full graph

A convenience method was added which allows the
full compatibility graph to be constructed without
needing to specify that each node should be included.

15 months agoAdd predicate filtering to compatibility graph comp
Maxwell Pirtle [Fri, 24 Feb 2023 14:40:39 +0000 (15:40 +0100)]
Add predicate filtering to compatibility graph comp

Computing the compatibility graph should attempt to
disqualify as many events as possible from the configuration
to minimize the size of the resulting compatibility graph.
This is _esepcially_ important because we will enumerate
all cliques of the graph and subsequently all possible
events contains within each node. This means that removing
even one or two nodes could reduce the time spent in
enumeration dramatically.

For now, the UdporChecker can only prune based on
dependency. Perhaps, though, there are more clever
ways to prune based on whether `a` is enabled e.g.
in knowing some properties about the event structure.
This will be investigated later, but is a secondary
concern to getting an implementation of the algorithm
up-and-running.

15 months agoFix most cosmetics and code warnings
Maxwell Pirtle [Fri, 24 Feb 2023 13:15:12 +0000 (14:15 +0100)]
Fix most cosmetics and code warnings

15 months agoCreate a private struct to hold search data
Maxwell Pirtle [Fri, 24 Feb 2023 12:52:40 +0000 (13:52 +0100)]
Create a private struct to hold search data

This commits replaces the three separate maps
used to keep track of per-event data in favor
of a single map which maps events to a struct with
three fields

15 months agoAdd first go at compatibility graph construction
Maxwell Pirtle [Fri, 24 Feb 2023 12:30:36 +0000 (13:30 +0100)]
Add first go at compatibility graph construction

This commit introduces the first (albeit incomplete)
implementation of the function which will convert
a configuration into a comptability graph which can
be iterated over with k-cliques

15 months agoAdd first steps towards an implementation of ex(C)
Maxwell Pirtle [Thu, 23 Feb 2023 15:46:03 +0000 (16:46 +0100)]
Add first steps towards an implementation of ex(C)

15 months agoAdd CompatibilityGraph and CompatibilityGraphNode
Maxwell Pirtle [Thu, 23 Feb 2023 14:14:03 +0000 (15:14 +0100)]
Add CompatibilityGraph and CompatibilityGraphNode

Two important classes were added as part of the
process to support UDPOR. The classes added will be
used to maintain compatibility between "strands" of
the event structure for determining maximal sets of
events

15 months ago[ci skip] add lstdc++ to bigdft flags as well
Augustin Degomme [Sun, 26 Feb 2023 21:46:50 +0000 (22:46 +0100)]
[ci skip] add lstdc++ to bigdft flags as well

15 months agobigdft - attempt at fixing build error with new C++ file in futile
Augustin Degomme [Sun, 26 Feb 2023 21:04:27 +0000 (21:04 +0000)]
bigdft - attempt at fixing build error with new C++ file in futile

15 months agoAllow to control the problem size from the cmd line, and reduce the instance in MC
Martin Quinson [Sun, 26 Feb 2023 16:17:19 +0000 (17:17 +0100)]
Allow to control the problem size from the cmd line, and reduce the instance in MC

The previous instance size resulted in a timeout now that the DPOR
reduction is less efficient (because it's less buggy)

15 months agoRevalidate a tesh file (result of a merge error)
Martin Quinson [Sun, 26 Feb 2023 16:16:25 +0000 (17:16 +0100)]
Revalidate a tesh file (result of a merge error)

15 months agoUse bool for booleans
Martin Quinson [Sun, 26 Feb 2023 15:07:41 +0000 (16:07 +0100)]
Use bool for booleans

15 months agoKill a now useless field
Martin Quinson [Sun, 26 Feb 2023 13:15:14 +0000 (14:15 +0100)]
Kill a now useless field

15 months agoMerge branch 'master' into 'master'
Martin Quinson [Sun, 26 Feb 2023 15:07:08 +0000 (15:07 +0000)]
Merge branch 'master' into 'master'

Fixes on DPOR algorithm for MC SimGrid and sleep sets addition

See merge request simgrid/simgrid!128

15 months agoAlso detect the disk failures
Martin Quinson [Sun, 26 Feb 2023 11:30:26 +0000 (12:30 +0100)]
Also detect the disk failures

15 months agoFurther simplify the way host failures are detected
Martin Quinson [Sun, 26 Feb 2023 11:11:49 +0000 (12:11 +0100)]
Further simplify the way host failures are detected

Do as it's done in links and communications: when the resource is
turned off, simply mark the actions it hosts as FAILED.

That's much simpler than the convoluted existing code, which relied on
the Host::on_state_change signal. Each activity pushed a callback to
check whether it was its host which failed. Gosh, so convoluted...

The current change is not completely applied to CpuTI model, which
seems to have another way to mark the actions as failing. So I
override CpuTI::turn_off() to not mark the actions as failing to avoid
a segfault. It's a bit lame, but CpuTI is too different, I feel lazy.

15 months agoSimplify the way Execs detect host failures
Martin Quinson [Sat, 25 Feb 2023 17:40:49 +0000 (18:40 +0100)]
Simplify the way Execs detect host failures

Have the ExecImpl install the callback instead of having the s4u::Exec
do so, and then set an internal field of ExecImpl.

15 months agoRevert "Include the output of this test in the tesh file, because it's linked from...
Martin Quinson [Fri, 24 Feb 2023 17:51:13 +0000 (18:51 +0100)]
Revert "Include the output of this test in the tesh file, because it's linked from the doc now"

This reverts commit 0c5a9c80339933853647914ea9f716ef4fc8413c.

The output does not seem to be portable :(

15 months agoBummer :(
Martin Quinson [Fri, 24 Feb 2023 17:39:52 +0000 (18:39 +0100)]
Bummer :(

15 months agoClear timeout detectors on finish().
Arnaud Giersch [Fri, 24 Feb 2023 15:12:19 +0000 (16:12 +0100)]
Clear timeout detectors on finish().

Fixes transient errors seen with s4u-dht-chord-parallel tests.

15 months agoFill cmdline_ for each instance of EngimeImpl.
Arnaud Giersch [Fri, 24 Feb 2023 14:30:34 +0000 (15:30 +0100)]
Fill cmdline_ for each instance of EngimeImpl.

Even if there is only one instance!
Fixes a memory leak occurring when sg_config_init() exits early.

15 months agoUpdate sonar-project.properties [ci-skip]
Arnaud Giersch [Fri, 24 Feb 2023 13:48:59 +0000 (14:48 +0100)]
Update sonar-project.properties [ci-skip]

15 months agoTwo more random hints to contributors (and reindent the existing ones)
Martin Quinson [Fri, 24 Feb 2023 15:39:28 +0000 (16:39 +0100)]
Two more random hints to contributors (and reindent the existing ones)

15 months agoAdd some Noteworthy tests to the Contributor's doc
Martin Quinson [Fri, 24 Feb 2023 15:32:27 +0000 (16:32 +0100)]
Add some Noteworthy tests to the Contributor's doc

15 months agoWhen the chaos monkey is invoked with nothing to do, it tells a usage message and...
Martin Quinson [Fri, 24 Feb 2023 15:07:22 +0000 (16:07 +0100)]
When the chaos monkey is invoked with nothing to do, it tells a usage message and kills everything

15 months agoInclude the output of this test in the tesh file, because it's linked from the doc now
Martin Quinson [Fri, 24 Feb 2023 15:01:41 +0000 (16:01 +0100)]
Include the output of this test in the tesh file, because it's linked from the doc now

15 months agoAllow to specify the parameters on the command line, when the test is not run from...
Martin Quinson [Fri, 24 Feb 2023 15:00:57 +0000 (16:00 +0100)]
Allow to specify the parameters on the command line, when the test is not run from its favorite directory

15 months agoMerge branch 'udpor-phase2' into 'master'
Martin Quinson [Fri, 24 Feb 2023 14:58:44 +0000 (14:58 +0000)]
Merge branch 'udpor-phase2' into 'master'

Phase 2 of UDPOR Integration: Add topological sorting of events in a configuration

See merge request simgrid/simgrid!133

15 months agoMerge branch 'master' of https://framagit.org/simgrid/simgrid
mlaurent [Fri, 24 Feb 2023 14:42:51 +0000 (15:42 +0100)]
Merge branch 'master' of https://framagit.org/simgrid/simgrid

15 months agofix the done marking of multiple times taken transitions
mlaurent [Fri, 24 Feb 2023 13:46:46 +0000 (14:46 +0100)]
fix the done marking of multiple times taken transitions

15 months agoAdd complicated topological sort test
Maxwell Pirtle [Thu, 23 Feb 2023 10:46:10 +0000 (11:46 +0100)]
Add complicated topological sort test

The test added ensures that for each element
in the sequence of events in the topological
sorting:

1. no event in the history of event `i` appears
in the list of events before event `i` (i.e.
events 0, ..., `i - 1`) in the case of the reverse
graph

2. every event in the history of event `i` (except
`e` itself) appears in the list of events before
`i` (i.e. events 0, ..., `i - 1`) in the case of
the event structure ordering

15 months agoAdd first unit tests for topological sorting
Maxwell Pirtle [Thu, 23 Feb 2023 10:17:27 +0000 (11:17 +0100)]
Add first unit tests for topological sorting

A few unit tests were added to support topological
sorting of events in a configuration. In the future,
a more robust test will be added which ensures that each
newly-discovered event in the reverse order has never
been discovered before

15 months agoAdd topological sort of configuration events
Maxwell Pirtle [Wed, 22 Feb 2023 14:36:18 +0000 (15:36 +0100)]
Add topological sort of configuration events

Topological sorting is an important first step
in determining which groups of events in a
configuration need to be tested together when
looking at all possible subsets of maximal events
of a configuration. The idea is that you first
build a compatability graph (soon to come) whose
elements represent "chains" of the event structure
that are mutually exslcusive and whose edges
describe which chains are mutually compatible
with one another. Then, you look for all possible
cliques within the graph to determine all possible
configurations of these chains. Each of the
major components of this process will be added in
subsequent commits

15 months agoDocument more changes, and update the Release Notes
Martin Quinson [Fri, 24 Feb 2023 00:27:35 +0000 (01:27 +0100)]
Document more changes, and update the Release Notes

15 months agoAdd a comment on why we need such a callback
Martin Quinson [Fri, 24 Feb 2023 00:19:09 +0000 (01:19 +0100)]
Add a comment on why we need such a callback

15 months agoMerge ActivityImpl::post() and ::finish()
Martin Quinson [Thu, 23 Feb 2023 22:59:27 +0000 (23:59 +0100)]
Merge ActivityImpl::post() and ::finish()

15 months agoDo not clean twice in Activity::post(), so that even test() can call it
Martin Quinson [Thu, 23 Feb 2023 22:16:03 +0000 (23:16 +0100)]
Do not clean twice in Activity::post(), so that even test() can call it

15 months agouniformization: call post that calls finish
Fred Suter [Thu, 23 Feb 2023 21:14:44 +0000 (16:14 -0500)]
uniformization: call post that calls finish

15 months agoRevert "Get ready for more versions of ns3"
Martin Quinson [Thu, 23 Feb 2023 21:36:16 +0000 (22:36 +0100)]
Revert "Get ready for more versions of ns3"

This reverts commit 1b8e178fc3f8b3339d25692dfb552f79d349f671.

Also, adds a small comment to avoid this trap in the future.

15 months agoSanitize the handling of timeouts in CommImpl, ExecImpl and IoImpl
Martin Quinson [Thu, 23 Feb 2023 21:21:47 +0000 (22:21 +0100)]
Sanitize the handling of timeouts in CommImpl, ExecImpl and IoImpl

There is no need for a timeout detector in ExecImpl and IoImpl, as
wait_for injects a Synchro to that extend on need.

Use a uniq_ptr on the CommImpl timeout detectors, so that the memory
is managed automatically. As it used to be for ExecImpl.

This kills the last occurrence of surf in the code. For real this time.

15 months agoFix distcheck.
Arnaud Giersch [Thu, 23 Feb 2023 20:33:28 +0000 (21:33 +0100)]
Fix distcheck.

15 months agoPrefer ActivityImpl::post() to ::finish() that should die
Martin Quinson [Thu, 23 Feb 2023 20:24:00 +0000 (21:24 +0100)]
Prefer ActivityImpl::post() to ::finish() that should die

15 months agoGet ready for more versions of ns3
Martin Quinson [Wed, 22 Feb 2023 21:58:45 +0000 (22:58 +0100)]
Get ready for more versions of ns3

15 months agoComment out unused private fields (fix compilation error).
Arnaud Giersch [Thu, 23 Feb 2023 20:18:18 +0000 (21:18 +0100)]
Comment out unused private fields (fix compilation error).

15 months agoMerge branch 'simgrid-udpor-integration' into 'master'
Arnaud Giersch [Thu, 23 Feb 2023 17:00:25 +0000 (18:00 +0100)]
Merge branch 'simgrid-udpor-integration' into 'master'

Phase 1 of Integration of UDPOR: Adding UDPOR Constructs

See merge request simgrid/simgrid!132

15 months agoUseless casts to (void*).
Arnaud Giersch [Thu, 23 Feb 2023 16:14:51 +0000 (17:14 +0100)]
Useless casts to (void*).

15 months agoComment is not relevant anymore.
Arnaud Giersch [Thu, 23 Feb 2023 15:48:28 +0000 (16:48 +0100)]
Comment is not relevant anymore.

[ci-skip]

15 months agoUse type aid_t for an actor's PID.
Arnaud Giersch [Thu, 23 Feb 2023 14:58:28 +0000 (15:58 +0100)]
Use type aid_t for an actor's PID.

15 months agoMore Sonar issues.
Arnaud Giersch [Thu, 23 Feb 2023 14:53:26 +0000 (15:53 +0100)]
More Sonar issues.

15 months agoUse normal strings instead of f-strings (Sonar).
Arnaud Giersch [Thu, 23 Feb 2023 14:37:40 +0000 (15:37 +0100)]
Use normal strings instead of f-strings (Sonar).

15 months agoUse C++17's std::scoped_lock where appropriate.
Arnaud Giersch [Thu, 23 Feb 2023 13:00:47 +0000 (14:00 +0100)]
Use C++17's std::scoped_lock where appropriate.

Stick to C++14's std::lock_guard in public headers.

15 months agoDon't access variable ouside of the critical section.
Arnaud Giersch [Thu, 23 Feb 2023 12:53:15 +0000 (13:53 +0100)]
Don't access variable ouside of the critical section.

TSan warned about a data race there.
Also use a std::scoped_lock to handle the mutexi (Sonar).

15 months agoVarious cleanups.
Arnaud Giersch [Tue, 21 Feb 2023 10:59:44 +0000 (11:59 +0100)]
Various cleanups.

Includes:
* prefer simpler overload for channel send/receive
* use direct-initialization for variables
* rename variable and avoid it to be shadowed later
* remove unnecessary casts

15 months agotransitions in the same actor are dependent
mlaurent [Wed, 22 Feb 2023 17:05:37 +0000 (18:05 +0100)]
transitions in the same actor are dependent

15 months agoPartially revert 2ad536e710c5936ff8e525e4bbb5e7046f292aac (Simplify the library initi...
Martin Quinson [Wed, 22 Feb 2023 15:55:44 +0000 (16:55 +0100)]
Partially revert 2ad536e710c5936ff8e525e4bbb5e7046f292aac (Simplify the library initialization) to fix a memleak

15 months agoImplement the semaphore functions in sthread
Martin Quinson [Wed, 22 Feb 2023 15:54:18 +0000 (16:54 +0100)]
Implement the semaphore functions in sthread

15 months agoMerge branch 'master' of https://framagit.org/simgrid/simgrid
mlaurent [Wed, 22 Feb 2023 15:35:29 +0000 (16:35 +0100)]
Merge branch 'master' of https://framagit.org/simgrid/simgrid

15 months agofix a few test with dpor
mlaurent [Wed, 22 Feb 2023 15:34:19 +0000 (16:34 +0100)]
fix a few test with dpor

15 months agoAdd tests for adding events to configurations
Maxwell Pirtle [Wed, 22 Feb 2023 12:40:08 +0000 (13:40 +0100)]
Add tests for adding events to configurations

15 months agoAdd preliminary tests for Configuration
Maxwell Pirtle [Wed, 22 Feb 2023 12:09:50 +0000 (13:09 +0100)]
Add preliminary tests for Configuration

15 months agoprotect the dict initialization against multithreading
Martin Quinson [Wed, 22 Feb 2023 11:37:36 +0000 (12:37 +0100)]
protect the dict initialization against multithreading

15 months agoImplement adding events to configurations
Maxwell Pirtle [Wed, 22 Feb 2023 10:21:06 +0000 (11:21 +0100)]
Implement adding events to configurations

When adding an event to a configuration, we
assert that the configuration actually contains
all of the dependencies of that event within it;
otherwise, we would violate the property that a
configuration contains all of its dependencies.

Note that we do not assert whether or not the
configuration is actually conflict-free: we leave
that to the correctness of UDPOR and other tests which
will assert UDPOR is doing the right thing. But having
this assertion will certainly help catch bugs with the
UDPOR implementation more quickly (termination would
happen at the moment that the algorithm encounters
a spot where it chose an event incorrectly).

15 months agoAdd extensive tests for checking valid configurations
Maxwell Pirtle [Wed, 22 Feb 2023 09:36:33 +0000 (10:36 +0100)]
Add extensive tests for checking valid configurations

An example event structure was given and all
possible subsets of its events were tested for
completeness. Each subset was tested for whether
it was a maximal subset of events (i.e. one for
which no element causes any of the others) and
for whether the set of events qualified for being
a configuration.

An additional observation was made concerning the determination of
whether or not a set of events is maximal. To compute
the maximal events of a given set of events, it suffices
to search the entire history of the events and eliminate
events from the original set as they appear. Note that only
events in the set itself can ever be maximal, as all other
events discovered in the search must have come from one
of these event's dependencies, or one of their dependencies'
dependencies, and so on.

15 months agoCosmetics
Martin Quinson [Tue, 21 Feb 2023 21:08:45 +0000 (22:08 +0100)]
Cosmetics

- Rename xbt_main.cpp -> xbt_misc.cpp to reflect its content
- Stick to our naming schema (Engine::pimpl -> Engine::pimpl_)
- Don't say the loop iterator is const to then const_cast it
- Kill the leftover xbt::binary_name and xbt::cmdline local vars

15 months agologs: protect finalization against multiple calls
Martin Quinson [Tue, 21 Feb 2023 17:21:57 +0000 (18:21 +0100)]
logs: protect finalization against multiple calls

15 months agoLet the xbt_log module register its finalizer itself
Martin Quinson [Tue, 21 Feb 2023 15:00:06 +0000 (16:00 +0100)]
Let the xbt_log module register its finalizer itself

And kill an internal header file that is now empty

15 months agoAdd method to check if an EventSet is a config
Maxwell Pirtle [Tue, 21 Feb 2023 14:53:53 +0000 (15:53 +0100)]
Add method to check if an EventSet is a config

A method was added that determines whether or not
some set of events (i.e. an `EventSet`) are actually
a valid configuration or not. The question of choosing
valid configurations is up to UDPOR, so while enforcing
that each and every event added to a configuration
be checked to ensure that the configuration remains
as such, it is not strictly necessary. However, it
will help us identify bugs with configurations if
and when they arise.

The key idea behind checking whether a set of events
forms a configuration is to again leverage the power
of History. If while searching through the history
of a set of events you stumble upon an event that is
not part of the original group, then you know that
said group cannot be a configuration since at least
one of the member's dependencies are not part of the
group.

15 months agoKill simgrid::xbt::cmdline and simgrid::xbt::binary_name
Martin Quinson [Tue, 21 Feb 2023 14:53:00 +0000 (15:53 +0100)]
Kill simgrid::xbt::cmdline and simgrid::xbt::binary_name

15 months agoSimplify the library initialization + deprecate 2 XBT functions
Martin Quinson [Mon, 20 Feb 2023 14:46:02 +0000 (15:46 +0100)]
Simplify the library initialization + deprecate 2 XBT functions

Work toward making EngineImpl::initialize() the only entry point of
the library initialization. It's now impossible to initialize xbt
separately of EngineImpl.

It should help reducing the mess in that code, which results from the
many ways of initializing the library. simgrid-mc, unit-tests, smpi
and others each have their own way of initializing everything,
resulting in a spagetthi and fragile code. It's a bit of a waste to
initialize an EngineImpl even when you don't want to actually run a
simulation, but easier code is always better.

This commit also includes another one because I git amended locally by
error, sorry for the mess. The other commit was about the deprecation
of xbt_procname and xbt_getpid that were xbt functions relying on S4U.

15 months agoRemove a useless lib constructor (simpler is better)
Martin Quinson [Mon, 20 Feb 2023 09:00:22 +0000 (10:00 +0100)]
Remove a useless lib constructor (simpler is better)

15 months agoInitialize the dict module on need, w/o relying on lib constructors
Martin Quinson [Mon, 20 Feb 2023 08:51:18 +0000 (09:51 +0100)]
Initialize the dict module on need, w/o relying on lib constructors