Arnaud Giersch [Wed, 12 Feb 2020 22:16:37 +0000 (23:16 +0100)]
Allow to call test() on canceled activities.
Arnaud Giersch [Tue, 11 Feb 2020 08:05:10 +0000 (09:05 +0100)]
[sonar] Add const.
Frederic Suter [Wed, 12 Feb 2020 05:01:32 +0000 (06:01 +0100)]
this test has been converted
Frederic Suter [Tue, 11 Feb 2020 22:23:50 +0000 (23:23 +0100)]
C version of async-waitall
Frederic Suter [Tue, 11 Feb 2020 05:22:23 +0000 (06:22 +0100)]
add actor-exiting in C
This is a shorter counterpart to the C++ example as signals cannot be
used. The only way to be informed of the termination of an actor is
thus to rely on the sg_actor_on_exit function.
Martin Quinson [Tue, 11 Feb 2020 21:28:17 +0000 (22:28 +0100)]
don't use deprecated functions
Martin Quinson [Tue, 11 Feb 2020 21:08:05 +0000 (22:08 +0100)]
rename Host::send_to to sendto; add sendto_async
Martin Quinson [Mon, 10 Feb 2020 19:59:18 +0000 (20:59 +0100)]
Doc++
Frederic Suter [Mon, 10 Feb 2020 16:21:47 +0000 (17:21 +0100)]
two more conversions
Frederic Suter [Mon, 10 Feb 2020 15:58:26 +0000 (16:58 +0100)]
add sg_actor_sleep_until
Arnaud Giersch [Mon, 10 Feb 2020 15:20:10 +0000 (16:20 +0100)]
Missing include.
Arnaud Giersch [Mon, 10 Feb 2020 15:08:38 +0000 (16:08 +0100)]
Deprecate e_smx_state_t.
Arnaud Giersch [Mon, 10 Feb 2020 15:08:38 +0000 (16:08 +0100)]
Take simcalls {execution,io}_wait toward modernity.
Arnaud Giersch [Mon, 10 Feb 2020 15:02:14 +0000 (16:02 +0100)]
Move ::wait_for() from ExecImpl and IoImpl to ActivityImpl.
Arnaud Giersch [Mon, 10 Feb 2020 14:59:33 +0000 (15:59 +0100)]
Define ActivityImpl::set_timeout().
Arnaud Giersch [Mon, 10 Feb 2020 14:55:25 +0000 (15:55 +0100)]
Define {Exec,Io}Impl::wait_for().
Arnaud Giersch [Sun, 9 Feb 2020 20:51:44 +0000 (21:51 +0100)]
Todo-- (done since v3.25)
Arnaud Giersch [Sun, 9 Feb 2020 20:48:25 +0000 (21:48 +0100)]
Activity::State::ERRORED is never used.
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.
Arnaud Giersch [Fri, 7 Feb 2020 16:20:50 +0000 (17:20 +0100)]
Improve coverage :p
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.
Frederic Suter [Sun, 9 Feb 2020 14:31:20 +0000 (15:31 +0100)]
do not enforce a specific order
Frederic Suter [Sun, 9 Feb 2020 14:07:52 +0000 (15:07 +0100)]
simgrid_get_all_hosts was redundant with existing sg_host_list
Frederic Suter [Sat, 8 Feb 2020 16:47:28 +0000 (17:47 +0100)]
bummer. fix clang
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
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
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.
Arnaud Giersch [Fri, 7 Feb 2020 14:03:56 +0000 (15:03 +0100)]
Modernize simcall_io_test().
Arnaud Giersch [Fri, 7 Feb 2020 13:28:24 +0000 (14:28 +0100)]
Modernize simcall_execution_test().
Frederic Suter [Fri, 7 Feb 2020 10:18:42 +0000 (11:18 +0100)]
Deprecate host_get_mounted_storage_list
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.
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.
Frederic Suter [Fri, 7 Feb 2020 09:49:59 +0000 (10:49 +0100)]
introduce sg_host_disks
Arnaud Giersch [Fri, 7 Feb 2020 08:13:55 +0000 (09:13 +0100)]
Pursue deprecation of xbt/synchro.h.
Arnaud Giersch [Thu, 6 Feb 2020 22:16:17 +0000 (23:16 +0100)]
Deprecate unused simcall_comm_iprobe() + comments.
Arnaud Giersch [Thu, 6 Feb 2020 16:10:45 +0000 (17:10 +0100)]
Fix dist.
Arnaud Giersch [Thu, 6 Feb 2020 15:59:41 +0000 (16:59 +0100)]
Add "explicit".
Frederic Suter [Thu, 6 Feb 2020 15:59:07 +0000 (16:59 +0100)]
add C interface to disks
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
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
Arnaud Giersch [Thu, 6 Feb 2020 15:19:18 +0000 (16:19 +0100)]
Convert surf/maxmin_bench to xbt/random too.
Arnaud Giersch [Wed, 5 Feb 2020 22:45:20 +0000 (23:45 +0100)]
Replace usage of <random> with <xbt/random.hpp>.
Arnaud Giersch [Wed, 5 Feb 2020 20:49:40 +0000 (21:49 +0100)]
[examples/s4u-app-bittorrent] Use a different RNG for each node.
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).
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.
Arnaud Giersch [Thu, 6 Feb 2020 14:44:50 +0000 (15:44 +0100)]
Plug memory leak, and othre polishing.
Arnaud Giersch [Thu, 6 Feb 2020 14:37:52 +0000 (15:37 +0100)]
Update Copyright line.
Arnaud Giersch [Thu, 6 Feb 2020 14:29:21 +0000 (15:29 +0100)]
Catch any kind of Exception here (revert previous change).
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
Arnaud Giersch [Thu, 6 Feb 2020 12:40:12 +0000 (13:40 +0100)]
Prefer a do-while in these cases.
Arnaud Giersch [Thu, 6 Feb 2020 12:39:34 +0000 (13:39 +0100)]
Fix division by zero on 32bit systems.
Frederic Suter [Thu, 6 Feb 2020 10:42:21 +0000 (11:42 +0100)]
do not use sg_hosts_as_dynar in C++
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
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.
Arnaud Giersch [Thu, 6 Feb 2020 10:45:36 +0000 (11:45 +0100)]
Set seed only after having chosen the implementation.
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.
Arnaud Giersch [Thu, 6 Feb 2020 10:07:52 +0000 (11:07 +0100)]
Cosmetics in xbt/random.
Julien EMMANUEL [Thu, 6 Feb 2020 10:10:40 +0000 (11:10 +0100)]
Fix overflow of large parameters in doc
Arnaud Giersch [Thu, 6 Feb 2020 09:57:37 +0000 (10:57 +0100)]
Merge branch 'pikachuyann/simgrid-xbt_random'
Arnaud Giersch [Thu, 6 Feb 2020 08:57:43 +0000 (09:57 +0100)]
Warnings in docs (spaces and consts).
Arnaud Giersch [Thu, 6 Feb 2020 08:34:30 +0000 (09:34 +0100)]
Avoid needless loop.
Arnaud Giersch [Thu, 6 Feb 2020 08:29:39 +0000 (09:29 +0100)]
Simplify logic.
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.
Arnaud Giersch [Wed, 5 Feb 2020 20:15:33 +0000 (21:15 +0100)]
[examples/s4u-dht-chord] Simplify nested loops in Node::operator().
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.
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
Julien EMMANUEL [Wed, 5 Feb 2020 13:47:23 +0000 (14:47 +0100)]
Fix 'TOC' image size in doc
Arnaud Giersch [Wed, 5 Feb 2020 09:13:18 +0000 (10:13 +0100)]
Const++.
Arnaud Giersch [Wed, 5 Feb 2020 09:04:09 +0000 (10:04 +0100)]
Add "const" to some getters of Activities.
Arnaud Giersch [Wed, 5 Feb 2020 08:51:38 +0000 (09:51 +0100)]
Fix potential use after free.
Arnaud Giersch [Tue, 4 Feb 2020 20:21:19 +0000 (21:21 +0100)]
Use const reference for parameter of type ActorCodeFactory.
Frederic Suter [Wed, 5 Feb 2020 09:45:42 +0000 (10:45 +0100)]
fix
Frederic Suter [Wed, 5 Feb 2020 09:34:25 +0000 (10:34 +0100)]
make C version of actor-create functional
Frederic Suter [Wed, 5 Feb 2020 08:15:34 +0000 (09:15 +0100)]
convert a MSG test to a s4u-c example
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.
Martin Quinson [Tue, 4 Feb 2020 16:18:36 +0000 (17:18 +0100)]
convert two tesh to use s4u instead of using SIMIX directly
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.
Arnaud Giersch [Tue, 4 Feb 2020 12:29:33 +0000 (13:29 +0100)]
Kill duplicate definition.
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
Martin Quinson [Tue, 4 Feb 2020 12:48:30 +0000 (13:48 +0100)]
docker: don't build java nor MSG on unstable
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).
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.
Martin Quinson [Tue, 4 Feb 2020 10:54:25 +0000 (11:54 +0100)]
fix make distcheck and pip compile
Martin Quinson [Sun, 2 Feb 2020 21:43:36 +0000 (22:43 +0100)]
Modern C++: prefer type aliasing with using to C-style typedef
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
Martin Quinson [Tue, 4 Feb 2020 10:07:27 +0000 (11:07 +0100)]
doc: allow to document C examples
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
Martin Quinson [Tue, 4 Feb 2020 09:58:01 +0000 (10:58 +0100)]
new C example on actor creation
Martin Quinson [Tue, 4 Feb 2020 09:55:35 +0000 (10:55 +0100)]
c/async-waitany: cleanups to align with cpp and py
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
Martin Quinson [Tue, 4 Feb 2020 09:18:07 +0000 (10:18 +0100)]
no dynar in the new C interface (+cleanups in CMakeLists)
Martin Quinson [Tue, 4 Feb 2020 08:51:22 +0000 (09:51 +0100)]
Fix the refcounting in this C example
Frederic Suter [Tue, 4 Feb 2020 08:34:03 +0000 (09:34 +0100)]
fix refcounting issues
Frederic Suter [Mon, 3 Feb 2020 15:09:30 +0000 (16:09 +0100)]
convert a msg test to C-s4u (borken for now)
Frederic Suter [Mon, 3 Feb 2020 15:07:36 +0000 (16:07 +0100)]
C interface to Comm::wait_any_for
Frederic Suter [Mon, 3 Feb 2020 15:04:53 +0000 (16:04 +0100)]
add a few functions to Mailbox C API
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*
Arnaud Giersch [Sun, 2 Feb 2020 20:16:41 +0000 (21:16 +0100)]
Introduce XBT_ATTRIB_DEPRECATED_v330.
Martin Quinson [Sun, 2 Feb 2020 16:28:40 +0000 (17:28 +0100)]
cmake: kill an unused variable: SIMGRID_VERSION_DATE
Martin Quinson [Sun, 2 Feb 2020 15:58:09 +0000 (16:58 +0100)]
docker: update the link to the latest stable release