Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
2 years agoInclude cmake/Flags.cmake after DefinePackages.
Arnaud Giersch [Tue, 29 Jan 2019 21:00:18 +0000 (22:00 +0100)]
Include cmake/Flags.cmake after DefinePackages.

The former uses variables defined in the latter (e.g. MC_SRC).

2 years agoImprove coverage, even with high log threshold.
Arnaud Giersch [Tue, 29 Jan 2019 15:31:30 +0000 (16:31 +0100)]
Improve coverage, even with high log threshold.

2 years agoKill dead code in kademlia examples.
Arnaud Giersch [Tue, 29 Jan 2019 12:34:27 +0000 (13:34 +0100)]
Kill dead code in kademlia examples.

2 years ago[java] Delete broken test.
Arnaud Giersch [Tue, 29 Jan 2019 12:13:23 +0000 (13:13 +0100)]
[java] Delete broken test.

2 years ago[java] Catch StopRequest during VM migration.
Arnaud Giersch [Tue, 29 Jan 2019 10:49:24 +0000 (11:49 +0100)]
[java] Catch StopRequest during VM migration.

2 years ago[sonar] Inform that some properties are overridden by Jenkins.
Arnaud Giersch [Tue, 29 Jan 2019 12:51:54 +0000 (13:51 +0100)]
[sonar] Inform that some properties are overridden by Jenkins.

2 years ago[sonar] Only exclude from coverage a subset of python files.
Arnaud Giersch [Tue, 29 Jan 2019 09:58:05 +0000 (10:58 +0100)]
[sonar] Only exclude from coverage a subset of python files.

2 years agoEnable running parmap_bench for coverage.
Arnaud Giersch [Tue, 29 Jan 2019 09:33:15 +0000 (10:33 +0100)]
Enable running parmap_bench for coverage.

2 years agoparmap_bench: make timeout a runtime parameter.
Arnaud Giersch [Tue, 29 Jan 2019 09:25:21 +0000 (10:25 +0100)]
parmap_bench: make timeout a runtime parameter.

2 years agoKill dead code.
Arnaud Giersch [Tue, 29 Jan 2019 09:11:38 +0000 (10:11 +0100)]
Kill dead code.

This test for mallocators has never been used.

2 years agoProcess.java: reduce the debugging scaffolding now that it works
Martin Quinson [Tue, 29 Jan 2019 08:26:24 +0000 (09:26 +0100)]
Process.java: reduce the debugging scaffolding now that it works

2 years agothis file should not be executable
Martin Quinson [Mon, 28 Jan 2019 14:55:32 +0000 (15:55 +0100)]
this file should not be executable

2 years agoOnly unregister the kill timer once, in maestro context
Martin Quinson [Mon, 28 Jan 2019 08:16:17 +0000 (09:16 +0100)]
Only unregister the kill timer once, in maestro context

2 years agoRemove workaround for g++ 4.8.
Arnaud Giersch [Sun, 27 Jan 2019 21:24:40 +0000 (22:24 +0100)]
Remove workaround for g++ 4.8.

g++ 5.0 or higher is advertised in the doc.

2 years agoImplement xbt::Result with boost::variant.
Arnaud Giersch [Sun, 27 Jan 2019 20:07:06 +0000 (21:07 +0100)]
Implement xbt::Result with  boost::variant.

std::variant is today not an option because it's C++17.

2 years agoFix memleak.
Arnaud Giersch [Sun, 27 Jan 2019 17:33:57 +0000 (18:33 +0100)]
Fix memleak.

The comment seems to be invalidated by commit 4f2d08b0ae4625d32890dc4613e1d842ad0f7b77
"Sanitize the API of this_actor::parallel_execute()"

2 years agoDocument a recent example
Martin Quinson [Sun, 27 Jan 2019 17:48:31 +0000 (18:48 +0100)]
Document a recent example

2 years agoactivity::CommImpl: stick to our naming standards for the fields
Martin Quinson [Sun, 27 Jan 2019 09:03:25 +0000 (10:03 +0100)]
activity::CommImpl: stick to our naming standards for the fields

2 years agohelp scan-build understanding that status is not used unintialized
Martin Quinson [Sat, 26 Jan 2019 20:49:27 +0000 (21:49 +0100)]
help scan-build understanding that status is not used unintialized

2 years agoProperly call Actor::on_destruction() in maestro context
Martin Quinson [Sat, 26 Jan 2019 20:12:37 +0000 (21:12 +0100)]
Properly call Actor::on_destruction() in maestro context

This induces a harmless change in trace-process-migration.tesh and
fixes the s4u-actor-exiting example \o/

2 years agoinline a function
Martin Quinson [Sat, 26 Jan 2019 19:49:06 +0000 (20:49 +0100)]
inline a function

2 years agono need to remove the killed actor from canceled comm: refcounting is working
Martin Quinson [Sat, 26 Jan 2019 19:33:12 +0000 (20:33 +0100)]
no need to remove the killed actor from canceled comm: refcounting is working

2 years agoAutomatic refcounting on the src and dst actors of a comm
Martin Quinson [Sat, 26 Jan 2019 18:09:51 +0000 (19:09 +0100)]
refcounting on the src and dst actors of a comm

2 years agoThe pimpl of s4u objects is const
Martin Quinson [Sat, 26 Jan 2019 17:43:11 +0000 (18:43 +0100)]
The pimpl of s4u objects is const

But the one of activities and the cpu_pimpl of host (the codebase is
not ready yet).

2 years agoalways cancel the comms of killed actors in the context of that actor (not in maestro)
Martin Quinson [Sat, 26 Jan 2019 10:02:31 +0000 (11:02 +0100)]
always cancel the comms of killed actors in the context of that actor (not in maestro)

2 years agoAlways call process_on_exit in the actor context
Martin Quinson [Sat, 26 Jan 2019 08:49:26 +0000 (09:49 +0100)]
Always call process_on_exit in the actor context

2 years agoI'd like to kill that parmap.h at some point
Martin Quinson [Sat, 26 Jan 2019 08:48:59 +0000 (09:48 +0100)]
I'd like to kill that parmap.h at some point

Let's first reduce its visibility

2 years agosonar was right: this if/else if was missing a else
Martin Quinson [Sat, 26 Jan 2019 08:28:25 +0000 (09:28 +0100)]
sonar was right: this if/else if was missing a else

2 years agotrick sonar 'identical sub-expression on both side of >'
Martin Quinson [Fri, 25 Jan 2019 07:10:00 +0000 (08:10 +0100)]
trick sonar 'identical sub-expression on both side of >'

2 years agoRestore final messages in Java examples.
Arnaud Giersch [Fri, 25 Jan 2019 14:20:18 +0000 (15:20 +0100)]
Restore final messages in Java examples.

They should be OK now that the termination of Java processes has been repaired.
These messages were removed by commit d535c50c617ba838b99de4bd251a6ac076774d00
"Somehow fix the killing of actors in Java".

2 years agoTry to silent scan-build.
Arnaud Giersch [Fri, 25 Jan 2019 11:15:11 +0000 (12:15 +0100)]
Try to silent scan-build.

2 years ago[sonar] Don't use default capture for lambda.
Arnaud Giersch [Fri, 25 Jan 2019 09:02:52 +0000 (10:02 +0100)]
[sonar] Don't use default capture for lambda.

2 years ago[sonar] Remove variadic functions.
Arnaud Giersch [Fri, 25 Jan 2019 08:39:47 +0000 (09:39 +0100)]
[sonar] Remove variadic functions.

2 years agoChange helper functions to static methods of StopRequest.
Arnaud Giersch [Thu, 24 Jan 2019 11:04:01 +0000 (12:04 +0100)]
Change helper functions to static methods of StopRequest.

2 years agoMove StopRequest out of Context.
Arnaud Giersch [Thu, 24 Jan 2019 10:56:44 +0000 (11:56 +0100)]
Move StopRequest out of Context.

Using context::Context in fully qualified name was redundant.

2 years ago[sonar] Anonymize unused parameters.
Arnaud Giersch [Thu, 24 Jan 2019 22:28:11 +0000 (23:28 +0100)]
[sonar] Anonymize unused parameters.

2 years agoHelp scan-build not seeing that "status" is initialized.
Arnaud Giersch [Thu, 24 Jan 2019 21:47:41 +0000 (22:47 +0100)]
Help scan-build not seeing that "status" is initialized.

Also kill TODO: source is not known when it's irecv.

2 years agosonar: don't catch exceptions we have no idea about
Martin Quinson [Thu, 24 Jan 2019 18:58:52 +0000 (19:58 +0100)]
sonar: don't catch exceptions we have no idea about

2 years agoRemove useless 2nd parameter "catch_block" for try_n_catch_stoprequest().
Arnaud Giersch [Wed, 23 Jan 2019 22:49:32 +0000 (23:49 +0100)]
Remove useless 2nd parameter "catch_block" for try_n_catch_stoprequest().

2 years agosonar cleanups
Martin Quinson [Thu, 24 Jan 2019 07:06:26 +0000 (08:06 +0100)]
sonar cleanups

- kill dead code
- stick to Java variable naming convention
- prefer isEmpty() to size()==0

2 years agoappveyor: don't test python. mingw cannot deal with pybind11 yet
Martin Quinson [Thu, 24 Jan 2019 06:48:55 +0000 (07:48 +0100)]
appveyor: don't test python. mingw cannot deal with pybind11 yet

2 years agoadd a small comment about the memleak introduced here
Martin Quinson [Thu, 24 Jan 2019 06:45:50 +0000 (07:45 +0100)]
add a small comment about the memleak introduced here

2 years agoStop using Context::StopRequest directly in libsimgrid-java.
Arnaud Giersch [Wed, 23 Jan 2019 22:22:58 +0000 (23:22 +0100)]
Stop using Context::StopRequest directly in libsimgrid-java.

2 years agoDefine helper functions to use Context::StopRequest outside of libsimgrid.
Arnaud Giersch [Wed, 23 Jan 2019 22:17:48 +0000 (23:17 +0100)]
Define helper functions to use Context::StopRequest outside of libsimgrid.

Rationale: exceptions sometimes fail to pass correctly between shared
libraries, specially on FreeBSD or OS X.

2 years agoHope to fix double-free: task may by destroyed on finalize().
Arnaud Giersch [Wed, 23 Jan 2019 20:35:53 +0000 (21:35 +0100)]
Hope to fix double-free: task may by destroyed on finalize().

2 years agoMerge remote-tracking branch 'github/master'
Arnaud Giersch [Wed, 23 Jan 2019 20:36:58 +0000 (21:36 +0100)]
Merge remote-tracking branch 'github/master'

2 years agocoverage : avoid matching cobertura pattern with jacoco files
Augustin Degomme [Wed, 23 Jan 2019 14:38:33 +0000 (15:38 +0100)]
coverage : avoid matching cobertura pattern with jacoco files

2 years agoUse $PYTHON_EXECUTABLE in tesh files.
Arnaud Giersch [Wed, 23 Jan 2019 13:34:56 +0000 (14:34 +0100)]
Use $PYTHON_EXECUTABLE in tesh files.

2 years agoImprove process termination in Java world.
Arnaud Giersch [Wed, 23 Jan 2019 11:29:45 +0000 (12:29 +0100)]
Improve process termination in Java world.

2 years agoMerge branch 'master' of framagit.org:simgrid/simgrid
Martin Quinson [Wed, 23 Jan 2019 06:58:21 +0000 (07:58 +0100)]
Merge branch 'master' of framagit.org:simgrid/simgrid

2 years agoRemove 2 (out of 3) horrible hacks around Java contexts
Martin Quinson [Wed, 23 Jan 2019 06:37:18 +0000 (07:37 +0100)]
Remove 2 (out of 3) horrible hacks around Java contexts

Previously, we did not even try to kill java contexts because we
failed to do so in some cases.  Now, we try to kill them just like we
kill the other contexts, even if we don't always succeed.

One difficulty comes from the fact that some threads are created from
the C++ (from the deployment file) and then attached to the JVM, while
some others are created from Java directly (when calling new
Process().start()). The C++ vs Java stack is directly inverted between
cases, complicating the try/catch logic.

In practice, in this changeset, we try harder to convert between the
C++ StopRequest and the Java ProcessKilledError at the language
boundaries.

Also, we don't assert that JavaThread::stop() can actually detach the
thread: it won't for threads that are born in Java because their Java
stack was not unwinded yet. So throw a ProcessKilledError for that.

This is not prefect either since we still need to brutally kill the
JVM after the simulation using exit(0). I added some debug functions
to get more information. Just comment the first call to exit(0) in
jmsg.cpp to see the state of all user threads that we failed to
destroy.

They are all in the C++ world, without any [Java] stack, not blocked
on any Java synchronization object. I suspect that the system thread
is terminated, but the C++ std::thread object is still referenced
somewhere, preventing it from being garbage collected. That's weird
that the JVM still waits for them before ending (and thus mandating
the last the Horrible Hack -- exit(0) in the C++ side of the JVM
system process).

Gosh this is complicated. I'd love to have something like pybind11
dealing with all that shit automatically...

2 years agoFix++
Arnaud Giersch [Tue, 22 Jan 2019 22:07:43 +0000 (23:07 +0100)]
Fix++

Got:
> ctest --output-on-failure -R 'java|python'
> 'python'' is not recognized as an internal or external command,
> operable program or batch file.
> Command exited with code 255

2 years agoFix ctest invocation on appveyor.
Arnaud Giersch [Tue, 22 Jan 2019 21:56:22 +0000 (22:56 +0100)]
Fix ctest invocation on appveyor.

2 years agoLast attempt for python/mingw.
Arnaud Giersch [Tue, 22 Jan 2019 21:42:09 +0000 (22:42 +0100)]
Last attempt for python/mingw.

2 years agoMerge branch 'master' of framagit.org:simgrid/simgrid
Martin Quinson [Tue, 22 Jan 2019 21:21:37 +0000 (22:21 +0100)]
Merge branch 'master' of framagit.org:simgrid/simgrid

2 years agoTry to get python compiling even with MinGW
Martin Quinson [Tue, 22 Jan 2019 20:22:02 +0000 (21:22 +0100)]
Try to get python compiling even with MinGW

2 years agoappveyor: also build and test python
Martin Quinson [Tue, 22 Jan 2019 19:57:40 +0000 (20:57 +0100)]
appveyor: also build and test python

2 years agoAvoid to call Context::stop() again when a StopRequest was thrown.
Arnaud Giersch [Tue, 22 Jan 2019 19:48:43 +0000 (20:48 +0100)]
Avoid to call Context::stop() again when a StopRequest was thrown.

It's already called just before the exception is thrown by the stop() method
(SwappedContext or ThreadContext).
Asan likes it better when it's called before throwing the exception.

2 years agouse the local copy of pybind11 if a local checkout exists
Martin Quinson [Tue, 22 Jan 2019 19:54:20 +0000 (20:54 +0100)]
use the local copy of pybind11 if a local checkout exists

2 years agoappveyor: try to get pybind11
Martin Quinson [Tue, 22 Jan 2019 17:08:57 +0000 (18:08 +0100)]
appveyor: try to get pybind11

2 years agoSimplify the actor answer to iwannadie
Martin Quinson [Mon, 21 Jan 2019 16:01:14 +0000 (17:01 +0100)]
Simplify the actor answer to iwannadie

2 years agoplay safe, no pointers to the stack of dying actors
Martin Quinson [Mon, 21 Jan 2019 15:41:36 +0000 (16:41 +0100)]
play safe, no pointers to the stack of dying actors

2 years agostep by step cleanup. This code drives me nuts
Martin Quinson [Mon, 21 Jan 2019 14:56:04 +0000 (15:56 +0100)]
step by step cleanup. This code drives me nuts

2 years agoAttempt to fix Python bindings on OS X.
Arnaud Giersch [Tue, 22 Jan 2019 15:35:51 +0000 (16:35 +0100)]
Attempt to fix Python bindings on OS X.

See https://github.com/pybind/pybind11/issues/1272.

2 years agoTypo.
Arnaud Giersch [Tue, 22 Jan 2019 14:25:58 +0000 (15:25 +0100)]
Typo.

2 years agoAdd missing issues to ChangeLog.
Arnaud Giersch [Tue, 22 Jan 2019 13:20:17 +0000 (14:20 +0100)]
Add missing issues to ChangeLog.

2 years agoFactorize some of the ASAN_ONLY code.
Arnaud Giersch [Mon, 21 Jan 2019 21:45:14 +0000 (22:45 +0100)]
Factorize some of the ASAN_ONLY code.

Also make asan_* members public to be visible from smx_ctx_wrapper
(ContextUnix,cpp).

2 years agoActivate test s4u-actor-exiting.
Arnaud Giersch [Mon, 21 Jan 2019 15:15:13 +0000 (16:15 +0100)]
Activate test s4u-actor-exiting.

According to emptty it's failing, add note with set_tesh_properties().
Also fix distcheck.

2 years agoSimplify by using set_tesh_properties().
Arnaud Giersch [Mon, 21 Jan 2019 14:58:05 +0000 (15:58 +0100)]
Simplify by using set_tesh_properties().

2 years agoRemove old cruft.
Arnaud Giersch [Mon, 21 Jan 2019 12:03:40 +0000 (13:03 +0100)]
Remove old cruft.

These functions and variables were removed a while ago.

2 years agoAvoid TSan false positives.
Arnaud Giersch [Mon, 21 Jan 2019 11:57:01 +0000 (12:57 +0100)]
Avoid TSan false positives.

2 years agoCosmetics.
Arnaud Giersch [Mon, 21 Jan 2019 11:09:21 +0000 (12:09 +0100)]
Cosmetics.

2 years agoUpdate ChangeLog.
Arnaud Giersch [Fri, 18 Jan 2019 09:01:58 +0000 (10:01 +0100)]
Update ChangeLog.

2 years agofurther s/trace/profile/ cleanups
Martin Quinson [Mon, 21 Jan 2019 13:58:12 +0000 (14:58 +0100)]
further s/trace/profile/ cleanups

2 years agoDoc improvement
Martin Quinson [Mon, 21 Jan 2019 13:53:13 +0000 (14:53 +0100)]
Doc improvement

2 years agostart to s/trace/profile/ in the public API
Martin Quinson [Mon, 21 Jan 2019 12:32:09 +0000 (13:32 +0100)]
start to s/trace/profile/ in the public API

2 years agostart renaming tmgr trace into profile
Martin Quinson [Mon, 21 Jan 2019 10:43:19 +0000 (11:43 +0100)]
start renaming tmgr trace into profile

2 years agoTry to make a symbol easier to find for MC on exotic platforms
Martin Quinson [Mon, 21 Jan 2019 08:42:37 +0000 (09:42 +0100)]
Try to make a symbol easier to find for MC on exotic platforms

2 years agoFix non-java tests :(
Martin Quinson [Mon, 21 Jan 2019 07:09:17 +0000 (08:09 +0100)]
Fix non-java tests :(

2 years agoctx: move some bits to a private header and reduce the exposure of src/internal_config.h
Martin Quinson [Sun, 20 Jan 2019 21:55:40 +0000 (22:55 +0100)]
ctx: move some bits to a private header and reduce the exposure of src/internal_config.h

2 years agocosmetics in UCtx: hide one internal function and inline another
Martin Quinson [Sun, 20 Jan 2019 21:25:16 +0000 (22:25 +0100)]
cosmetics in UCtx: hide one internal function and inline another

2 years agoIn C++, classes don't need a name because they have a class
Martin Quinson [Sun, 20 Jan 2019 20:41:27 +0000 (21:41 +0100)]
In C++, classes don't need a name because they have a class

2 years agothread_local fields must be static, no need to move to the factory
Martin Quinson [Sun, 20 Jan 2019 18:44:10 +0000 (19:44 +0100)]
thread_local fields must be static, no need to move to the factory

2 years agokill an unused function
Martin Quinson [Sun, 20 Jan 2019 17:09:13 +0000 (18:09 +0100)]
kill an unused function

2 years agos/process/actor/ A lot remains TBD about it
Martin Quinson [Sun, 20 Jan 2019 11:19:38 +0000 (12:19 +0100)]
s/process/actor/ A lot remains TBD about it

2 years agoMore ints converted as boolean
Martin Quinson [Sun, 20 Jan 2019 00:40:26 +0000 (01:40 +0100)]
More ints converted as boolean

2 years agonew (failing) example about on_exit and on_destruction
Martin Quinson [Sun, 20 Jan 2019 00:33:37 +0000 (01:33 +0100)]
new (failing) example about on_exit and on_destruction

2 years agobools are not ints anymore
Martin Quinson [Sun, 20 Jan 2019 00:24:11 +0000 (01:24 +0100)]
bools are not ints anymore

2 years agouseless cleanups
Martin Quinson [Sun, 20 Jan 2019 00:11:12 +0000 (01:11 +0100)]
useless cleanups

2 years agoFix a race condition in SwappedCtx parallel exec
Martin Quinson [Sat, 19 Jan 2019 22:18:07 +0000 (23:18 +0100)]
Fix a race condition in SwappedCtx parallel exec

The protection in set_maestro was failing to detect between the real
maestro and the working threads of the parmal. This is now fixed
according to helgrind.

Also, refactor things a bit by moving this set_maestro call directly
into the SwappedCtx constructor. Much less of a shotgun surgery :)

2 years agoHide usage of free() to Sonar.
Arnaud Giersch [Thu, 17 Jan 2019 08:43:23 +0000 (09:43 +0100)]
Hide usage of free() to Sonar.

2 years agoRemove unused bits from mmalloc.
Arnaud Giersch [Thu, 17 Jan 2019 08:21:51 +0000 (09:21 +0100)]
Remove unused bits from mmalloc.

2 years agofix MC on FreeBSD
Martin Quinson [Thu, 17 Jan 2019 00:27:03 +0000 (01:27 +0100)]
fix MC on FreeBSD

2 years agoFix paths.
Arnaud Giersch [Wed, 16 Jan 2019 22:55:38 +0000 (23:55 +0100)]
Fix paths.

2 years agoKill unused example simdag/goal_test.
Arnaud Giersch [Wed, 16 Jan 2019 20:58:48 +0000 (21:58 +0100)]
Kill unused example simdag/goal_test.

2 years agoTypo².
Arnaud Giersch [Wed, 16 Jan 2019 22:48:23 +0000 (23:48 +0100)]
Typo².

2 years agoRevert "Disable parallel executions with non-thread contexts under Tsan."
Martin Quinson [Wed, 16 Jan 2019 22:29:53 +0000 (23:29 +0100)]
Revert "Disable parallel executions with non-thread contexts under Tsan."

I have the feeling that the problem is actually in the parallel exec
of swapped factories, not in TSan.

This reverts commit 019d8784441a673767fd76b20a6283b965ead239.

2 years agoFix memleak.
Arnaud Giersch [Wed, 16 Jan 2019 20:58:48 +0000 (21:58 +0100)]
Fix memleak.

2 years agoTypo.
Arnaud Giersch [Wed, 16 Jan 2019 21:41:58 +0000 (22:41 +0100)]
Typo.

2 years agoReplace macros by C++ constructs.
Arnaud Giersch [Wed, 16 Jan 2019 20:21:16 +0000 (21:21 +0100)]
Replace macros by C++ constructs.