Gabriel Corona [Thu, 30 Oct 2014 13:39:17 +0000 (14:39 +0100)]
[mc] Initial support MC record/replay
The idea is to record an execution path in MC mode inorder to be able
to replay it outside of the MC (event with a non-MC build). Some very
basic (an unobtrusive) MC code is compiled even when MC is disabled.
Gabriel Corona [Mon, 24 Nov 2014 15:03:10 +0000 (16:03 +0100)]
[mc] Test if the stack-cleaner has any effect
In order to test this:
* we compile the same test program with and without the stack cleaner
(`-fstack-cleaner`, `-fno-stack-cleaner`);
* in this program, we move random bytes in the stack;
* we expect the stack-cleaner to zero them out.
This test in only used if the configure stack-cleaner is detected to
support the `-fstack-cleaner` CLI option (it is the stack-cleaner
compiler wrapper).
gabriel corona [Thu, 20 Nov 2014 15:06:21 +0000 (16:06 +0100)]
Temporarily disable an option
The option somehow changes the results in the MC from previous
experiments. It is disabled temporarily in this commit in order to be
able to reproduce those results with the new commits.
degomme [Mon, 17 Nov 2014 22:42:46 +0000 (23:42 +0100)]
Fix problem with unknown datatypes in replay/tracing.
When datatype was unknown to replay, it was replayed as MPI_BYTE.
This modification adds a parameter to encode_datatype, to tell tracing that the datatype size has to be taken into account in the count parameter
This results in the fact that a message of count*datatype_size being replayed as a message of (count*datatype_size)*sizeof(MPI_BYTE), which is the same.
This is not a perfect or elegant solution, but :
- it works.
- it handles manually created datatypes
- it doesn't break previously generated replay files
- it avoids testing each time 50 different datatypes (see encode_datatype function)
- the new parameter avoids doing strcmp with "-1" at each time, performance should not be too bad
Gabriel Corona [Mon, 17 Nov 2014 14:34:34 +0000 (15:34 +0100)]
[mm] Disable HAVE_GNU_LD code in order to get rid of the junkarea
The HAVE_GNU_LD mode of mmalloc delegates in some cases to standard
malloc()/free() which are resolved with dlsym(). This cause some
bootstrap problems which are only resolved with the junkarea: the
junkarea is regularly broken when adding dependencies because the
junkarea is then too small.
By disabling the HAVE_GNU_LD path, we get rid of the junkarea hack.
replace xbt_dynar_member by xbt_dynar_search_or_negative in this test.
There is a weird bug with xbt_dynar_member on some systems.
When an exception is raised, backtracking mechanism of libc6 can cause segfaults (and valgrind complains quite a lot, even on systems where it does not crash)
Is this related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735090 ?
example obtained stack
Invalid read of size 4
at 0x476E383: backtrace (backtrace.c:141)
by 0x43DC03B: xbt_backtrace_current (backtrace_linux.c:84)
by 0x43DB200: xbt_dynar_search (dynar.c:474)
by 0x43DB31F: xbt_dynar_member (dynar.c:511)
by 0x80494A3: test_launcher (host_on_off_processes.c:35)
by 0x43C889E: smx_ctx_sysv_wrapper (smx_context_sysv.c:187)
by 0x46B2BDA: makecontext (makecontext.S:87)
As functionality is the same, using the exception-less version of xbt_dynar_member should avoid the problem, until we find out more about it
Add preliminary support for MPI_Pack, MPI_Pack_size, and MPI_Unpack.
Activate tests for these functions. Somes cases with too complex imbricated datatypes are not supported (yet).
Add MPI_Info_* support.
This adds MPI_Info_create, MPI_Info_free, MPI_Info_get, MPI_Info_dup, MPI_Info_delete, MPI_Info_get_nkeys, MPI_Info_get_nthkey, MPI_Info_get_valuelen functions.
This is just basically a xbt dict wrapper.
We may have issues with the get_nthkey, as the xbt dict does not really keep the order.. but this mpi call is hum ... stupid? aniway.
Gabriel Corona [Mon, 3 Nov 2014 12:04:18 +0000 (13:04 +0100)]
[mc] Do nto clean the main stack
We only need to clean the stacks of the application processes.
Otherwise, we spend a *lot* of time cleaniong the stack in the MC code
which slows SimGridMC a lot and is useless anyway.
The way we check if we need to clean the stack is currently quite
haskish and could be improved.
Martin Quinson [Sun, 2 Nov 2014 23:42:58 +0000 (00:42 +0100)]
[popping] allow to omit the handler
simcalls handlers are good to get extra arguments from the simcall
(such as the issuer) or to check the parameters, but when there is no
such thing to do, they just load the picture for nothing.
Martin Quinson [Sun, 2 Nov 2014 22:58:33 +0000 (23:58 +0100)]
rename smx_action_t to smx_synchro_t
This is an old idea, that I want to implement since at least 3 years.
It removes an ambiguity with surf_action_t, and makes it explicit that
these things are a way to synchronize the processes with their
environment.
Martin Quinson [Sun, 2 Nov 2014 01:23:31 +0000 (02:23 +0100)]
Generate automatically the simcall_HANDLER_* prototypes
- Writing this code manually was burdensome
- This allows to check that the definition in simcall.in actually
match the handler prototype (safer as we are casting wildly)
- This allows to detect (and destroy) some now unused simcalls