Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
2 years agomigrate execute_tasks from simix::Global to kernel::EngineImpl
SUTER Frederic [Mon, 17 May 2021 09:33:28 +0000 (11:33 +0200)]
migrate execute_tasks from simix::Global to kernel::EngineImpl

2 years agomigrate wake_all_waiting_actors from simix::Global to kernel::EngineImpl
SUTER Frederic [Mon, 17 May 2021 08:33:14 +0000 (10:33 +0200)]
migrate wake_all_waiting_actors from simix::Global to kernel::EngineImpl

2 years agoSIMIX_run becomes EngineImpl::run
SUTER Frederic [Mon, 17 May 2021 08:23:13 +0000 (10:23 +0200)]
SIMIX_run becomes EngineImpl::run

2 years agomove another function out of simix + private field
SUTER Frederic [Sun, 16 May 2021 15:12:34 +0000 (17:12 +0200)]
move another function out of simix + private field

2 years agoMore informative error message when the user does not provide a main() to smpirun...
Martin Quinson [Mon, 17 May 2021 07:33:06 +0000 (09:33 +0200)]
More informative error message when the user does not provide a main() to smpirun [ci-skip]

2 years agomove kernel timers from simix:: to kernel::timer::
SUTER Frederic [Sun, 16 May 2021 12:51:27 +0000 (14:51 +0200)]
move kernel timers from simix:: to kernel::timer::

2 years agoUse correct types for temporary variables.
Arnaud Giersch [Wed, 12 May 2021 10:46:41 +0000 (12:46 +0200)]
Use correct types for temporary variables.

2 years agoCosmetics.
Arnaud Giersch [Wed, 12 May 2021 09:48:38 +0000 (11:48 +0200)]
Cosmetics.

(reduce length of lambda, for sonar).

2 years agoChecking access before open is useless (fix race condition).
Arnaud Giersch [Wed, 12 May 2021 08:09:36 +0000 (10:09 +0200)]
Checking access before open is useless (fix race condition).

2 years agoaccept functions with parameters in Actor::start
SUTER Frederic [Wed, 12 May 2021 10:07:45 +0000 (12:07 +0200)]
accept functions with parameters in Actor::start

2 years agoMinor sonar related changes
Bruno Donassolo [Wed, 12 May 2021 09:11:06 +0000 (11:11 +0200)]
Minor sonar related changes

2 years agoallow to get the number of queued communications in a Mailbox
SUTER Frederic [Tue, 11 May 2021 16:02:54 +0000 (18:02 +0200)]
allow to get the number of queued communications in a Mailbox

2 years agoSeal objects at Engine::run
Bruno Donassolo [Tue, 11 May 2021 14:34:16 +0000 (16:34 +0200)]
Seal objects at Engine::run

Seal, recursively, netzones, hosts, links and disks.
Some extra checks when creating and sealing resources.
Add test for this case.

2 years agoSome cleanup around model description tables.
Arnaud Giersch [Tue, 11 May 2021 12:04:34 +0000 (14:04 +0200)]
Some cleanup around model description tables.

* save a new/delete for plugin descriptions;
* use sdt::function for model_init_preparse;
* return a pointer from find_model_description().

2 years agoConst.
Arnaud Giersch [Tue, 11 May 2021 08:05:53 +0000 (10:05 +0200)]
Const.

2 years agoFix lua compilation
Bruno Donassolo [Mon, 10 May 2021 16:17:22 +0000 (18:17 +0200)]
Fix lua compilation

Get code back to sg_platf since it's used by lua_platf.cpp

2 years agoFix memleak.
Bruno Donassolo [Mon, 10 May 2021 15:11:46 +0000 (17:11 +0200)]
Fix memleak.

Thanks @agiersch

2 years agoWorkaround to unblock.
Bruno Donassolo [Mon, 10 May 2021 14:38:05 +0000 (16:38 +0200)]
Workaround to unblock.

Seems a gcc-11 problem anyway

2 years agoFix NS-3 tests
Bruno Donassolo [Mon, 10 May 2021 14:16:42 +0000 (16:16 +0200)]
Fix NS-3 tests

Since cluster zones are now based on star, we cannot keep the checks

2 years agoFix example: seal zone
Bruno Donassolo [Mon, 10 May 2021 12:24:40 +0000 (14:24 +0200)]
Fix example: seal zone

2 years agoAdjust tests after changes in cluster tag
Bruno Donassolo [Mon, 10 May 2021 10:43:53 +0000 (12:43 +0200)]
Adjust tests after changes in cluster tag

Minor changes in graphicator and flatifier due to internals of StarZone
compared to old ClusterZone

No timing changes in tests.

2 years agoClusterZone placeholder and kill some old code
Bruno Donassolo [Fri, 7 May 2021 18:50:57 +0000 (20:50 +0200)]
ClusterZone placeholder and kill some old code

Put the old ClusterZone class as a placeholder for other "Cluster"
classes.

Keep the same behavior of Engine::get_filtered_netzones for wrench
projects.

The old ClusterZone is now BaseCluster and it's used to implement the
"complex" Clusters (Torus, DragonFly and Fat-Tree).

Kill old code that doesn't make sense for these netzones

2 years agoCluster with StarZones
Bruno Donassolo [Wed, 5 May 2021 16:53:08 +0000 (18:53 +0200)]
Cluster with StarZones

Finish cleaning-up of old cluster zones.
Implements <cluster> and <zone routing="cluster"> with StarZones.

Keep old ClusterZone as base for Torus, Dragonfly and Fat-Tree.

2 years agoFactor common code.
Arnaud Giersch [Mon, 10 May 2021 09:40:55 +0000 (11:40 +0200)]
Factor common code.

2 years agoReduce code duplication.
Arnaud Giersch [Mon, 10 May 2021 09:28:08 +0000 (11:28 +0200)]
Reduce code duplication.

2 years ago[sonar] Prefer empty() to check for emptyness.
Arnaud Giersch [Sun, 9 May 2021 12:39:58 +0000 (14:39 +0200)]
[sonar] Prefer empty() to check for emptyness.

2 years ago[sonar] Minor simplifications.
Arnaud Giersch [Sat, 8 May 2021 12:00:38 +0000 (14:00 +0200)]
[sonar] Minor simplifications.

2 years ago[cppcheck] Pass parameters by const reference.
Arnaud Giersch [Thu, 6 May 2021 13:44:22 +0000 (15:44 +0200)]
[cppcheck] Pass parameters by const reference.

2 years ago[codefactor] Cosmetics.
Arnaud Giersch [Thu, 6 May 2021 13:38:43 +0000 (15:38 +0200)]
[codefactor] Cosmetics.

2 years agoRename kernel::resource:Cpu to CpuImpl
SUTER Frederic [Sun, 9 May 2021 14:41:39 +0000 (16:41 +0200)]
Rename kernel::resource:Cpu to CpuImpl

2 years agouse .data() instead of &v[0] to avoid annoying analyzers.
Augustin Degomme [Fri, 7 May 2021 21:49:48 +0000 (23:49 +0200)]
use .data() instead of &v[0] to avoid annoying analyzers.

2 years agoRevert "Try to activate -Wsugests-override in GNU compiler, as it may help if it...
Martin Quinson [Fri, 7 May 2021 22:16:11 +0000 (00:16 +0200)]
Revert "Try to activate -Wsugests-override in GNU compiler, as it may help if it works"

This fails for old versions of GCC, which could be worked around, but
also on ns-3 headers, which is harder to fix properly.

This reverts commit 694a2b171a6e03d42d5068bc6ba6c353cb0e34e3.

2 years agoTry to activate -Wsugests-override in GNU compiler, as it may help if it works
Martin Quinson [Fri, 7 May 2021 22:01:35 +0000 (00:01 +0200)]
Try to activate -Wsugests-override in GNU compiler, as it may help if it works

2 years agoClose those bugs in the Changelog [ci-skip]
Martin Quinson [Wed, 5 May 2021 18:37:24 +0000 (20:37 +0200)]
Close those bugs in the Changelog [ci-skip]

2 years agonon blocking collectives : array->vector
Augustin Degomme [Fri, 7 May 2021 16:14:52 +0000 (18:14 +0200)]
non blocking collectives : array->vector

2 years agoFix previous fix.
Augustin Degomme [Fri, 7 May 2021 13:45:16 +0000 (15:45 +0200)]
Fix previous fix.
It was turning test into wait for non blocking collectives, which is not what we wanted.

2 years agoFix build with -Werror=undef.
Arnaud Giersch [Fri, 7 May 2021 12:08:43 +0000 (14:08 +0200)]
Fix build with -Werror=undef.

2 years agoAllow an actor to destroy its own VM.
Arnaud Giersch [Fri, 7 May 2021 11:39:11 +0000 (13:39 +0200)]
Allow an actor to destroy its own VM.

Fix https://github.com/simgrid/simgrid/issues/322

2 years agoAdd test for VM (self) destruction.
Arnaud Giersch [Fri, 7 May 2021 09:38:13 +0000 (11:38 +0200)]
Add test for VM (self) destruction.

Adapted from https://github.com/simgrid/simgrid/issues/322

2 years agoDistcheck.
Arnaud Giersch [Fri, 7 May 2021 11:28:40 +0000 (13:28 +0200)]
Distcheck.

2 years agoactivate the last nonblocking test in mpich3 suite, as now we should pass it.. probably.
Augustin Degomme [Fri, 7 May 2021 10:20:16 +0000 (12:20 +0200)]
activate the last nonblocking test in mpich3 suite, as now we should pass it.. probably.

2 years agoProperly terminate non blocking collective requests in all cases (mpi_test/testall...
Augustin Degomme [Fri, 7 May 2021 10:17:54 +0000 (12:17 +0200)]
Properly terminate non blocking collective requests in all cases (mpi_test/testall/testany/testsome/waitsome/waitany).
Also use flags to identify non blocking collectivre requests instead of the size of an array (which should be turned in a vector soon)
Fix one issue reported in #67

2 years agoChecks concerning StarZone and NS3
Bruno Donassolo [Fri, 7 May 2021 09:33:26 +0000 (11:33 +0200)]
Checks concerning StarZone and NS3

2 years agoReduce scope for variable.
Arnaud Giersch [Thu, 6 May 2021 21:38:41 +0000 (23:38 +0200)]
Reduce scope for variable.

2 years agoCapitalize enum class.
Arnaud Giersch [Thu, 6 May 2021 21:38:41 +0000 (23:38 +0200)]
Capitalize enum class.

2 years agoCannot destroy iface before impl.
Arnaud Giersch [Thu, 6 May 2021 12:29:52 +0000 (14:29 +0200)]
Cannot destroy iface before impl.

HostImpl::destroy() calls s4u::Host::on_destruction(*this->get_iface());

Move bogus XBT_DEBUG instead.

2 years agoFix use-after-free with VirtualMachine::destroy().
Arnaud Giersch [Thu, 6 May 2021 11:41:41 +0000 (13:41 +0200)]
Fix use-after-free with VirtualMachine::destroy().

Postpone destruction of VirtualMachineImpl, and do it in kernel mode.

2 years agoThere is no need to have these functions 'virtual'.
Arnaud Giersch [Thu, 6 May 2021 11:24:00 +0000 (13:24 +0200)]
There is no need to have these functions 'virtual'.

2 years agoFix rst.
Arnaud Giersch [Wed, 5 May 2021 08:22:46 +0000 (10:22 +0200)]
Fix rst.

2 years ago[sonar] implicit casts
SUTER Frederic [Thu, 6 May 2021 08:30:18 +0000 (10:30 +0200)]
[sonar] implicit casts

2 years agoExtend the description of the IB configuration
Martin Quinson [Wed, 5 May 2021 15:43:52 +0000 (17:43 +0200)]
Extend the description of the IB configuration

2 years agoA doc section that I don't know where to put: citations in several languages [ci...
Martin Quinson [Wed, 5 May 2021 13:00:51 +0000 (15:00 +0200)]
A doc section that I don't know where to put: citations in several languages [ci-skip]

2 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.

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

2 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.

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

2 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.

2 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

2 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

2 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.

2 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

2 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

2 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.

2 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.

2 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

2 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

2 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

2 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

2 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

2 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.

2 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.

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

2 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).

2 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).

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

2 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.

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

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

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

2 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

2 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.

2 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.

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

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

2 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

2 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)

2 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.

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

2 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.

2 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.

2 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.

2 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

2 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.

2 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.

2 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.

2 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().

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

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

2 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.

2 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.