Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
3 years agoFix make distcheck
Martin Quinson [Mon, 22 Mar 2021 23:32:56 +0000 (00:32 +0100)]
Fix make distcheck

3 years agoSanitize how tracefiles are handled
Martin Quinson [Mon, 22 Mar 2021 22:48:16 +0000 (23:48 +0100)]
Sanitize how tracefiles are handled

In particular, SMPI was always providing a trace file per actor, even
when only one file was provided, with the content for all actors. That
was a waste of memory and processing.

But the worst was that the same file was opened N times, limiting this
solution to 1024 ranks on linux and 256 on Mac OSX. We could have
asked the users to increase the limit of file descriptors per process
to overcome this limitation.

Hopefuly with this change, the same file will be opened once only,
removing this limit all together.

Fixes https://framagit.org/simgrid/simgrid/-/issues/62

This cleanup also impacts S4U code, that cannot access the
simgrid::xbt::action_fs global anymore to open the shared file itself,
but must use xbt_replay_set_tracefile() for that.

3 years agoNetZone: father to parent and more accessors
SUTER Frederic [Mon, 22 Mar 2021 12:58:24 +0000 (13:58 +0100)]
NetZone: father to parent and more accessors

3 years agotrimming zones
SUTER Frederic [Fri, 19 Mar 2021 10:04:26 +0000 (11:04 +0100)]
trimming zones

3 years agoHandle simcall result through mc::SimcallObserver.
Arnaud Giersch [Mon, 22 Mar 2021 12:29:48 +0000 (13:29 +0100)]
Handle simcall result through mc::SimcallObserver.

Get rid of simix::(un)marshal.

3 years agoReduce scope for variables.
Arnaud Giersch [Mon, 22 Mar 2021 10:08:56 +0000 (11:08 +0100)]
Reduce scope for variables.

3 years agoActivityImpl::register_simcall does not need to be 'virtual'.
Arnaud Giersch [Sat, 20 Mar 2021 20:28:40 +0000 (21:28 +0100)]
ActivityImpl::register_simcall does not need to be 'virtual'.

3 years agoFactor un-registration of simcall.
Arnaud Giersch [Sat, 20 Mar 2021 17:45:38 +0000 (18:45 +0100)]
Factor un-registration of simcall.

3 years agoMake SIMIX_comm_copy_data_callback a member of CommImpl.
Arnaud Giersch [Fri, 19 Mar 2021 23:03:38 +0000 (00:03 +0100)]
Make SIMIX_comm_copy_data_callback a member of CommImpl.

3 years agoMake fields private.
Arnaud Giersch [Fri, 19 Mar 2021 23:00:58 +0000 (00:00 +0100)]
Make fields private.

3 years agoCosmetics (redundant version number).
Arnaud Giersch [Fri, 19 Mar 2021 22:58:27 +0000 (23:58 +0100)]
Cosmetics (redundant version number).

3 years agoThis is the index, we want the rank for the underlying iprobe.
Augustin Degomme [Sun, 21 Mar 2021 00:22:27 +0000 (01:22 +0100)]
This is the index, we want the rank for the underlying iprobe.

3 years agoextraneous chars
Augustin Degomme [Sat, 20 Mar 2021 23:09:01 +0000 (00:09 +0100)]
extraneous chars

3 years agostatus can actually be MPI_STATUS_IGNORE
Augustin Degomme [Sat, 20 Mar 2021 23:08:22 +0000 (00:08 +0100)]
status can actually be MPI_STATUS_IGNORE

3 years agoAdd ModelChecker::finalize_app(), but don't use it as it don't work yet
Martin Quinson [Sat, 20 Mar 2021 21:54:34 +0000 (22:54 +0100)]
Add ModelChecker::finalize_app(), but don't use it as it don't work yet

3 years agosome symbol renamings to make MC easier to understand (to me)
Martin Quinson [Sat, 20 Mar 2021 21:45:14 +0000 (22:45 +0100)]
some symbol renamings to make MC easier to understand (to me)

3 years ago.mailmap
Arnaud Giersch [Fri, 19 Mar 2021 14:48:01 +0000 (15:48 +0100)]
.mailmap

3 years agoMake Time::date const; kill useless getter.
Arnaud Giersch [Fri, 19 Mar 2021 14:03:24 +0000 (15:03 +0100)]
Make Time::date const; kill useless getter.

3 years agoMake fields private; define getters.
Arnaud Giersch [Fri, 19 Mar 2021 13:48:14 +0000 (14:48 +0100)]
Make fields private; define getters.

3 years agoMake Datatype::contents_ a private std::unique_ptr.
Arnaud Giersch [Fri, 19 Mar 2021 13:14:47 +0000 (14:14 +0100)]
Make Datatype::contents_ a private std::unique_ptr.

3 years agoDon't mix public and private fields (sonar).
Arnaud Giersch [Fri, 19 Mar 2021 12:27:31 +0000 (13:27 +0100)]
Don't mix public and private fields (sonar).

3 years agoFactorize handling of asynchronous receives.
Arnaud Giersch [Fri, 19 Mar 2021 10:35:38 +0000 (11:35 +0100)]
Factorize handling of asynchronous receives.

Apply the same changes to both the C and C++ examples.

3 years agoUnnecessary 'else'.
Arnaud Giersch [Fri, 19 Mar 2021 10:08:35 +0000 (11:08 +0100)]
Unnecessary 'else'.

3 years agoMake cast explicit.
Arnaud Giersch [Fri, 19 Mar 2021 09:36:36 +0000 (10:36 +0100)]
Make cast explicit.

3 years agoReduce scope for variables.
Arnaud Giersch [Fri, 19 Mar 2021 09:34:59 +0000 (10:34 +0100)]
Reduce scope for variables.

3 years agoreally set link latency for ns3
SUTER Frederic [Fri, 19 Mar 2021 08:48:27 +0000 (09:48 +0100)]
really set link latency for ns3

3 years agoprivatize fields of ClusterZone + more explicit methods
SUTER Frederic [Thu, 18 Mar 2021 18:26:03 +0000 (19:26 +0100)]
privatize fields of ClusterZone + more explicit methods

3 years agoadd tesh file to dist
Augustin Degomme [Fri, 19 Mar 2021 00:35:36 +0000 (01:35 +0100)]
add tesh file to dist

3 years agoFix clang builds
Martin Quinson [Fri, 19 Mar 2021 00:08:04 +0000 (01:08 +0100)]
Fix clang builds

3 years agoReorder the headers to ensure that ours are actually self-contained
Martin Quinson [Thu, 18 Mar 2021 23:55:35 +0000 (00:55 +0100)]
Reorder the headers to ensure that ours are actually self-contained

3 years agotest with leaks: no printf, and run also in MC (that is currently wrong)
Martin Quinson [Thu, 18 Mar 2021 13:13:08 +0000 (14:13 +0100)]
test with leaks: no printf, and run also in MC (that is currently wrong)

Currently, the MC test ensures that we still don't detect the leaks,
but I don't want to break the builds while I'm working on this.

3 years agoFix non-MC builds
Martin Quinson [Tue, 16 Mar 2021 01:10:43 +0000 (02:10 +0100)]
Fix non-MC builds

3 years agosimcall.py: this parameter is not a field, respect our coding conventions
Martin Quinson [Tue, 16 Mar 2021 00:14:22 +0000 (01:14 +0100)]
simcall.py: this parameter is not a field, respect our coding conventions

3 years agoAdd a tests-mc target to rebuild only what's needed to run the MC tests
Martin Quinson [Mon, 15 Mar 2021 22:29:30 +0000 (23:29 +0100)]
Add a tests-mc target to rebuild only what's needed to run the MC tests

Probably mostly useful to me, but hell, that's really useful :)

3 years agoModernize simcall execution_waitany_for.
Arnaud Giersch [Thu, 18 Mar 2021 08:29:58 +0000 (09:29 +0100)]
Modernize simcall execution_waitany_for.

3 years agoImplement simcall_HANDLER_execution_waitany_for into ExecImpl::wait_any_for.
Arnaud Giersch [Wed, 17 Mar 2021 21:49:08 +0000 (22:49 +0100)]
Implement simcall_HANDLER_execution_waitany_for into ExecImpl::wait_any_for.

3 years agoMake simcall execution_waitany_for use a std::vector internally.
Arnaud Giersch [Wed, 17 Mar 2021 21:47:10 +0000 (22:47 +0100)]
Make simcall execution_waitany_for use a std::vector internally.

3 years agoUse functions from ActorImpl when available.
Arnaud Giersch [Wed, 17 Mar 2021 22:49:39 +0000 (23:49 +0100)]
Use functions from ActorImpl when available.

3 years agoLowercase PID in function name (2/2 - public part).
Arnaud Giersch [Wed, 17 Mar 2021 22:45:43 +0000 (23:45 +0100)]
Lowercase PID in function name (2/2 - public part).

Changed: sg_actor_get_PID, sg_actor_get_PPID, sg_actor_by_PID

3 years agoLowercase PID in function name (1/2 - private part).
Arnaud Giersch [Wed, 17 Mar 2021 22:33:33 +0000 (23:33 +0100)]
Lowercase PID in function name (1/2 - private part).

Changed: ActorImpl::by_PID

3 years agoSonar wants separate declarations.
Arnaud Giersch [Wed, 17 Mar 2021 14:37:45 +0000 (15:37 +0100)]
Sonar wants separate declarations.

3 years agoFix build with older compilers.
Arnaud Giersch [Wed, 17 Mar 2021 11:05:06 +0000 (12:05 +0100)]
Fix build with older compilers.

E.g. gcc 6.3 or clang 3.8.

3 years agoTypos.
Arnaud Giersch [Wed, 17 Mar 2021 10:09:42 +0000 (11:09 +0100)]
Typos.

3 years agoMisc sonar smells.
Arnaud Giersch [Wed, 17 Mar 2021 10:08:05 +0000 (11:08 +0100)]
Misc sonar smells.

3 years agoAugment test to cover sem_acquire_timeout.
Arnaud Giersch [Wed, 17 Mar 2021 09:15:40 +0000 (10:15 +0100)]
Augment test to cover sem_acquire_timeout.

Also cover sg_sem_would_block and sg_sem_get_capacity.

3 years agoOops. Forgot to handle timeout.
Arnaud Giersch [Wed, 17 Mar 2021 08:42:13 +0000 (09:42 +0100)]
Oops. Forgot to handle timeout.

We really need a test for that.

3 years agomake update_algorithm optional in model creation. Full is default
SUTER Frederic [Wed, 17 Mar 2021 09:02:08 +0000 (10:02 +0100)]
make update_algorithm optional in model creation. Full is default

3 years agoModernize simcall sem_acquire_timeout.
Arnaud Giersch [Tue, 16 Mar 2021 21:38:10 +0000 (22:38 +0100)]
Modernize simcall sem_acquire_timeout.

Note: we need a test for that.

3 years agoModernize simcall cond_wait_timeout.
Arnaud Giersch [Tue, 16 Mar 2021 21:17:14 +0000 (22:17 +0100)]
Modernize simcall cond_wait_timeout.

3 years agoCosmetics: use a meaningful name for parameter.
Arnaud Giersch [Tue, 16 Mar 2021 13:49:22 +0000 (14:49 +0100)]
Cosmetics: use a meaningful name for parameter.

3 years agoInitialize CPU model for VMs in init_HL13
Bruno Donassolo [Tue, 16 Mar 2021 15:50:33 +0000 (16:50 +0100)]
Initialize CPU model for VMs in init_HL13

cpu_vm model is used by virtual machines only, create it when
initializing the VM model

3 years agoA blocking simcall does not make sense in kernel mode.
Arnaud Giersch [Mon, 15 Mar 2021 22:15:23 +0000 (23:15 +0100)]
A blocking simcall does not make sense in kernel mode.

3 years agoCosmetics: single "TODO" for less sonar smell.
Arnaud Giersch [Mon, 15 Mar 2021 22:15:07 +0000 (23:15 +0100)]
Cosmetics: single "TODO" for less sonar smell.

3 years agoMake ConditionVariable::~ConditionVariable() private.
Arnaud Giersch [Mon, 15 Mar 2021 22:10:45 +0000 (23:10 +0100)]
Make ConditionVariable::~ConditionVariable() private.

This is a followup to commit 222e031aa69b85a660b37e558115375d44ec3f68
"Use ConditionVariable::create() for sg_cond_init()."

3 years agoMake Semaphore::~Sepmaphore() private.
Arnaud Giersch [Mon, 15 Mar 2021 22:04:41 +0000 (23:04 +0100)]
Make Semaphore::~Sepmaphore() private.

This is a followup to commit 993a22f9b7f34d3a536bfe6a49a31405461dea5d
"Add SemaphoreImpl::piface_ (mimic MutexImpl)."

3 years agoMake Mutex::~Mutex() private.
Arnaud Giersch [Mon, 15 Mar 2021 21:56:55 +0000 (22:56 +0100)]
Make Mutex::~Mutex() private.

This is a followup to commit f4e9eed9a710cd589a2ab070348121e9c4c3a861
"Use Mutex::create() for sg_mutex_init()."

3 years agoobviously, this failed for freebsd 13
Augustin Degomme [Mon, 15 Mar 2021 16:30:48 +0000 (17:30 +0100)]
obviously, this failed for freebsd 13

3 years agomanifest update
Augustin Degomme [Mon, 15 Mar 2021 14:38:49 +0000 (15:38 +0100)]
manifest update

3 years agoTeshsuite SMPI : execute from build dir.
Augustin Degomme [Mon, 15 Mar 2021 14:38:20 +0000 (15:38 +0100)]
Teshsuite SMPI : execute from build dir.
Ensure that smpi tests from teshsuite are executed from the build folder and not the source folder, to avoid generating temporary files in source folders which may then stay (test interrupted, crash, wrapper used).

3 years agoexclude intentionally leaking test from asan and valgrind leak checkers
Augustin Degomme [Mon, 15 Mar 2021 09:01:21 +0000 (10:01 +0100)]
exclude intentionally leaking test from asan and valgrind leak checkers

3 years agotry to match types correctly this time
Augustin Degomme [Sun, 14 Mar 2021 23:15:51 +0000 (00:15 +0100)]
try to match types correctly this time

3 years agothat was supposed to be removed now, thanks ubuntu-32 ! You see you are so useful !
Augustin Degomme [Sun, 14 Mar 2021 23:00:13 +0000 (00:00 +0100)]
that was supposed to be removed now, thanks ubuntu-32 ! You see you are so useful !

3 years agoadd a test with an intentional leak for previous feature.
Augustin Degomme [Sun, 14 Mar 2021 22:37:51 +0000 (23:37 +0100)]
add a test with an intentional leak for previous feature.
Will probably need to be added to suppressions.. but that will wait tomorrow

3 years agoAdd a small allocations counter in SMPI.
Augustin Degomme [Sun, 14 Mar 2021 22:22:20 +0000 (23:22 +0100)]
Add a small allocations counter in SMPI.
With smpi/display-analysis, it can display the total memory allocated by malloc/calloc calls intecepted by SMPI.
It outputs at the end of the simulation the largest one, its address, and the number of times it was called, and hints to use sharing options on it.
To avoid too many globals, and singletons, I used the namespace smpi::utils to regroup all of these analysis tools. Please tell if this is awful C++ :p

3 years agodowngrade message to info level, it's usually not a big issue to have some handles...
Augustin Degomme [Wed, 10 Mar 2021 10:11:46 +0000 (11:11 +0100)]
downgrade message to info level, it's usually not a big issue to have some handles leaking at the end of execution...

3 years agoBogus default value for parameter.
Arnaud Giersch [Sun, 14 Mar 2021 19:30:40 +0000 (20:30 +0100)]
Bogus default value for parameter.

It should rather be defined at declaration to be useful.

3 years agoPointer-to-const for sonar.
Arnaud Giersch [Sun, 14 Mar 2021 15:42:33 +0000 (16:42 +0100)]
Pointer-to-const for sonar.

3 years agoReplace magic number 8.
Arnaud Giersch [Sun, 14 Mar 2021 14:00:08 +0000 (15:00 +0100)]
Replace magic number 8.

3 years agoGosh I hate the formating strings when size_t comes to play
Martin Quinson [Sun, 14 Mar 2021 20:26:09 +0000 (21:26 +0100)]
Gosh I hate the formating strings when size_t comes to play

3 years agoMC gets the addresses of variables it needs from the network (not dwarf)
Martin Quinson [Sun, 14 Mar 2021 18:23:10 +0000 (19:23 +0100)]
MC gets the addresses of variables it needs from the network (not dwarf)

This way, Dwarf info are only loaded when they are really needed (ie,
when state equality is used or for liveness properties).

Running all MC tests goes from about 70 seconds down to 10 seconds
(there is a liveness test that lasts 10 seconds). The MC tests that do
not need dwarf go from 6 or 8 seconds down to half a second.

I'm not 100% sure, but this commit may introduce a race condition when
SMPI is used with dlopen privatization. The binary is sometimes
removed from disk too early for MC to pick the dwarf informations it
needs. I saw it some times while implementing it and now it seems to
be gone although I did not explicitely fix it. This seem to be tested
by mc-umpire-comm-dup-no-free2 so I'm not sure.

3 years agoRemoteProcess: cache the addresses of maxpid, actors and dead_actors
Martin Quinson [Sun, 14 Mar 2021 15:59:21 +0000 (16:59 +0100)]
RemoteProcess: cache the addresses of maxpid, actors and dead_actors

Soon these addresses will be given by the App through the network
instead of retriving them with Dwarf.

3 years agoMove the logic retrieving the actor info in the App to RemoteProcess
Martin Quinson [Sun, 14 Mar 2021 15:15:15 +0000 (16:15 +0100)]
Move the logic retrieving the actor info in the App to RemoteProcess

3 years agoMove the logic of Api::get_maxpid() to RemoteProcess where it belongs
Martin Quinson [Sun, 14 Mar 2021 14:35:23 +0000 (15:35 +0100)]
Move the logic of Api::get_maxpid() to RemoteProcess where it belongs

3 years agoMC: lazily load the dwarf information
Martin Quinson [Sun, 14 Mar 2021 14:09:13 +0000 (15:09 +0100)]
MC: lazily load the dwarf information

3 years agoattempt to fix en issue when timing functions are called before initialization
Augustin Degomme [Sun, 14 Mar 2021 19:54:27 +0000 (20:54 +0100)]
attempt to fix en issue when timing functions are called before initialization

3 years agoGive an explicit name to the session singleton
Martin Quinson [Sun, 14 Mar 2021 02:14:35 +0000 (03:14 +0100)]
Give an explicit name to the session singleton

3 years agoRemove more uses of the session global
Martin Quinson [Sun, 14 Mar 2021 02:04:23 +0000 (03:04 +0100)]
Remove more uses of the session global

3 years agocosmetics
Martin Quinson [Sun, 14 Mar 2021 01:58:15 +0000 (02:58 +0100)]
cosmetics

3 years agoThe checker has the session and don't need the API to interact with it
Martin Quinson [Sun, 14 Mar 2021 01:48:59 +0000 (02:48 +0100)]
The checker has the session and don't need the API to interact with it

3 years agoInline a function
Martin Quinson [Sun, 14 Mar 2021 01:33:01 +0000 (02:33 +0100)]
Inline a function

3 years agoDont pass as a parameter something that is already known as a field of the receiver...
Martin Quinson [Sun, 14 Mar 2021 01:20:02 +0000 (02:20 +0100)]
Dont pass as a parameter something that is already known as a field of the receiver class :)

3 years agoKill a file that was almost empty
Martin Quinson [Sun, 14 Mar 2021 01:11:18 +0000 (02:11 +0100)]
Kill a file that was almost empty

3 years agoKill some use of the mc_model_checker global variable
Martin Quinson [Sun, 14 Mar 2021 00:37:42 +0000 (01:37 +0100)]
Kill some use of the mc_model_checker global variable

3 years agoThe checker now have a reference to the session
Martin Quinson [Sun, 14 Mar 2021 00:25:09 +0000 (01:25 +0100)]
The checker now have a reference to the session

3 years agoA checker don't need the mc::api to find itself
Martin Quinson [Sun, 14 Mar 2021 00:08:42 +0000 (01:08 +0100)]
A checker don't need the mc::api to find itself

3 years agoRename model_checker->get_remote_simulation() into model_checker->get_remote_process()
Martin Quinson [Sun, 14 Mar 2021 00:00:05 +0000 (01:00 +0100)]
Rename model_checker->get_remote_simulation() into model_checker->get_remote_process()

3 years agoMC: cosmetics
Martin Quinson [Sat, 13 Mar 2021 23:50:31 +0000 (00:50 +0100)]
MC: cosmetics

3 years agoRename mc::RemoteSimulation into mc::RemoteProcess
Martin Quinson [Sat, 13 Mar 2021 23:19:04 +0000 (00:19 +0100)]
Rename mc::RemoteSimulation into mc::RemoteProcess

3 years agoMC: simplify initialization and kill api::set_checker()
Martin Quinson [Sat, 13 Mar 2021 23:08:09 +0000 (00:08 +0100)]
MC: simplify initialization and kill api::set_checker()

3 years agoMerge branch 'master' of framagit.org:simgrid/simgrid
Martin Quinson [Sat, 13 Mar 2021 22:17:28 +0000 (23:17 +0100)]
Merge branch 'master' of framagit.org:simgrid/simgrid

3 years agogetraw is only useful when dealing with boost intrusive pointers
Martin Quinson [Sat, 13 Mar 2021 21:28:06 +0000 (22:28 +0100)]
getraw is only useful when dealing with boost intrusive pointers

3 years agoDuplicate cleanup instructions for jenkins builds in other scripts.
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Duplicate cleanup instructions for jenkins builds in other scripts.

Useful e.g. for cleaning /tmp on node debian-testing.

3 years agoAdd parameter timeout to mc::ConditionWaitSimcall and mc::SemAcquireSimcall.
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Add parameter timeout to mc::ConditionWaitSimcall and mc::SemAcquireSimcall.

Prepare the modernization of simcalls cond_wait_timeout and sem_acquire_timeout.

3 years agoModernize simcall cond_wait.
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Modernize simcall cond_wait.

3 years agoModernize simcall sem_acquire.
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Modernize simcall sem_acquire.

3 years agoConst attributes in SimcallObserver.
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Const attributes in SimcallObserver.

3 years agoUse ConditionVariable::create() for sg_cond_init().
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Use ConditionVariable::create() for sg_cond_init().

3 years agoRename ConditionVariable::cond_ to pimpl_ for consistency.
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Rename ConditionVariable::cond_ to pimpl_ for consistency.

3 years agoAdd SemaphoreImpl::piface_ (mimic MutexImpl).
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Add SemaphoreImpl::piface_ (mimic MutexImpl).

Also make constructor private to enforce usage of create(), and fix bogus destructor.

Like for Mutex, could not manage to make ~Semaphore() private.

3 years agoPrefer type bool for boolean values.
Arnaud Giersch [Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)]
Prefer type bool for boolean values.