Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
3 years agoMC: Start implementing the dependency functions on the AppSide (TBC)
Martin Quinson [Tue, 4 May 2021 22:24:10 +0000 (00:24 +0200)]
MC: Start implementing the dependency functions on the AppSide (TBC)

(code committed to gather feedback: it's not used yet)

Instead of one big function handling the dependencies for every kind
of transition on the CheckerSide, we will split that logic between the
observer subclasses and execute it on the AppSide. This will induce
more latencies, but hopefully this will make the code more managable.

This commit introduces a MutexSimcall observer, as we want to group
MutexLock and MutexUnlock together when computing the dependencies.

But we cannot use it yet, as we need to have asynchronous locks for
the existing independence theorems to be usable.

3 years agoSome sonar stuff...
Bruno Donassolo [Wed, 5 May 2021 09:02:07 +0000 (11:02 +0200)]
Some sonar stuff...

3 years agoDon't take default smpi compiler flags from the environment.
Arnaud Giersch [Tue, 4 May 2021 21:37:07 +0000 (23:37 +0200)]
Don't take default smpi compiler flags from the environment.

The user must explicitly define them through cmake parameters
SMPI_C_FLAGS, SMPI_CXX_FLAGS, or SMPI_Fortran_FLAGS.

3 years agoCosmetics.
Arnaud Giersch [Tue, 4 May 2021 20:37:59 +0000 (22:37 +0200)]
Cosmetics.

3 years agoPut stdout in line buffer mode for MCed apps.
Arnaud Giersch [Tue, 4 May 2021 20:08:58 +0000 (22:08 +0200)]
Put stdout in line buffer mode for MCed apps.

The call to fflush before backtrack/exit is certainly superfluous now,
but it doesn't harm.

3 years agofix my recent commit: build the binaries in the right directory
Martin Quinson [Tue, 4 May 2021 19:00:45 +0000 (21:00 +0200)]
fix my recent commit: build the binaries in the right directory

3 years agodistcheck, but in a new and shiny way with a lot of cmake stars in the sky
Martin Quinson [Tue, 4 May 2021 17:33:34 +0000 (19:33 +0200)]
distcheck, but in a new and shiny way with a lot of cmake stars in the sky

3 years agofactorize some code in examples/smpi/CMakeLists.txt
Martin Quinson [Tue, 4 May 2021 17:27:34 +0000 (19:27 +0200)]
factorize some code in examples/smpi/CMakeLists.txt

Because factorizing cmake code is what you need today.

3 years agoWarn the user if the sleep time is smaller than the numerical precision
Martin Quinson [Tue, 4 May 2021 15:51:40 +0000 (17:51 +0200)]
Warn the user if the sleep time is smaller than the numerical precision

3 years agocmake: Ensure that the users don't activate minimal-bindings and model-checking together
Martin Quinson [Tue, 4 May 2021 08:27:05 +0000 (10:27 +0200)]
cmake: Ensure that the users don't activate minimal-bindings and model-checking together

3 years agoMC: add a clone() method to all Observers
Martin Quinson [Tue, 4 May 2021 08:22:55 +0000 (10:22 +0200)]
MC: add a clone() method to all Observers

This will be useful for the AppSide to maintain a vector of all
observers on the stack, to move the independency tracking to that side.

3 years agoFix tesh file now that MC flushes the output on backtrack
Martin Quinson [Tue, 4 May 2021 17:22:28 +0000 (19:22 +0200)]
Fix tesh file now that MC flushes the output on backtrack

That's weird, it seems that we don't flush it when the application
ends, as one of the outputs arrives after the end of MC. But I fail to
see in the code where that would come from.

3 years agoMC: also flush application's stdout on backtrack
Martin Quinson [Fri, 30 Apr 2021 22:56:52 +0000 (00:56 +0200)]
MC: also flush application's stdout on backtrack

3 years agoDocument the fact that we have more documentation
Martin Quinson [Fri, 30 Apr 2021 22:32:37 +0000 (00:32 +0200)]
Document the fact that we have more documentation

3 years agoWork around a bug in vscode
Martin Quinson [Fri, 30 Apr 2021 21:20:46 +0000 (23:20 +0200)]
Work around a bug in vscode

3 years agoTuto MC: Add a word about the missing pieces
Martin Quinson [Fri, 30 Apr 2021 15:46:33 +0000 (17:46 +0200)]
Tuto MC: Add a word about the missing pieces

3 years agoDragonflyZone: Add limiters for switches
Bruno Donassolo [Tue, 4 May 2021 15:34:08 +0000 (17:34 +0200)]
DragonflyZone: Add limiters for switches

Final change to make uniform the behavior of limiters in the clusters:
Fat-Tree, Torus and Dragonfly.

Changes in tests flatifier and cluster-multicpu

3 years agoFatTreeZone: Add limiters for switches
Bruno Donassolo [Tue, 4 May 2021 12:53:41 +0000 (14:53 +0200)]
FatTreeZone: Add limiters for switches

Users can set limiters for switches (elements whose level > 0) in Fat-Tree.

Coordinates in Fat-tree are now characterized by: <level, id>, level 0
elements are the leaves (processing nodes).

Uniform limiter behavior in routes: src, destination and middle nodes.

Changes in tests:
1) cluster-multicpu: adjust timing due to new limiters.

2) flatifier tests must be adapted for these reasons:
  - Changed callback to create limiters from XML. Radicals in XML are valid for leaves in the tree. Use internal ID instead.
  - Changed order of links in the route from get_local_route of Fat-trees.

3 years agoTorusZone: Add limiter for destination node
Bruno Donassolo [Fri, 30 Apr 2021 12:53:19 +0000 (14:53 +0200)]
TorusZone: Add limiter for destination node

Uniform the behavior of limiters for clusters: Torus, Dragonfly and
Fat-tree.

Limiters are added in source, destination and middle nodes.
Example: Route from A to C, passing through B (A -> B -> C)
A-> limiter(A) -> link(A-B) -> limiter(B) -> link(B-C) -> limiter(C) ->
C

Adjust test timing because of the new limiter. Also, fix flatifier test,
adding new limiter link at destination.

3 years agoFix leak on test.
Bruno Donassolo [Tue, 4 May 2021 15:57:36 +0000 (17:57 +0200)]
Fix leak on test.

3 years agoMore files to cleanup (windows-wsl).
Arnaud Giersch [Tue, 4 May 2021 14:54:47 +0000 (16:54 +0200)]
More files to cleanup (windows-wsl).

3 years agoFix another Asan false alarm (with clang 12).
Arnaud Giersch [Tue, 4 May 2021 14:39:46 +0000 (16:39 +0200)]
Fix another Asan false alarm (with clang 12).

3 years agoDistcheck.
Arnaud Giersch [Tue, 4 May 2021 14:27:32 +0000 (16:27 +0200)]
Distcheck.

3 years agoFix cmake 3.20 warning.
Arnaud Giersch [Tue, 4 May 2021 14:20:37 +0000 (16:20 +0200)]
Fix cmake 3.20 warning.

Policy CMP0115 is not set: Source file extensions must be explicit.

3 years agomissing override
SUTER Frederic [Tue, 4 May 2021 14:02:34 +0000 (16:02 +0200)]
missing override

3 years agoadd Profile support for Disk
SUTER Frederic [Tue, 4 May 2021 13:33:17 +0000 (15:33 +0200)]
add Profile support for Disk

3 years agocosmetics and typos
SUTER Frederic [Tue, 4 May 2021 06:43:42 +0000 (08:43 +0200)]
cosmetics and typos

3 years agodo not store name in s4u::Disk
SUTER Frederic [Mon, 3 May 2021 15:46:13 +0000 (17:46 +0200)]
do not store name in s4u::Disk

3 years agoKill EngineWrapper hack and reduce code duplication.
Arnaud Giersch [Tue, 4 May 2021 09:10:39 +0000 (11:10 +0200)]
Kill EngineWrapper hack and reduce code duplication.

3 years agoDefine an Engine constructor taking only a name parameter.
Arnaud Giersch [Tue, 4 May 2021 08:57:09 +0000 (10:57 +0200)]
Define an Engine constructor taking only a name parameter.

It will by useful for unit tests.

3 years agoKill unused parameters.
Arnaud Giersch [Tue, 4 May 2021 09:24:05 +0000 (11:24 +0200)]
Kill unused parameters.

3 years agoConst pointer/reference.
Arnaud Giersch [Tue, 4 May 2021 09:18:17 +0000 (11:18 +0200)]
Const pointer/reference.

3 years agoHide Asan error.
Arnaud Giersch [Tue, 4 May 2021 12:14:54 +0000 (14:14 +0200)]
Hide Asan error.

Certainly a false positive seen with s4u-exec-ptask and swapped contexts:

==3408837==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fbcf3ffe0f0 at pc 0x7fbcf83efc32 bp 0x7fbcf3ffe040 sp 0x7fbcf3ffe038
WRITE of size 8 at 0x7fbcf3ffe0f0 thread T0
    #0 0x7fbcf83efc31 in _M_init_functor ../src/s4u/s4u_Activity.cpp:63
    #1 0x7fbcf83efc31 in _M_init_functor /usr/include/c++/10/bits/std_function.h:208
    #2 0x7fbcf83efc31 in function<simgrid::kernel::actor::simcall<simgrid::s4u::Activity::cancel()::<lambda()> >::<lambda()> > /usr/include/c++/10/bits/std_function.h:609
    #3 0x7fbcf83efc31 in simcall<simgrid::s4u::Activity::cancel()::<lambda()> > ../include/simgrid/simix.hpp:60
    #4 0x7fbcf83efc31 in simgrid::s4u::Activity::cancel() ../src/s4u/s4u_Activity.cpp:63
    #5 0x55e051d23c53 in simgrid::s4u::Activity_T<simgrid::s4u::Exec>::cancel() ../include/simgrid/s4u/Activity.hpp:223
    #6 0x55e051d23c53 in runner ../examples/cpp/exec-ptask/s4u-exec-ptask.cpp:61
    #7 0x7fbcf84d9d51 in std::function<void ()>::operator()() const /usr/include/c++/10/bits/std_function.h:622
    #8 0x7fbcf84d9d51 in simgrid::kernel::context::Context::operator()() const ../src/kernel/context/Context.hpp:65
    #9 0x7fbcf84d9d51 in smx_ctx_wrapper ../src/kernel/context/ContextSwapped.cpp:51

3 years agoWorkaround false alarm stack-use-after-scope from Asan with operator<<.
Arnaud Giersch [Tue, 4 May 2021 07:19:13 +0000 (09:19 +0200)]
Workaround false alarm stack-use-after-scope from Asan with operator<<.

Seen with tesh-s4u-activity-lifecycle:

==3411378==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fd4787b5f60 at pc 0x7fd4869e2acb bp 0x7fd4787b5530 sp 0x7fd4787b4ce0
READ of size 5 at 0x7fd4787b5f60 thread T0
    #0 0x7fd4869e2aca in printf_common ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors_format.inc:490
    #1 0x7fd4869e4115 in __interceptor_vsnprintf ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1647
    #2 0x7fd4858f932e  (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xea32e)
    #3 0x7fd4859272eb in std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_float<double>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, char, double) const (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x1182eb)
    #4 0x7fd4859347b9 in std::ostream& std::ostream::_M_insert<double>(double) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x1257b9)
    #5 0x55a66a474e0a in std::ostream::operator<<(double) /usr/include/c++/10/ostream:221
    #6 0x55a66a474e0a in Catch::ReusableStringStream& Catch::ReusableStringStream::operator<< <double>(double const&) ../src/include/catch.hpp:1449
    #7 0x55a66a474e0a in Catch::MessageBuilder& Catch::MessageBuilder::operator<< <double>(double const&) ../src/include/catch.hpp:2632
    #8 0x55a66a474e0a in bool tester_wait<0, boost::intrusive_ptr<simgrid::s4u::Exec> >(boost::intrusive_ptr<simgrid::s4u::Exec> const&) ../teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp:44
    #9 0x55a66a63f0af in operator() ../teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp:129
    #10 0x7fd485d7bd51 in std::function<void ()>::operator()() const /usr/include/c++/10/bits/std_function.h:622
    #11 0x7fd485d7bd51 in simgrid::kernel::context::Context::operator()() const ../src/kernel/context/Context.hpp:65
    #12 0x7fd485d7bd51 in smx_ctx_wrapper ../src/kernel/context/ContextSwapped.cpp:51
    #13 0x7fd485e09e48 in simgrid::kernel::context::BoostContext::wrapper(boost::context::detail::transfer_t) ../src/kernel/context/ContextBoost.cpp:49
    #14 0x7fd4854be19e in make_fcontext (/usr/lib/x86_64-linux-gnu/libboost_context.so.1.74.0+0x119e)

3 years agoMix create_host and add_route during platf creation.
Bruno Donassolo [Tue, 4 May 2021 08:07:44 +0000 (10:07 +0200)]
Mix create_host and add_route during platf creation.

Allow creating hosts and adding CPUs during platform description.

With the C++ interface, it's easy to mix the creation of hosts and
routes in the same for loop. However, the old code had the assumption
that all hosts were created when we added new routes. This info was used
to initialize the routing_table.

Change code to resize the routing table when necessary (number of
elements in the zone has changed).

Zones with the error: Full and Floyd

Added UTs for this case.

3 years agoMake sonar green again.
Arnaud Giersch [Mon, 3 May 2021 22:32:38 +0000 (00:32 +0200)]
Make sonar green again.

3 years agoFix test tesh-s4u-trace-integration.
Arnaud Giersch [Mon, 3 May 2021 22:10:31 +0000 (00:10 +0200)]
Fix test tesh-s4u-trace-integration.

Overriding CpuTiAction::set_max_duration() was wrongly inserting an action with min_finish = -1.0.
Simply use the parent Action::set_max_duration() instead.

The action will be inserted in action_heap by update_action_finish_time() when needed.

3 years agoNO_MAX_DURATION is a double.
Arnaud Giersch [Mon, 3 May 2021 20:09:40 +0000 (22:09 +0200)]
NO_MAX_DURATION is a double.

3 years agoKeep execution alive after timeout in sg_exec_wait_for.
Arnaud Giersch [Mon, 3 May 2021 13:54:45 +0000 (15:54 +0200)]
Keep execution alive after timeout in sg_exec_wait_for.

3 years agoFixed tests in activity-lifecycle/testing_test-wait.
Arnaud Giersch [Mon, 3 May 2021 10:46:44 +0000 (12:46 +0200)]
Fixed tests in activity-lifecycle/testing_test-wait.

Close simgrid/simgrid#47

3 years agoFix test s4u-exec-ptask: task needs to be canceled after timeout.
Arnaud Giersch [Sat, 1 May 2021 22:20:20 +0000 (00:20 +0200)]
Fix test s4u-exec-ptask: task needs to be canceled after timeout.

3 years agoFix ActivityImpl::wait_for to not cancel the activity on timeout.
Arnaud Giersch [Tue, 27 Apr 2021 12:44:10 +0000 (14:44 +0200)]
Fix ActivityImpl::wait_for to not cancel the activity on timeout.

This should improve issue simgrid/simgrid#47.

Some tests are broken by this commit, and should be fixed soon.

3 years agoKill dead code.
Arnaud Giersch [Tue, 27 Apr 2021 12:19:25 +0000 (14:19 +0200)]
Kill dead code.

It's never used, and I doubt that it's entirely correct.

3 years agoUse observer ActivityWaitSimcall in s4u::Activity::wait_for().
Arnaud Giersch [Wed, 21 Apr 2021 11:01:16 +0000 (13:01 +0200)]
Use observer ActivityWaitSimcall in s4u::Activity::wait_for().

3 years agoDefine observer ActivityWaitSimcall.
Arnaud Giersch [Wed, 21 Apr 2021 10:54:23 +0000 (12:54 +0200)]
Define observer ActivityWaitSimcall.

3 years agoReduce code duplication.
Arnaud Giersch [Mon, 3 May 2021 13:51:38 +0000 (15:51 +0200)]
Reduce code duplication.

3 years agoCancel any activity on actor exit.
Arnaud Giersch [Mon, 3 May 2021 13:37:08 +0000 (15:37 +0200)]
Cancel any activity on actor exit.

3 years agoMove fields from Exec to ExecImpl.
Arnaud Giersch [Mon, 3 May 2021 12:30:53 +0000 (14:30 +0200)]
Move fields from Exec to ExecImpl.

The Exec may be released before the end of the execution, bringing a
null dereference when finish_time is set.

3 years agoImprove messages: timeout is for the 'wait', not for the execution.
Arnaud Giersch [Tue, 27 Apr 2021 13:17:44 +0000 (15:17 +0200)]
Improve messages: timeout is for the 'wait', not for the execution.

3 years agoFix tesh file.
Arnaud Giersch [Mon, 3 May 2021 09:37:55 +0000 (11:37 +0200)]
Fix tesh file.

Measured energy consumption has changed.  The new value seems more correct (2s on host2 at 4W gives 8J).

3 years agoSuspend all the associated activities on actor suspend.
Arnaud Giersch [Mon, 3 May 2021 09:34:02 +0000 (11:34 +0200)]
Suspend all the associated activities on actor suspend.

3 years agoMigrate all the associated exec activities on actor migration.
Arnaud Giersch [Sat, 1 May 2021 21:37:46 +0000 (23:37 +0200)]
Migrate all the associated exec activities on actor migration.

3 years agoyet another revision of the disk internals
SUTER Frederic [Mon, 3 May 2021 14:36:57 +0000 (16:36 +0200)]
yet another revision of the disk internals

3 years agocosmetics (before move to src/kernel/resource ??)
SUTER Frederic [Mon, 3 May 2021 13:28:51 +0000 (15:28 +0200)]
cosmetics (before move to src/kernel/resource ??)

3 years agonot needed anymore
SUTER Frederic [Mon, 3 May 2021 12:11:31 +0000 (14:11 +0200)]
not needed anymore

3 years agodo not use RouteCreationArgs outside of XML parsing
SUTER Frederic [Mon, 3 May 2021 10:49:56 +0000 (12:49 +0200)]
do not use RouteCreationArgs outside of XML parsing

3 years agoResize(0) is redundant.
Arnaud Giersch [Fri, 30 Apr 2021 13:30:28 +0000 (15:30 +0200)]
Resize(0) is redundant.

3 years agoMissing includes.
Arnaud Giersch [Fri, 30 Apr 2021 13:27:28 +0000 (15:27 +0200)]
Missing includes.

3 years agoCleanup some unused and/or useless build config variables.
Arnaud Giersch [Fri, 30 Apr 2021 09:56:10 +0000 (11:56 +0200)]
Cleanup some unused and/or useless build config variables.

3 years agodo not need ClusterCreationArgs anymore
SUTER Frederic [Fri, 30 Apr 2021 10:59:22 +0000 (12:59 +0200)]
do not need ClusterCreationArgs anymore

3 years agorefactor link characteristics management across Clustered Zones
SUTER Frederic [Fri, 30 Apr 2021 09:51:45 +0000 (11:51 +0200)]
refactor link characteristics management across Clustered Zones

3 years agoTorus/Fat-Tree/Dragonfly: Aggregate callbacks
Bruno Donassolo [Fri, 30 Apr 2021 09:50:29 +0000 (11:50 +0200)]
Torus/Fat-Tree/Dragonfly: Aggregate callbacks

Put set callbacks in an object.
Less (or encapsulated) arguments for create_zones.
Remove create_cluster_zone (create_star_zone does its job for C++
interfaces).

3 years agoAsan sometimes chokes on RUNNING_ON_VALGRIND. Workaround by changing the test.
Arnaud Giersch [Fri, 30 Apr 2021 09:03:12 +0000 (11:03 +0200)]
Asan sometimes chokes on RUNNING_ON_VALGRIND. Workaround by changing the test.

3 years agoLibunwind is useless for non-MC builds.
Arnaud Giersch [Fri, 30 Apr 2021 08:08:28 +0000 (10:08 +0200)]
Libunwind is useless for non-MC builds.

Moreover its presence causes unwanted false-positives with Asan.

3 years agoFix 32 bits now...
Bruno Donassolo [Thu, 29 Apr 2021 17:23:32 +0000 (19:23 +0200)]
Fix 32 bits now...

3 years agoOoops.. Fix CmakeFiles and MANIFEST
Bruno Donassolo [Thu, 29 Apr 2021 16:49:58 +0000 (18:49 +0200)]
Ooops.. Fix CmakeFiles and MANIFEST

3 years agoCluster: use radicals from XML when creating resources
Bruno Donassolo [Thu, 29 Apr 2021 14:41:14 +0000 (16:41 +0200)]
Cluster: use radicals from XML when creating resources

Use radicals from XML when creating hosts in sg_platf.xml.
Fix bug with limiter.
Add test.

3 years agodo not throw signal from sg_platf
SUTER Frederic [Thu, 29 Apr 2021 14:01:36 +0000 (16:01 +0200)]
do not throw signal from sg_platf

3 years agoUse new API to create Torus/Dragonfly/Fat-Tree clusters from XML.
Bruno Donassolo [Thu, 29 Apr 2021 10:49:12 +0000 (12:49 +0200)]
Use new API to create Torus/Dragonfly/Fat-Tree clusters from XML.

Get rid of ClusterCreationArgs in Torus/Dragonfly/Fat-tree.

NOTE: Routers aren't created anymore for Torus/Dragonfly/Fat-tree zones.
- This router was lost in the middle of topology connected through empty
routes (no links)
- In the past, the sg_platf created a router automatically for these
netzones since they shared the same sg_platf_new_cluster function.
- Impact on flatfier test: cluster_torus.xml.

3 years agoFatTreeZone: Do the checks earlier
Bruno Donassolo [Wed, 28 Apr 2021 16:39:11 +0000 (18:39 +0200)]
FatTreeZone: Do the checks earlier

3 years agoNew: s4u::create_dragonfly_zone
Bruno Donassolo [Wed, 28 Apr 2021 13:38:28 +0000 (15:38 +0200)]
New: s4u::create_dragonfly_zone

Implements the builder method for Dragonfly zones.

New example: Dragonfly cluster of multi-cpu hosts(Star Zones)

3 years agoCosmetics
Bruno Donassolo [Wed, 28 Apr 2021 09:24:54 +0000 (11:24 +0200)]
Cosmetics

3 years agoMC tuto: Review by Emma
Martin Quinson [Wed, 28 Apr 2021 08:24:37 +0000 (10:24 +0200)]
MC tuto: Review by Emma

3 years agoAttribute noreturn for terminate handler.
Arnaud Giersch [Wed, 28 Apr 2021 06:28:53 +0000 (08:28 +0200)]
Attribute noreturn for terminate handler.

3 years agoWe don't want to survive a ForcefulKillException!
Arnaud Giersch [Tue, 27 Apr 2021 17:00:25 +0000 (19:00 +0200)]
We don't want to survive a ForcefulKillException!

3 years agoThe header <typeinfo> must be included before using typeid.
Arnaud Giersch [Sun, 25 Apr 2021 12:14:54 +0000 (14:14 +0200)]
The header <typeinfo> must be included before using typeid.

3 years agoNew example: Fat Tree cluster of multi-cpu hosts(Star Zones)
Bruno Donassolo [Tue, 27 Apr 2021 17:10:27 +0000 (19:10 +0200)]
New example: Fat Tree cluster of multi-cpu hosts(Star Zones)

Adapt existing Torus example for different platforms.
Same idea: each leaf is a new StarZone netzone, emulating a multi-cpu
node.

3 years agoNew: s4u::create_fatTree_zone
Bruno Donassolo [Mon, 26 Apr 2021 15:12:13 +0000 (17:12 +0200)]
New: s4u::create_fatTree_zone

Implements the builder method for Fat Tree zones.

Similar signature and behavior of create_torus_zone.

3 years agoFix FatTreeZone with limiter links
Bruno Donassolo [Tue, 27 Apr 2021 15:27:03 +0000 (17:27 +0200)]
Fix FatTreeZone with limiter links

Are we sure we want this "feature" in complex clusters?
As for Torus, no test using it.

Segfault when communicating with limiter links.
Routers inside the FatTreeZone don't have limiters, even when user sets
the limiter on the XML.

Code was adding nullptr to the list of links in this case, generating a
segfault in communicate function.

Example:
  <zone id="world" routing="Full">
    <cluster id="bob_cluster"
     prefix="node-" radical="0-15" suffix=".simgrid.org"
     speed="1Gf" bw="125MBps" lat="50us"
             topology="FAT_TREE" topo_parameters="2;4,4;1,2;1,2"
     loopback_bw="100MBps" loopback_lat="0" limiter_link="100MBps" />

3 years agoFirst version of a tutorial on Mc SimGrid
Martin Quinson [Tue, 27 Apr 2021 15:37:18 +0000 (17:37 +0200)]
First version of a tutorial on Mc SimGrid

3 years agocosmetics
Martin Quinson [Tue, 27 Apr 2021 15:36:00 +0000 (17:36 +0200)]
cosmetics

3 years agoAdd a pointer from the doc sources to the online one
Martin Quinson [Sun, 25 Apr 2021 22:19:56 +0000 (00:19 +0200)]
Add a pointer from the doc sources to the online one

3 years agoadd a (modern) wait_any for Io activities. Thx agier!
SUTER Frederic [Tue, 27 Apr 2021 13:39:39 +0000 (15:39 +0200)]
add a (modern) wait_any for Io activities. Thx agier!

3 years agothrow signal from seal() directly
SUTER Frederic [Tue, 27 Apr 2021 08:22:30 +0000 (10:22 +0200)]
throw signal from seal() directly

3 years agoTry to please sonar
Bruno Donassolo [Mon, 26 Apr 2021 16:51:22 +0000 (18:51 +0200)]
Try to please sonar

3 years agoImprovements in torus test
Bruno Donassolo [Fri, 23 Apr 2021 08:20:11 +0000 (10:20 +0200)]
Improvements in torus test

Use 2 links in Star Zone to simulate full-duplex communications.
Improv doc.

3 years agoInitialize models together with netzone root
Bruno Donassolo [Wed, 21 Apr 2021 20:12:39 +0000 (22:12 +0200)]
Initialize models together with netzone root

Remove static to initialize models once, anyway we have only one engine
in a simulation by now. Hope someday we'll be able to initialize the
models properly.

Remove workaround in UTs

3 years agoNew example: Torus cluster of multi-cpu hosts(Star Zones)
Bruno Donassolo [Wed, 21 Apr 2021 15:05:37 +0000 (17:05 +0200)]
New example: Torus cluster of multi-cpu hosts(Star Zones)

Add a new example showing how to build a torus cluster composed of
netzones instead of single hosts.

Each leaf is a StarZone, representing a host with 8 CPUs connected in a
star. CPU-0 is the gateway for each StarZone.

Runs a simple broadcast application where each CPU runs a specific
actor.

3 years agoNetZone::get_netpoint: gets the netzone's netpoint
Bruno Donassolo [Wed, 21 Apr 2021 18:35:03 +0000 (20:35 +0200)]
NetZone::get_netpoint: gets the netzone's netpoint

New method to get the netpoint used by netzones.
Usefull when describing routes using the netzones (add_route method)

3 years agoAdd some UT for TorusZone
Bruno Donassolo [Wed, 21 Apr 2021 10:02:25 +0000 (12:02 +0200)]
Add some UT for TorusZone

Improve some checks.

3 years agoNew: s4u::create_torus_zone
Bruno Donassolo [Mon, 19 Apr 2021 17:30:26 +0000 (19:30 +0200)]
New: s4u::create_torus_zone

Implements the builder method for Torus zones

NetZone* create_torus_zone(const std::string& name, const NetZone* parent, const std::vector<unsigned int>& dimensions,
                           double bandwidth, double latency, Link::SharingPolicy sharing_policy,
                           const std::function<TorusNetPointCb>& set_netpoint,
                           const std::function<TorusLinkCb>& set_loopback = {},
                           const std::function<TorusLinkCb>& set_limiter  = {});

This builder method allow us to keep hiding the internals of our
NetZones, exporting only a NetZone* to the end-user.

It uses callbacks functions to populate the leaves in the Torus, 3
callbacks can be used:
- set_netpoint: must return a pair NetPoint,Gateway. This allows us to
have complex netzones under each leaf
- set_loopback: The link used to loopback communications
- set_limiter: A limiter link for each leaf

The links inside the Torus are homogeneous and described by the
bandwidth, latency and sharing policy parameters.

As the creation of resources are linked to the netzones (create_host,
create_link functions), we have to add the parent parameter to the
builder function. Otherwise, the user cannot create the resources
associated with the leaves in the callbacks.

Obs.: By now, the sg_platf.cpp isn't using this new builder method.
It will be changed once we have implemented the builder for every
cluster type (fatree, dragonfly).

3 years agoRename VirtualMachine::get_impl() to not hide Host::get_impl().
Arnaud Giersch [Fri, 23 Apr 2021 07:47:07 +0000 (09:47 +0200)]
Rename VirtualMachine::get_impl() to not hide Host::get_impl().

3 years agoMake SIMIX_simcall_name() use the type of observer_ if it exists.
Arnaud Giersch [Thu, 22 Apr 2021 20:45:52 +0000 (22:45 +0200)]
Make SIMIX_simcall_name() use the type of observer_ if it exists.

It gives more information about the kind of simcall being involved,
since most simcalls are nowadays of type RUN_KERNEL or RUN_BLOCKING.

3 years agoUse std::string::rfind to match string prefix.
Arnaud Giersch [Thu, 22 Apr 2021 20:27:08 +0000 (22:27 +0200)]
Use std::string::rfind to match string prefix.

3 years agoUnused #include.
Arnaud Giersch [Thu, 22 Apr 2021 20:17:25 +0000 (22:17 +0200)]
Unused #include.

3 years agoRaise exception for invalid parameters in StarZone
Bruno Donassolo [Thu, 22 Apr 2021 16:47:15 +0000 (18:47 +0200)]
Raise exception for invalid parameters in StarZone

We've talked about using exceptions for invalid parameters in user'
calls.
Adjust for StarZone.
Bonus: We can test it in UT with catch

3 years ago[sonar] Implicit casts should not lower precision.
Arnaud Giersch [Thu, 22 Apr 2021 13:37:36 +0000 (15:37 +0200)]
[sonar] Implicit casts should not lower precision.

3 years agoUse type aid_t for actor ids.
Arnaud Giersch [Thu, 22 Apr 2021 10:55:32 +0000 (12:55 +0200)]
Use type aid_t for actor ids.

3 years agoFactor code for simcall observers with a result.
Arnaud Giersch [Wed, 21 Apr 2021 10:39:19 +0000 (12:39 +0200)]
Factor code for simcall observers with a result.

3 years agoCosmetics: make parameter name match with .hpp.
Arnaud Giersch [Wed, 21 Apr 2021 08:57:07 +0000 (10:57 +0200)]
Cosmetics: make parameter name match with .hpp.