Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
2 years ago[SMPI] Replay: C++-ify compute action
Christian Heinrich [Mon, 26 Mar 2018 16:53:00 +0000 (18:53 +0200)]
[SMPI] Replay: C++-ify compute action

2 years ago[SMPI] Replay: Use std::function for i/send, i/recv actions
Christian Heinrich [Mon, 26 Mar 2018 16:47:43 +0000 (18:47 +0200)]
[SMPI] Replay: Use std::function for i/send, i/recv actions

2 years ago[SMPI] Replay: Use std::bind / std::function for the wait action
Christian Heinrich [Mon, 26 Mar 2018 15:33:31 +0000 (17:33 +0200)]
[SMPI] Replay: Use std::bind / std::function for the wait action

2 years ago[SMPI] Replay: Move callbacks to std::function
Christian Heinrich [Mon, 26 Mar 2018 14:31:17 +0000 (16:31 +0200)]
[SMPI] Replay: Move callbacks to std::function

2 years ago[SMPI] Replay: C++-ify (I)Recv, (I)Send
Christian Heinrich [Mon, 26 Mar 2018 13:40:14 +0000 (15:40 +0200)]
[SMPI] Replay: C++-ify (I)Recv, (I)Send

2 years ago[SMPI] Replay: Classify the actions, start with Wait
Christian Heinrich [Mon, 26 Mar 2018 13:37:09 +0000 (15:37 +0200)]
[SMPI] Replay: Classify the actions, start with Wait

2 years ago[SMPI] Cosmetics: Remove 3 blank lines from smpi_global.cpp
Christian Heinrich [Wed, 21 Mar 2018 16:17:51 +0000 (17:17 +0100)]
[SMPI] Cosmetics: Remove 3 blank lines from smpi_global.cpp

2 years ago[SMPI] Deployment: Move function signatures to std::string
Christian Heinrich [Wed, 21 Mar 2018 15:50:36 +0000 (16:50 +0100)]
[SMPI] Deployment: Move function signatures to std::string

Except for the SMPI_app_instance_register, as it is part of the (C-)API.

2 years ago[SMPI] Remove all references to decode_datatype
Christian Heinrich [Wed, 21 Mar 2018 15:07:12 +0000 (16:07 +0100)]
[SMPI] Remove all references to decode_datatype

This is now calling simgrid::smpi::Datatype::decode(std::string) (I moved
the argument from char* to std::string)

sed -i -r -e 's@decode_datatype\((.*?)\)@simgrid::smpi::Datatype::decode(\1)@' src/smpi/internals/smpi_replay.cpp

2 years ago[SMPI] Datatype: Remove all encode_datatype calls
Christian Heinrich [Wed, 21 Mar 2018 14:53:05 +0000 (15:53 +0100)]
[SMPI] Datatype: Remove all encode_datatype calls

We now use simgrid::smpi::Datatype(dt) instead.

sed -i -r -e 's@encode_datatype\((\w+)\)@simgrid::smpi::Datatype::encode(\1)@' src/smpi/**/*.cpp

2 years ago[SMPI] Datatype: Make encode() a static member
Christian Heinrich [Wed, 21 Mar 2018 14:50:17 +0000 (15:50 +0100)]
[SMPI] Datatype: Make encode() a static member

MPI_DATATYPE_NULL may be passed to the encode function and we hence
need to check if the argument is null; if we just call
dt->encode(), we would always have to check before that call if dt is nullptr
This way, we just call Datatype::encode(dt)

2 years ago[SMPI] Remove class definition...
Christian Heinrich [Wed, 21 Mar 2018 13:38:40 +0000 (14:38 +0100)]
[SMPI] Remove class definition...

2 years ago[SMPI] Replay: Macro cosmetics
Christian Heinrich [Tue, 20 Mar 2018 21:07:18 +0000 (22:07 +0100)]
[SMPI] Replay: Macro cosmetics

2 years ago[REPLAY] Remove C-based Replay API
Christian Heinrich [Tue, 20 Mar 2018 16:31:30 +0000 (17:31 +0100)]
[REPLAY] Remove C-based Replay API

This is a huge commit, unfortunately, but it was not possible
to split it up easily without breaking the build.

This commit changes:

- Remove the 'const char* const* action' madness, replace by
  std::vector<string> (aliased as ReplayAction)
- Rename replay.c to replay.cpp
- Change CMake files
- Rewrite several macros to make them C++ compliant

2 years ago[SMPI] Replay: Move CHECK_ACTION_PARAMS macro to the top of the file
Christian Heinrich [Tue, 20 Mar 2018 13:26:27 +0000 (14:26 +0100)]
[SMPI] Replay: Move CHECK_ACTION_PARAMS macro to the top of the file

2 years ago[MSG/Replay] Delete old msg/replay code
Christian Heinrich [Tue, 20 Mar 2018 09:48:36 +0000 (10:48 +0100)]
[MSG/Replay] Delete old msg/replay code

2 years ago[XBT] Remove a new/delete pair from xbt-replay code
Christian Heinrich [Mon, 19 Mar 2018 18:18:48 +0000 (19:18 +0100)]
[XBT] Remove a new/delete pair from xbt-replay code

2 years ago[SMPI] Replay/Memory: Move tmp buffers from replay to memory
Christian Heinrich [Mon, 19 Mar 2018 16:34:57 +0000 (17:34 +0100)]
[SMPI] Replay/Memory: Move tmp buffers from replay to memory

This is not the best solution, especially since we need a new function
right now to free tmp buffers at the end of the replay. However, this
may make the replay a bit cleaner and we can find another solution during
this refactoring process.

2 years ago[SMPI] Replay: Use the right buffer (c&p error?)
Christian Heinrich [Mon, 19 Mar 2018 16:30:24 +0000 (17:30 +0100)]
[SMPI] Replay: Use the right buffer (c&p error?)

2 years ago[SMPI] Replay: Replace atoi by std::stoi
Christian Heinrich [Mon, 19 Mar 2018 13:47:25 +0000 (14:47 +0100)]
[SMPI] Replay: Replace atoi by std::stoi

2 years ago[SMPI] Replay/Allgatherv: Account for disps parameters in a replay trace
Christian Heinrich [Mon, 19 Mar 2018 13:30:24 +0000 (14:30 +0100)]
[SMPI] Replay/Allgatherv: Account for disps parameters in a replay trace

2 years ago[SMPI] Replace encode_datatype calls with dt->encode()
Christian Heinrich [Mon, 19 Mar 2018 13:29:27 +0000 (14:29 +0100)]
[SMPI] Replace encode_datatype calls with dt->encode()

2 years ago[SMPI] Datatypes: Make them all replayable
Christian Heinrich [Mon, 19 Mar 2018 13:24:10 +0000 (14:24 +0100)]
[SMPI] Datatypes: Make them all replayable

This commit assigns a unique id to all MPI_* datatypes.
This id is used for 'encoding' the datatype (for traces).

2 years ago[SMPI] Added comment regard Datatype::keyvals
Christian Heinrich [Thu, 15 Mar 2018 10:19:52 +0000 (11:19 +0100)]
[SMPI] Added comment regard Datatype::keyvals

2 years ago[SMPI] Replay: C++ify action_allgatherv
Christian Heinrich [Tue, 13 Mar 2018 22:23:07 +0000 (23:23 +0100)]
[SMPI] Replay: C++ify action_allgatherv

- Move to std::shared_ptr
- Use std::accumulate

2 years ago[SMPI] Replay: Move MPI_CURRENT_TYPE from global to local scope
Christian Heinrich [Tue, 13 Mar 2018 22:05:27 +0000 (23:05 +0100)]
[SMPI] Replay: Move MPI_CURRENT_TYPE from global to local scope

2 years ago[SMPI] Replay: C++ify action_gatherv
Christian Heinrich [Tue, 13 Mar 2018 17:51:02 +0000 (18:51 +0100)]
[SMPI] Replay: C++ify action_gatherv

- Move to std::shared_ptr
- Use std::accumulate

2 years ago[SMPI] Replay: C++ify action_scatterv
Christian Heinrich [Tue, 13 Mar 2018 17:47:02 +0000 (18:47 +0100)]
[SMPI] Replay: C++ify action_scatterv

- Move to std::shared_ptr
- Use std::accumulate

2 years ago[SMPI] Replay: Move action_reducescatter to std::shared_ptr
Christian Heinrich [Tue, 13 Mar 2018 17:42:51 +0000 (18:42 +0100)]
[SMPI] Replay: Move action_reducescatter to std::shared_ptr

2 years ago[SMPI] Replay: C++ify action_allToAllv
Christian Heinrich [Tue, 13 Mar 2018 17:40:31 +0000 (18:40 +0100)]
[SMPI] Replay: C++ify action_allToAllv

- Move to std::shared_ptr
- Use std::accumulate

2 years ago[INSTR] Move vector* to shared_ptr<vector>.
Christian Heinrich [Tue, 13 Mar 2018 17:19:21 +0000 (18:19 +0100)]
[INSTR] Move vector* to shared_ptr<vector>.

By initializing an object, for instance of type VarCollTIData,
the vectors containing receive and send counts were deleted
when the TI object was deleted. This is unexpected by a 'normal'
user - by accepting shared_ptrs, this can be ameliorated.

The constructor that still accepts vector* should be removed once
all initializations use the constructor accepting the shared_ptr.

2 years ago[SMPI] Move disps arrays to vectors
Christian Heinrich [Tue, 13 Mar 2018 14:04:02 +0000 (15:04 +0100)]
[SMPI] Move disps arrays to vectors

We now initialize the array immediately and just use disps.data()
to access the internal data array.

2 years ago[SMPI] Replay: Remove local variables from action_reducescatter
Christian Heinrich [Tue, 13 Mar 2018 13:59:20 +0000 (14:59 +0100)]
[SMPI] Replay: Remove local variables from action_reducescatter

2 years ago[SMPI] Replay: Remove unnecessary initialization
Christian Heinrich [Tue, 13 Mar 2018 13:19:38 +0000 (14:19 +0100)]
[SMPI] Replay: Remove unnecessary initialization

2 years ago[SMPI] Replay: Remove side effect from decode_datatype
Christian Heinrich [Tue, 13 Mar 2018 13:18:34 +0000 (14:18 +0100)]
[SMPI] Replay: Remove side effect from decode_datatype

The MPI_CURRENT_TYPE variable shouldn't be modified here.

2 years ago[SMPI] Replay: Remove unused KEY_SIZE macro from .cpp
Christian Heinrich [Tue, 13 Mar 2018 13:17:02 +0000 (14:17 +0100)]
[SMPI] Replay: Remove unused KEY_SIZE macro from .cpp

2 years ago[SMPI] Replay: Declare variables as static
Christian Heinrich [Tue, 13 Mar 2018 13:15:47 +0000 (14:15 +0100)]
[SMPI] Replay: Declare variables as static

2 years ago[TESTS] Fix smpi replay test for allgatherv
Christian Heinrich [Tue, 13 Mar 2018 13:12:29 +0000 (14:12 +0100)]
[TESTS] Fix smpi replay test for allgatherv

The trace contains data for 4 hosts, although -np 3 was specified.
This lead to smpi incorrectly reading the specified datatype, as the data
for the 4th host was taken as said datatype.

2 years ago[SMPI] Replay: Use std::vector copy-constr. instead of loop
Christian Heinrich [Mon, 12 Mar 2018 19:11:50 +0000 (20:11 +0100)]
[SMPI] Replay: Use std::vector copy-constr. instead of loop

2 years ago[SMPI] Clean initialization of MPI_CURRENT_TYPE and root
Christian Heinrich [Mon, 12 Mar 2018 16:05:52 +0000 (17:05 +0100)]
[SMPI] Clean initialization of MPI_CURRENT_TYPE and root

2 years agoRemove extern "C" from cpp files (src/smpi/).
Arnaud Giersch [Wed, 28 Mar 2018 15:04:53 +0000 (17:04 +0200)]
Remove extern "C" from cpp files (src/smpi/).

2 years agoRemove useless extern "C" from msg_private.hpp.
Arnaud Giersch [Wed, 28 Mar 2018 14:52:02 +0000 (16:52 +0200)]
Remove useless extern "C" from msg_private.hpp.

2 years agoRemove extern "C" from cpp files (src/bindings/).
Arnaud Giersch [Wed, 28 Mar 2018 14:49:59 +0000 (16:49 +0200)]
Remove extern "C" from cpp files (src/bindings/).

2 years agoRemove extern "C" from cpp files.
Arnaud Giersch [Wed, 28 Mar 2018 14:32:20 +0000 (16:32 +0200)]
Remove extern "C" from cpp files.

Specifying extern "C" at declaration in header files should be sufficient.

2 years agoCall atexit() from xbt_cfg_new().
Arnaud Giersch [Wed, 28 Mar 2018 13:56:59 +0000 (15:56 +0200)]
Call atexit() from xbt_cfg_new().

2 years agoRename sg_config.h -> sg_config.hpp.
Arnaud Giersch [Wed, 28 Mar 2018 13:53:45 +0000 (15:53 +0200)]
Rename sg_config.h -> sg_config.hpp.

2 years agoFunction has been renamed.
Arnaud Giersch [Wed, 28 Mar 2018 13:40:34 +0000 (15:40 +0200)]
Function has been renamed.

2 years agoReturn value is useless (always 1).
Arnaud Giersch [Wed, 28 Mar 2018 12:07:56 +0000 (14:07 +0200)]
Return value is useless (always 1).

2 years agoUse <stdbool.h> for C files.
Arnaud Giersch [Wed, 28 Mar 2018 12:00:54 +0000 (14:00 +0200)]
Use <stdbool.h> for C files.

2 years agoUse C++'s true/false.
Arnaud Giersch [Wed, 28 Mar 2018 09:48:58 +0000 (11:48 +0200)]
Use C++'s true/false.

2 years agoPlease mingw.
Arnaud Giersch [Wed, 28 Mar 2018 09:28:28 +0000 (11:28 +0200)]
Please mingw.

2 years agoRemove useless intermediate variables.
Arnaud Giersch [Wed, 28 Mar 2018 09:03:10 +0000 (11:03 +0200)]
Remove useless intermediate variables.

2 years agoMake func_f/fp/fpi static methods of lmm::Lagrange.
Arnaud Giersch [Wed, 28 Mar 2018 08:53:57 +0000 (10:53 +0200)]
Make func_f/fp/fpi static methods of lmm::Lagrange.

2 years agoUsing namespace simgrid::kernel.
Arnaud Giersch [Wed, 28 Mar 2018 08:50:12 +0000 (10:50 +0200)]
Using namespace simgrid::kernel.

2 years agoMake static functions in lagrange.cpp static methods of lmm::Lagrange.
Arnaud Giersch [Wed, 28 Mar 2018 08:34:56 +0000 (10:34 +0200)]
Make static functions in lagrange.cpp static methods of lmm::Lagrange.

2 years agoMake check_feasible() and dual_objective() private methods of lmm::Lagrange.
Arnaud Giersch [Wed, 28 Mar 2018 08:09:40 +0000 (10:09 +0200)]
Make check_feasible() and dual_objective() private methods of lmm::Lagrange.

2 years agoKill spurious #ifdef MATH.
Arnaud Giersch [Wed, 28 Mar 2018 07:33:05 +0000 (09:33 +0200)]
Kill spurious #ifdef MATH.

2 years agoUse constexpr instead of #defin.
Arnaud Giersch [Wed, 28 Mar 2018 07:31:11 +0000 (09:31 +0200)]
Use constexpr instead of #defin.

2 years agoBe explicit on overridable method.
Arnaud Giersch [Tue, 27 Mar 2018 21:09:03 +0000 (23:09 +0200)]
Be explicit on overridable method.

2 years agoGive correct function for func_fp().
Arnaud Giersch [Tue, 27 Mar 2018 20:57:55 +0000 (22:57 +0200)]
Give correct function for func_fp().

2 years agoKill unused macros.
Arnaud Giersch [Tue, 27 Mar 2018 20:30:42 +0000 (22:30 +0200)]
Kill unused macros.

2 years agoMerge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
Martin Quinson [Tue, 27 Mar 2018 19:50:05 +0000 (21:50 +0200)]
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid

2 years agoDefine FairBottleneck and Lagrange as subclasses of lmm::System.
Arnaud Giersch [Tue, 27 Mar 2018 14:16:22 +0000 (16:16 +0200)]
Define FairBottleneck and Lagrange as subclasses of lmm::System.

2 years agoMake maxmin_system_ a private field for resource::Model.
Arnaud Giersch [Tue, 27 Mar 2018 09:03:24 +0000 (11:03 +0200)]
Make maxmin_system_ a private field for resource::Model.

2 years agoKill unused field.
Arnaud Giersch [Tue, 27 Mar 2018 13:20:27 +0000 (15:20 +0200)]
Kill unused field.

2 years agoMove assert befort assignment.
Arnaud Giersch [Tue, 27 Mar 2018 09:58:50 +0000 (11:58 +0200)]
Move assert befort assignment.

2 years agoFix parameter description.
Arnaud Giersch [Tue, 27 Mar 2018 09:53:20 +0000 (11:53 +0200)]
Fix parameter description.

2 years agoenum class for Model::UpdateAlgo
Martin Quinson [Tue, 27 Mar 2018 11:54:46 +0000 (13:54 +0200)]
enum class for Model::UpdateAlgo

2 years agoMerge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
Frederic Suter [Tue, 27 Mar 2018 07:18:47 +0000 (09:18 +0200)]
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid

2 years agoexternal projects may refcount Mailboxes too
Frederic Suter [Tue, 27 Mar 2018 07:18:15 +0000 (09:18 +0200)]
external projects may refcount Mailboxes too

2 years agostart snake_casing resource::Model
Martin Quinson [Tue, 27 Mar 2018 06:38:39 +0000 (08:38 +0200)]
start snake_casing resource::Model

2 years agoMerge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
Frederic Suter [Tue, 27 Mar 2018 06:14:24 +0000 (08:14 +0200)]
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid

2 years agothese functions always take exactly the same parameter, thus inlining it
Martin Quinson [Mon, 26 Mar 2018 18:53:19 +0000 (20:53 +0200)]
these functions always take exactly the same parameter, thus inlining it

2 years agoWe are in UM=Lazy, that was tested 2 lines above
Martin Quinson [Mon, 26 Mar 2018 17:14:02 +0000 (19:14 +0200)]
We are in UM=Lazy, that was tested 2 lines above

2 years agofurther snake_casing in resource::Action
Martin Quinson [Mon, 26 Mar 2018 16:59:02 +0000 (18:59 +0200)]
further snake_casing in resource::Action

I think that's the third time I'm sure I'm done with this file.
This gonna be a long one refactoring :(

2 years agoAction::is_suspended() does not need to be virtual (+ more snake_casing)
Martin Quinson [Mon, 26 Mar 2018 16:49:05 +0000 (18:49 +0200)]
Action::is_suspended() does not need to be virtual (+ more snake_casing)

2 years agocosmetics
Frederic Suter [Mon, 26 Mar 2018 11:48:01 +0000 (13:48 +0200)]
cosmetics

2 years agouse enum class
Frederic Suter [Mon, 26 Mar 2018 10:49:36 +0000 (12:49 +0200)]
use enum class

2 years agofinish(done) already sets remains to 0
Martin Quinson [Mon, 26 Mar 2018 07:38:22 +0000 (09:38 +0200)]
finish(done) already sets remains to 0

2 years agosnake_case another method
Martin Quinson [Mon, 26 Mar 2018 06:57:28 +0000 (08:57 +0200)]
snake_case another method

2 years agoprefer readable syntax instead of inlining functions
Martin Quinson [Sun, 25 Mar 2018 20:49:22 +0000 (22:49 +0200)]
prefer readable syntax instead of inlining functions

2 years agocleanup Action refcounting
Martin Quinson [Sun, 25 Mar 2018 20:41:11 +0000 (22:41 +0200)]
cleanup Action refcounting

Previously, subclasses did override unref() to do some cleanups on
destruction. This required to have refcount_ protected for them to
mess with it.

Instead, the cleanups go to the various destructors, where they
belong. The refcounting can be made private to Action as it should.

2 years agofinish snake_casing resource::Action
Martin Quinson [Sun, 25 Mar 2018 19:49:37 +0000 (21:49 +0200)]
finish snake_casing resource::Action

2 years agofix MC builds
Martin Quinson [Sun, 25 Mar 2018 17:54:50 +0000 (19:54 +0200)]
fix MC builds

2 years agosnake_case some resource::Action fields and cleanups
Martin Quinson [Sun, 25 Mar 2018 16:49:37 +0000 (18:49 +0200)]
snake_case some resource::Action fields and cleanups

- Rename the hooks and associated typedefs for the intrusive lists
  Action::ModifiedSet (used by lazy lmm) and Action::StateSet
  (grouping all actions in the same state)
- Start snake_case()ing the public interface of simix::kernel::resource.
  It's public, but since really short, and since some methods are
  virtual and overriden, deprecating them properly will be really
  hard. I think it's useless since nobody (but me) uses it in external
  projects yet.
- Remove some extraneous namespace specifications (we are already in
  simgrid::kernel)

2 years agokill an unused function
Martin Quinson [Sun, 25 Mar 2018 15:59:38 +0000 (17:59 +0200)]
kill an unused function

The prototype was s::k::actor::set_maestro while its declaration was
simgrid::simix::set_maestro (since one commit), proving that it's not
used.

The used function is SIMIX_set_maestro(), which should be converted
to C++ for sure, but I'm not sure yet of how to do it properly.

2 years agomove simix::ActorImpl to kernel::actor::ActorImpl
Martin Quinson [Sun, 25 Mar 2018 15:36:02 +0000 (17:36 +0200)]
move simix::ActorImpl to kernel::actor::ActorImpl

2 years agodeprecate an old pimple
Martin Quinson [Sun, 25 Mar 2018 14:05:17 +0000 (16:05 +0200)]
deprecate an old pimple

2 years agokill typedef lmm_element_t
Martin Quinson [Sun, 25 Mar 2018 13:07:26 +0000 (15:07 +0200)]
kill typedef lmm_element_t

2 years agoKill typedef lmm_system_t
Martin Quinson [Sat, 24 Mar 2018 20:35:42 +0000 (21:35 +0100)]
Kill typedef lmm_system_t

2 years agomore snake_casing of private fields
Martin Quinson [Sat, 24 Mar 2018 20:11:13 +0000 (21:11 +0100)]
more snake_casing of private fields

2 years agodocument a proposal of coding standard. Please comment
Martin Quinson [Sat, 24 Mar 2018 17:53:48 +0000 (18:53 +0100)]
document a proposal of coding standard. Please comment

2 years agostart snake_case()ing some private fields
Martin Quinson [Sat, 24 Mar 2018 17:28:31 +0000 (18:28 +0100)]
start snake_case()ing some private fields

2 years agomore specific comments
Martin Quinson [Sat, 24 Mar 2018 10:11:41 +0000 (11:11 +0100)]
more specific comments

2 years agoMove modifiedSet from Resource to lmm::System
Martin Quinson [Sat, 24 Mar 2018 10:00:05 +0000 (11:00 +0100)]
Move modifiedSet from Resource to lmm::System

2 years agocosmetics: init fields at declaration, emptying the ctor
Martin Quinson [Sat, 24 Mar 2018 09:36:54 +0000 (10:36 +0100)]
cosmetics: init fields at declaration, emptying the ctor

2 years agoReplace a protected field with a private variable in the child' constructor
Martin Quinson [Sat, 24 Mar 2018 09:17:36 +0000 (10:17 +0100)]
Replace a protected field with a private variable in the child' constructor

2 years agoSMPI: only warn once on unimplemented calls
Martin Quinson [Fri, 23 Mar 2018 21:53:28 +0000 (22:53 +0100)]
SMPI: only warn once on unimplemented calls

2 years agoproperly guard the installation of smpi.mod to systems with a proper Fortran install
Martin Quinson [Fri, 23 Mar 2018 21:26:30 +0000 (22:26 +0100)]
properly guard the installation of smpi.mod to systems with a proper Fortran install

2 years agotiny doc improvement [noci]
Martin Quinson [Fri, 23 Mar 2018 10:09:06 +0000 (11:09 +0100)]
tiny doc improvement [noci]