Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
4 years agoAdd one more state to assert.
Arnaud Giersch [Sun, 9 Feb 2020 10:43:44 +0000 (11:43 +0100)]
Add one more state to assert.

Without that, the comparison 5 lines after was useless.

4 years agoImprove coverage :p
Arnaud Giersch [Fri, 7 Feb 2020 16:20:50 +0000 (17:20 +0100)]
Improve coverage :p

4 years agofix refcount issue
Frederic Suter [Sun, 9 Feb 2020 14:43:59 +0000 (15:43 +0100)]
fix refcount issue

If you create an actor and know that you may try to do something on it
after its completion, you'd better take an extra reference on it. Once
you're done with this actor, do not forget to release the reference or
you will face some memory leaks.

4 years agodo not enforce a specific order
Frederic Suter [Sun, 9 Feb 2020 14:31:20 +0000 (15:31 +0100)]
do not enforce a specific order

4 years agosimgrid_get_all_hosts was redundant with existing sg_host_list
Frederic Suter [Sun, 9 Feb 2020 14:07:52 +0000 (15:07 +0100)]
simgrid_get_all_hosts was redundant with existing sg_host_list

4 years agobummer. fix clang
Frederic Suter [Sat, 8 Feb 2020 16:47:28 +0000 (17:47 +0100)]
bummer. fix clang

4 years agoadd sg_actor_exit and sg_actor_on_exit
Frederic Suter [Sat, 8 Feb 2020 15:56:22 +0000 (16:56 +0100)]
add sg_actor_exit and sg_actor_on_exit

+ convert the corresponding MSG example to s4u-c
+ MSG_process_on_exit becomes legacy

4 years agoconvert more exemples from MSG to S4U-C
Frederic Suter [Fri, 7 Feb 2020 13:03:10 +0000 (14:03 +0100)]
convert more exemples from MSG to S4U-C

- app-token-ring
- process-daemon -> actor-daemon
- process-join -> actor-join

4 years agoDefine method test() in Activity (common to Exec and Io).
Arnaud Giersch [Fri, 7 Feb 2020 14:14:09 +0000 (15:14 +0100)]
Define method test() in Activity (common to Exec and Io).

s4u::Comm still uses old-style simcalls (thanks MC) and cannot use it now.

4 years agoModernize simcall_io_test().
Arnaud Giersch [Fri, 7 Feb 2020 14:03:56 +0000 (15:03 +0100)]
Modernize simcall_io_test().

4 years agoModernize simcall_execution_test().
Arnaud Giersch [Fri, 7 Feb 2020 13:28:24 +0000 (14:28 +0100)]
Modernize simcall_execution_test().

4 years agoDeprecate host_get_mounted_storage_list
Frederic Suter [Fri, 7 Feb 2020 10:18:42 +0000 (11:18 +0100)]
Deprecate host_get_mounted_storage_list

4 years agoStart to get rid of storage examples in MSG
Frederic Suter [Fri, 7 Feb 2020 10:08:14 +0000 (11:08 +0100)]
Start to get rid of storage examples in MSG

Convert this test to a s4u-c example based on disks. It matches the
c++ version.
xbt_dynar have been replaced by fonctions that allocate and build
arrays of objects that the user will have to free.

Problem: there is no convenient xbt-free way to handle dictionnaries
yet, hence a xbt_dict remains to access properties.

4 years agointroduce simgrid_get_all_hosts
Frederic Suter [Fri, 7 Feb 2020 10:04:44 +0000 (11:04 +0100)]
introduce simgrid_get_all_hosts

This is a replacement to sg_hosts_as_dynar.
It allocates and builds the list of all the hosts seen by the Engine,
sorted by host names. Deallocating the memory is up to the user.

4 years agointroduce sg_host_disks
Frederic Suter [Fri, 7 Feb 2020 09:49:59 +0000 (10:49 +0100)]
introduce sg_host_disks

4 years agoPursue deprecation of xbt/synchro.h.
Arnaud Giersch [Fri, 7 Feb 2020 08:13:55 +0000 (09:13 +0100)]
Pursue deprecation of xbt/synchro.h.

4 years agoDeprecate unused simcall_comm_iprobe() + comments.
Arnaud Giersch [Thu, 6 Feb 2020 22:16:17 +0000 (23:16 +0100)]
Deprecate unused simcall_comm_iprobe() + comments.

4 years agoFix dist.
Arnaud Giersch [Thu, 6 Feb 2020 16:10:45 +0000 (17:10 +0100)]
Fix dist.

4 years agoAdd "explicit".
Arnaud Giersch [Thu, 6 Feb 2020 15:59:41 +0000 (16:59 +0100)]
Add "explicit".

4 years agoadd C interface to disks
Frederic Suter [Thu, 6 Feb 2020 15:59:07 +0000 (16:59 +0100)]
add C interface to disks

4 years agoMerge branch 'doc' into 'master'
Martin Quinson [Thu, 6 Feb 2020 15:47:04 +0000 (16:47 +0100)]
Merge branch 'doc' into 'master'

Make docs generation compatible with Sphinx 2.x

See merge request simgrid/simgrid!30

4 years agoMake docs generation compatible with Sphinx 2.x
Julien EMMANUEL [Thu, 6 Feb 2020 15:11:01 +0000 (16:11 +0100)]
Make docs generation compatible with Sphinx 2.x

Modify a few things in autodoxy.py to make it compatible with both sphinx 1.8 and 2.x

4 years agoConvert surf/maxmin_bench to xbt/random too.
Arnaud Giersch [Thu, 6 Feb 2020 15:19:18 +0000 (16:19 +0100)]
Convert surf/maxmin_bench to xbt/random too.

4 years agoReplace usage of <random> with <xbt/random.hpp>.
Arnaud Giersch [Wed, 5 Feb 2020 22:45:20 +0000 (23:45 +0100)]
Replace usage of <random> with <xbt/random.hpp>.

4 years ago[examples/s4u-app-bittorrent] Use a different RNG for each node.
Arnaud Giersch [Wed, 5 Feb 2020 20:49:40 +0000 (21:49 +0100)]
[examples/s4u-app-bittorrent] Use a different RNG for each node.

4 years ago[examples/s4u-dht-chord] Use a different RNG for each node (regenerate expected outpu...
Arnaud Giersch [Wed, 5 Feb 2020 20:34:10 +0000 (21:34 +0100)]
[examples/s4u-dht-chord] Use a different RNG for each node (regenerate expected output in tesh).

4 years agoDefines C++ classes for xbt RNG.
Arnaud Giersch [Wed, 5 Feb 2020 15:00:07 +0000 (16:00 +0100)]
Defines C++ classes for xbt RNG.

Add the possibility to have several random number generators.
A global generator is kept.

4 years agoPlug memory leak, and othre polishing.
Arnaud Giersch [Thu, 6 Feb 2020 14:44:50 +0000 (15:44 +0100)]
Plug memory leak, and othre polishing.

4 years agoUpdate Copyright line.
Arnaud Giersch [Thu, 6 Feb 2020 14:37:52 +0000 (15:37 +0100)]
Update Copyright line.

4 years agoCatch any kind of Exception here (revert previous change).
Arnaud Giersch [Thu, 6 Feb 2020 14:29:21 +0000 (15:29 +0100)]
Catch any kind of Exception here (revert previous change).

4 years agoEnsure that I don't 'fix' it by accident in the future
Martin Quinson [Thu, 6 Feb 2020 13:33:00 +0000 (14:33 +0100)]
Ensure that I don't 'fix' it by accident in the future

4 years agoPrefer a do-while in these cases.
Arnaud Giersch [Thu, 6 Feb 2020 12:40:12 +0000 (13:40 +0100)]
Prefer a do-while in these cases.

4 years agoFix division by zero on 32bit systems.
Arnaud Giersch [Thu, 6 Feb 2020 12:39:34 +0000 (13:39 +0100)]
Fix division by zero on 32bit systems.

4 years agodo not use sg_hosts_as_dynar in C++
Frederic Suter [Thu, 6 Feb 2020 10:42:21 +0000 (11:42 +0100)]
do not use sg_hosts_as_dynar in C++

4 years agoMerge branch 'doc' into 'master'
Arnaud Giersch [Thu, 6 Feb 2020 10:54:38 +0000 (11:54 +0100)]
Merge branch 'doc' into 'master'

Fix overflow of large parameters in doc

See merge request simgrid/simgrid!29

4 years agoClose simgrid/simgrid#43 on framagit, and update ChangeLog.
Arnaud Giersch [Thu, 6 Feb 2020 10:46:19 +0000 (11:46 +0100)]
Close simgrid/simgrid#43 on framagit, and update ChangeLog.

Concerns have been addressed by commits:
a5a63cee9b Redraw if the random number is too close to max, to avoid modulo bias
fbf0f42532 Documenting xbt/random a little bit
037217ec21 Exclude max from range for xbt::random::uniform_real.

4 years agoSet seed only after having chosen the implementation.
Arnaud Giersch [Thu, 6 Feb 2020 10:45:36 +0000 (11:45 +0100)]
Set seed only after having chosen the implementation.

4 years agoExclude max from range for xbt::random::uniform_real.
Arnaud Giersch [Thu, 6 Feb 2020 10:18:05 +0000 (11:18 +0100)]
Exclude max from range for xbt::random::uniform_real.

Mimic std::uniform_real_distribution.

4 years agoCosmetics in xbt/random.
Arnaud Giersch [Thu, 6 Feb 2020 10:07:52 +0000 (11:07 +0100)]
Cosmetics in xbt/random.

4 years agoFix overflow of large parameters in doc
Julien EMMANUEL [Thu, 6 Feb 2020 10:10:40 +0000 (11:10 +0100)]
Fix overflow of large parameters in doc

4 years agoMerge branch 'pikachuyann/simgrid-xbt_random'
Arnaud Giersch [Thu, 6 Feb 2020 09:57:37 +0000 (10:57 +0100)]
Merge branch 'pikachuyann/simgrid-xbt_random'

4 years agoWarnings in docs (spaces and consts).
Arnaud Giersch [Thu, 6 Feb 2020 08:57:43 +0000 (09:57 +0100)]
Warnings in docs (spaces and consts).

4 years agoAvoid needless loop.
Arnaud Giersch [Thu, 6 Feb 2020 08:34:30 +0000 (09:34 +0100)]
Avoid needless loop.

4 years agoSimplify logic.
Arnaud Giersch [Thu, 6 Feb 2020 08:29:39 +0000 (09:29 +0100)]
Simplify logic.

4 years ago[examples/s4u-dht-chord] Handle TimeoutException which may be thrown by Comm::test.
Arnaud Giersch [Wed, 5 Feb 2020 20:23:13 +0000 (21:23 +0100)]
[examples/s4u-dht-chord] Handle TimeoutException which may be thrown by Comm::test.

4 years ago[examples/s4u-dht-chord] Simplify nested loops in Node::operator().
Arnaud Giersch [Wed, 5 Feb 2020 20:15:33 +0000 (21:15 +0100)]
[examples/s4u-dht-chord] Simplify nested loops in Node::operator().

4 years ago[examples/s4u-dht-chord] Move implementation for Node::operator() in .cpp file.
Arnaud Giersch [Wed, 5 Feb 2020 18:53:43 +0000 (19:53 +0100)]
[examples/s4u-dht-chord] Move implementation for Node::operator() in .cpp file.

4 years agoMerge branch 'doc' into 'master'
Martin Quinson [Wed, 5 Feb 2020 22:42:28 +0000 (23:42 +0100)]
Merge branch 'doc' into 'master'

Fix 'TOC' image size in doc

See merge request simgrid/simgrid!28

4 years agoFix 'TOC' image size in doc
Julien EMMANUEL [Wed, 5 Feb 2020 13:47:23 +0000 (14:47 +0100)]
Fix 'TOC' image size in doc

4 years agoConst++.
Arnaud Giersch [Wed, 5 Feb 2020 09:13:18 +0000 (10:13 +0100)]
Const++.

4 years agoAdd "const" to some getters of Activities.
Arnaud Giersch [Wed, 5 Feb 2020 09:04:09 +0000 (10:04 +0100)]
Add "const" to some getters of Activities.

4 years agoFix potential use after free.
Arnaud Giersch [Wed, 5 Feb 2020 08:51:38 +0000 (09:51 +0100)]
Fix potential use after free.

4 years agoUse const reference for parameter of type ActorCodeFactory.
Arnaud Giersch [Tue, 4 Feb 2020 20:21:19 +0000 (21:21 +0100)]
Use const reference for parameter of type ActorCodeFactory.

4 years agofix
Frederic Suter [Wed, 5 Feb 2020 09:45:42 +0000 (10:45 +0100)]
fix

4 years agomake C version of actor-create functional
Frederic Suter [Wed, 5 Feb 2020 09:34:25 +0000 (10:34 +0100)]
make C version of actor-create functional

4 years agoconvert a MSG test to a s4u-c example
Frederic Suter [Wed, 5 Feb 2020 08:15:34 +0000 (09:15 +0100)]
convert a MSG test to a s4u-c example

4 years agoSimplify the API between Engine and EngineImpl when registering functions
Martin Quinson [Tue, 4 Feb 2020 16:36:28 +0000 (17:36 +0100)]
Simplify the API between Engine and EngineImpl when registering functions

Engine is providing several prototypes to serve S4U, SMPI, MSG and all
friends. It was providing all these prototypes to EngineImpl which was
in charge of building the ActorCodeFactory, ie the lambda in charge of
building a lambda code that the actor can execute.

Now, Engine is building the ActorCodeFactory and EngineImpl is only
providing one prototype.

While I was at it, I moved the registered functions and default
function from simix_global (which should die at some point) to the
EngineImpl, and killed a SIMIX function defined in Context.hpp (yuk).

I also made ActorCodeFactory a public type in forward.h, which
requires to include <vector> in forward.h. I guess we can live with it.

I also introduced an EngineImpl::get_instance() even if that require a
circular dependency between Engine and EngineImpl. I did not find a
better solution.

Now, MSG can directly build its ActorCodeFactory and pass it to the
Engine. It fixes the casting issues we had on user code, and remove
the need for an extra flag to calm the compiler about this ugly cast.

4 years agoconvert two tesh to use s4u instead of using SIMIX directly
Martin Quinson [Tue, 4 Feb 2020 16:18:36 +0000 (17:18 +0100)]
convert two tesh to use s4u instead of using SIMIX directly

4 years agoFix mess between smx_activity_t and ActivityImplPtr.
Arnaud Giersch [Tue, 4 Feb 2020 10:36:56 +0000 (11:36 +0100)]
Fix mess between smx_activity_t and ActivityImplPtr.

The former hides a raw pointer, while the latter is a boost::intrusive_ptr.

4 years agoKill duplicate definition.
Arnaud Giersch [Tue, 4 Feb 2020 12:29:33 +0000 (13:29 +0100)]
Kill duplicate definition.

4 years agoget my crude hack in MSG to compile on both gcc and clang
Martin Quinson [Tue, 4 Feb 2020 13:08:09 +0000 (14:08 +0100)]
get my crude hack in MSG to compile on both gcc and clang

4 years agodocker: don't build java nor MSG on unstable
Martin Quinson [Tue, 4 Feb 2020 12:48:30 +0000 (13:48 +0100)]
docker: don't build java nor MSG on unstable

4 years agoClearly state that we don't care about the return code of actors
Martin Quinson [Tue, 4 Feb 2020 12:21:51 +0000 (13:21 +0100)]
Clearly state that we don't care about the return code of actors

Earlier, the actor had the exact same prototype than the C main()
function. In particular, it was supposed to return an integer. But
that value is ignored in simgrid since years (or maybe since ever).

So, change the expected return code to 'void' to make this clear and
reduce the clutter in user code.

The deprecation code should be in place until v3.30 for s4u code.

The MSG clients are not modified, and the MSG implementation is only
slightly modified with a crude cast (that mandates the
-Wno-error=cast-function-type flag on the command line when compiling
MSG).

4 years agopython: fix a breakage seen on the robot building the documentation
Martin Quinson [Tue, 4 Feb 2020 11:04:08 +0000 (12:04 +0100)]
python: fix a breakage seen on the robot building the documentation

Not sure of why I didn't see it elsewhere, but anyway. There was no
reason to deal with sequential vs. parallel execs in the python world,
as the C++ worlds already deals with it.

4 years agofix make distcheck and pip compile
Martin Quinson [Tue, 4 Feb 2020 10:54:25 +0000 (11:54 +0100)]
fix make distcheck and pip compile

4 years agoModern C++: prefer type aliasing with using to C-style typedef
Martin Quinson [Sun, 2 Feb 2020 21:43:36 +0000 (22:43 +0100)]
Modern C++: prefer type aliasing with using to C-style typedef

4 years agoAdd the 2 new C examples to the doc; use sg_comm_wait_any in example instead of sg_co...
Martin Quinson [Tue, 4 Feb 2020 10:13:36 +0000 (11:13 +0100)]
Add the 2 new C examples to the doc; use sg_comm_wait_any in example instead of sg_comm_wait_any_for

4 years agodoc: allow to document C examples
Martin Quinson [Tue, 4 Feb 2020 10:07:27 +0000 (11:07 +0100)]
doc: allow to document C examples

4 years agofixups in the C API
Martin Quinson [Tue, 4 Feb 2020 09:58:59 +0000 (10:58 +0100)]
fixups in the C API

- Fix the prototype of sg_actor_start to fix the constness of argv
- Introduce sg_mailbox_put

4 years agonew C example on actor creation
Martin Quinson [Tue, 4 Feb 2020 09:58:01 +0000 (10:58 +0100)]
new C example on actor creation

4 years agoc/async-waitany: cleanups to align with cpp and py
Martin Quinson [Tue, 4 Feb 2020 09:55:35 +0000 (10:55 +0100)]
c/async-waitany: cleanups to align with cpp and py

4 years agomove this first C example to the example directory + cosmetics in outputs
Martin Quinson [Tue, 4 Feb 2020 09:34:22 +0000 (10:34 +0100)]
move this first C example to the example directory + cosmetics in outputs

4 years agono dynar in the new C interface (+cleanups in CMakeLists)
Martin Quinson [Tue, 4 Feb 2020 09:18:07 +0000 (10:18 +0100)]
no dynar in the new C interface (+cleanups in CMakeLists)

4 years agoFix the refcounting in this C example
Martin Quinson [Tue, 4 Feb 2020 08:51:22 +0000 (09:51 +0100)]
Fix the refcounting in this C example

4 years agofix refcounting issues
Frederic Suter [Tue, 4 Feb 2020 08:34:03 +0000 (09:34 +0100)]
fix refcounting issues

4 years agoconvert a msg test to C-s4u (borken for now)
Frederic Suter [Mon, 3 Feb 2020 15:09:30 +0000 (16:09 +0100)]
convert a msg test to C-s4u (borken for now)

4 years agoC interface to Comm::wait_any_for
Frederic Suter [Mon, 3 Feb 2020 15:07:36 +0000 (16:07 +0100)]
C interface to Comm::wait_any_for

4 years agoadd a few functions to Mailbox C API
Frederic Suter [Mon, 3 Feb 2020 15:04:53 +0000 (16:04 +0100)]
add a few functions to Mailbox C API

4 years agoadd more C types
Frederic Suter [Mon, 3 Feb 2020 15:03:42 +0000 (16:03 +0100)]
add more C types
* sg_comm_t => CommPtr
* sg_mailbox_t => Mailbox*

4 years agoIntroduce XBT_ATTRIB_DEPRECATED_v330.
Arnaud Giersch [Sun, 2 Feb 2020 20:16:41 +0000 (21:16 +0100)]
Introduce XBT_ATTRIB_DEPRECATED_v330.

4 years agocmake: kill an unused variable: SIMGRID_VERSION_DATE
Martin Quinson [Sun, 2 Feb 2020 16:28:40 +0000 (17:28 +0100)]
cmake: kill an unused variable: SIMGRID_VERSION_DATE

4 years agodocker: update the link to the latest stable release
Martin Quinson [Sun, 2 Feb 2020 15:58:09 +0000 (16:58 +0100)]
docker: update the link to the latest stable release

4 years agoStart the dev of 3.26
Martin Quinson [Sun, 2 Feb 2020 15:30:05 +0000 (16:30 +0100)]
Start the dev of 3.26

4 years agoMerge branch 'stable'
Martin Quinson [Sun, 2 Feb 2020 15:31:58 +0000 (16:31 +0100)]
Merge branch 'stable'

4 years agoRelease 3.25 v3.25
Martin Quinson [Sun, 2 Feb 2020 12:08:04 +0000 (13:08 +0100)]
Release 3.25

4 years agoRelease 3.25
Martin Quinson [Sun, 2 Feb 2020 12:08:04 +0000 (13:08 +0100)]
Release 3.25

4 years agofinish the API under the new format
Martin Quinson [Sat, 1 Feb 2020 23:46:50 +0000 (00:46 +0100)]
finish the API under the new format

- Add some 'const' method decorators on my way
- We cannot drop the breathe extension of sphinx yet because autodoxy
  does not parse typedef (nor enums) yet so we use breathe for that
- Other bugs surfaced in autodoxy, but I'm short on time so I worked
  around them. See find-missing.ignore for a list of weird things.

4 years agoautodoxy: Don't ignore const-ness discrepencies in prototype
Martin Quinson [Sat, 1 Feb 2020 21:47:48 +0000 (22:47 +0100)]
autodoxy: Don't ignore const-ness discrepencies in prototype

It is fragile and makes the code less readable. Fixing the doc
actually works (I was conserned that the extra space could break
something), so there is no point.

4 years agono need to link the python doc to the C++ one with the new formating
Martin Quinson [Sat, 1 Feb 2020 20:40:23 +0000 (21:40 +0100)]
no need to link the python doc to the C++ one with the new formating

4 years agoAdd suppressions for TSan.
Arnaud Giersch [Sat, 1 Feb 2020 16:29:35 +0000 (17:29 +0100)]
Add suppressions for TSan.

4 years agoRename ASAN suppressions file.
Arnaud Giersch [Sat, 1 Feb 2020 13:14:50 +0000 (14:14 +0100)]
Rename ASAN suppressions file.

Existing suppressions seem useless nowadays, comment them.

4 years ago[sonar] const++
Arnaud Giersch [Sat, 1 Feb 2020 13:11:52 +0000 (14:11 +0100)]
[sonar] const++

4 years agodocument Virtual machines
Martin Quinson [Sat, 1 Feb 2020 15:25:52 +0000 (16:25 +0100)]
document Virtual machines

Even if I hate to document code that should change. Here, we should
kill the fact that s4u::VirtualMachine extends s4u::Host, as it only
complicates things for nothing. It probably requires that we
dupplicate the methods this_actor::exec() and Actor::set_host() to add
a variant taking a VM instead of the host, but that would still be an
improvement.

Also, the zone C type should probably be renamed into netzone for
consistency.

4 years agodocument netzones
Martin Quinson [Sat, 1 Feb 2020 14:40:49 +0000 (15:40 +0100)]
document netzones

4 years agodoc: fixes and document Link in the new way
Martin Quinson [Sat, 1 Feb 2020 11:54:15 +0000 (12:54 +0100)]
doc: fixes and document Link in the new way

4 years agoautodoxy: don't complain if the provided prototype is missing 'const'
Martin Quinson [Sat, 1 Feb 2020 11:53:34 +0000 (12:53 +0100)]
autodoxy: don't complain if the provided prototype is missing 'const'

4 years agofinish the doc under the new format for Host
Martin Quinson [Sat, 1 Feb 2020 01:12:42 +0000 (02:12 +0100)]
finish the doc under the new format for Host

4 years agoignore MSG and friends on sonar
Martin Quinson [Fri, 31 Jan 2020 16:56:27 +0000 (17:56 +0100)]
ignore MSG and friends on sonar

4 years agoFix test mc/mutex-handling.
Arnaud Giersch [Fri, 31 Jan 2020 14:18:16 +0000 (15:18 +0100)]
Fix test mc/mutex-handling.

It runs correctly now, but I'm not sure of its results.

In particular, it seems to find a counter-example correclty, contrarily of what
is written in leading comments.

4 years agoCosmetics: use std::vector, so that it's automatically initialized and free'd.
Arnaud Giersch [Fri, 31 Jan 2020 13:47:27 +0000 (14:47 +0100)]
Cosmetics: use std::vector, so that it's automatically initialized and free'd.