Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
authorhenricasanova <henric@hawaii.edu>
Wed, 3 Apr 2019 19:26:48 +0000 (09:26 -1000)
committerhenricasanova <henric@hawaii.edu>
Wed, 3 Apr 2019 19:26:48 +0000 (09:26 -1000)
31 files changed:
.gitlab-ci.yml
CMakeLists.txt
doc/doxygen/inside_release.doc
include/simgrid/simix.h
include/smpi/mpif.h.in
src/kernel/activity/ActivityImpl.cpp
src/kernel/activity/ActivityImpl.hpp
src/kernel/activity/CommImpl.cpp
src/kernel/activity/CommImpl.hpp
src/kernel/activity/ExecImpl.cpp
src/kernel/activity/SleepImpl.cpp
src/kernel/actor/ActorImpl.cpp
src/kernel/actor/ActorImpl.hpp
src/simix/libsmx.cpp
src/simix/popping_accessors.hpp
src/simix/popping_bodies.cpp
src/simix/simcalls.in
src/simix/simcalls.py
src/smpi/bindings/smpi_f77.cpp
src/smpi/bindings/smpi_f77_coll.cpp
src/smpi/bindings/smpi_pmpi_win.cpp
src/smpi/colls/smpi_default_selector.cpp
src/smpi/include/private.hpp
teshsuite/smpi/mpich3-test/f77/coll/nonblockingf.f
teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/rma/attraints.h
teshsuite/smpi/mpich3-test/f77/rma/testlist
teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/rma/testlist
tools/cmake/Option.cmake
tools/docker/Dockerfile.build-deps

index 6f054f5..57f9c06 100644 (file)
@@ -18,3 +18,26 @@ ctest:
   script:
   - cmake -Denable_model-checking=OFF -Denable_documentation=OFF -Denable_coverage=ON -Denable_java=ON -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON .
   - make VERBOSE=1 all tests && ctest --output-on-failure
+
+release:
+  only:
+  - releases
+  script:
+  - apt update && apt install -y binutils-x86-64-linux-gnu wget unzip zip
+  # Build the linux version of the jarfile without the boost dependency
+  - cmake -Denable_documentation=OFF -Denable_java=ON -Denable_lib_in_jar=ON -Dminimal_java=ON -Denable_compile_optimizations=ON -Denable_smpi=OFF .
+  - make VERBOSE=1 dist simgrid simgrid-java_jar
+  # Get the foreign architectures
+  - wget https://ci.appveyor.com/api/projects/mquinson/simgrid/artifacts/simgrid.jar -O simgrid-windows.jar
+  - export SGVER=`(echo '#include "simgrid/config.h"'; echo SIMGRID_VERSION_MAJOR.SIMGRID_VERSION_MINOR.SIMGRID_VERSION_PATCH)|gcc -E - -Iinclude|tail -1|sed 's/ //g'`
+  - wget https://ci.inria.fr/simgrid/job/SimGrid/build_mode=Debug,node=simgrid-osx-highsierra/lastSuccessfulBuild/artifact/build/SimGrid-${SGVER}/build/simgrid.jar -O simgrid-mac.jar
+  # Open all jar files, and strip them
+  - mkdir content ; cd content
+  - for j in  ../simgrid.jar ../simgrid-windows.jar ../simgrid-mac.jar ; do unzip -n $j ; done
+  - strip NATIVE/*/*/*.so
+  - x86_64-linux-gnu-strip NATIVE/*/*/lib*dll
+  - zip -r ../SimGrid-${SGVER}.jar *
+  artifacts:
+    paths:
+    - SimGrid-*.jar
+    - SimGrid-*.tar.gz
index ad1dd5b..0fd26a8 100644 (file)
@@ -254,26 +254,30 @@ endif()
 set(_Boost_STACKTRACE_HEADERS           "boost/stacktrace.hpp")
 set(_Boost_STACKTRACE_BACKTRACE_HEADERS "boost/stacktrace.hpp")
 
-find_package(Boost 1.59 COMPONENTS context stacktrace_backtrace)
-set(Boost_FOUND 1) # These components are optionals
-message(STATUS "Mandatory components found. SimGrid is compilable.")
-message(STATUS "Looking for optional Boost components:")
-
-if (Boost_STACKTRACE_BACKTRACE_FOUND)
-  message (STATUS "  stacktrace: found. Activating human-readable stack traces.")
-  set(HAVE_BOOST_STACKTRACE 1)
-  set(SIMGRID_DEP "${SIMGRID_DEP} -lboost_stacktrace_backtrace")
+if(minimal_java) # When we want a minimal jarfile, don't even search for boost optional components
+  message(STATUS "Don't even look for boost optional components, as we build a minimal jar file")
 else()
-  message (STATUS "  stacktrace: MISSING. Install libboost-stacktrace-dev to display the stacktraces.")
-  set(HAVE_BOOST_STACKTRACE 0)
-endif()
+  find_package(Boost 1.59 COMPONENTS context stacktrace_backtrace)
+  set(Boost_FOUND 1) # These components are optionals
+  message(STATUS "Mandatory components found. SimGrid is compilable.")
+  message(STATUS "Looking for optional Boost components:")
+
+  if (Boost_STACKTRACE_BACKTRACE_FOUND)
+    message (STATUS "  stacktrace: found. Activating human-readable stack traces.")
+    set(HAVE_BOOST_STACKTRACE 1)
+    set(SIMGRID_DEP "${SIMGRID_DEP} -lboost_stacktrace_backtrace")
+  else()
+    message (STATUS "  stacktrace: MISSING. Install libboost-stacktrace-dev to display the stacktraces.")
+    set(HAVE_BOOST_STACKTRACE 0)
+  endif()
 
-if(Boost_CONTEXT_FOUND)
-  message (STATUS "  context: found. Activating Boost contexts.")
-  set(HAVE_BOOST_CONTEXTS 1)
-else()
-  message (STATUS "  context: MISSING. Install libboost-context-dev for this optional feature.")
-  set(HAVE_BOOST_CONTEXTS 0)
+  if(Boost_CONTEXT_FOUND)
+    message (STATUS "  context: found. Activating Boost contexts.")
+    set(HAVE_BOOST_CONTEXTS 1)
+  else()
+    message (STATUS "  context: MISSING. Install libboost-context-dev for this optional feature.")
+    set(HAVE_BOOST_CONTEXTS 0)
+  endif()
 endif()
 
 
@@ -352,12 +356,16 @@ else()
   SET(SIMGRID_HAVE_MALLOCATOR 0)
 endif()
 
-include(FindLibunwind)
-if(HAVE_LIBUNWIND)
-  SET(SIMGRID_DEP "${SIMGRID_DEP} ${LIBUNWIND_LIBRARIES}")
+if (minimal_java)
+  message(STATUS "Don't look for libunwind as we build a minimal jar file.")
 else()
-  if(enable_model-checking)
-    message(FATAL_ERROR "Please install libunwind-dev libdw-dev libelf-dev libevent-dev if you want to compile the SimGrid model checker.")
+  include(FindLibunwind)
+  if(HAVE_LIBUNWIND)
+    SET(SIMGRID_DEP "${SIMGRID_DEP} ${LIBUNWIND_LIBRARIES}")
+  else()
+    if(enable_model-checking)
+      message(FATAL_ERROR "Please install libunwind-dev libdw-dev libelf-dev libevent-dev if you want to compile the SimGrid model checker.")
+    endif()
   endif()
 endif()
 
index 598384c..4874363 100644 (file)
@@ -102,13 +102,13 @@ the settings icon of the release you want to change.
 - Tag the git repository (don't forget to push the tags to the main repo)
 - Push the archive files (tar.gz and jar) on gforge
 - Post a news on gforge (before updating the website)
-- Update the link scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/latest
-  - Create the directory of the released version and upload the doc artefact in it
-  - Remove the older releases so that people don't find them in google
 - Document the tag on https://github.com/simgrid/simgrid/releases and
   on https://framagit.org/simgrid/simgrid/tags
   - Upload the files SimGrid-3.XX.tar.gz, simgrid-3_XX.jar and
-    SimGrid-doc-3_XX.zip files to the changelog.
+    SimGrid-doc-3_XX.zip (that is the artefact of the pages job on framagit) files to the changelog.
+- Update the .gitlab-ci.yml on the website
+  - Download the simgrid-doc from framagit and unpack it in position
+  - Only keep 2 versions so that people don't find older ones in google
 - Rebuild and resynchronize the website so that the file gets visible
   from our download page.@n
   - Edit org/org-templates/level-0.org to change the release version, the tgz link and the jar link.
@@ -147,4 +147,36 @@ the settings icon of the release you want to change.
 - Update the Docker images (after pushing to the git)
   - cd tools/docker && make stable tuto-s4u push
 
+Release numbering semantic: 
+  - 3.X is a named release. 
+    - We have 4 named releases per year (for each equinox and solstice)
+    - The ChangeLog and NEWS are complete and informative
+    - All tests pass on all ci systems (or the workarounds are documented)
+    - We provide and store a source .tar.gz and a full jarfile on framagit
+    - Deprecated symbols remain usable for at least 3 named releases (~1 year)
+    - These releases are announced to the users
+  - 3.X.Y is a dot release of 3.X
+    - We provide and store a source .tar.gz and a full jarfile on framagit
+    - These releases are NOT announced publicly, nor really documented. 
+      The idea is to have something close to a rolling release.
+    - External projects can depend on dot releases to loosen their
+      release process from ours, when 4 release a year is not enough 
+  - 3.X.90 is a git version, a preversion of 3.(X+1) (3.22.90 = pre-3.23)
+    - No expectations on such versions
+    
+Doing a dot release:
+  - Update the version number in:
+      - CMakeLists.txt (in macros SIMGRID_VERSION_*)
+      - sonar-project.properties
+      - docs/source/conf.py
+  - Commit and push to both framagit and github
+  - Wait for both appveyor and jenkins/highsierra to complete the build
+  - If it's not successful, fix it and push again
+  - Once it's successful:
+    - tag the release v3_X_Y and push the tag
+    - Merge 'master' into 'releases' and push it to framagit
+    - Do not merge into 'releases' before appveyor and jenkins are done,
+      or your jarfile will not contain the code you expect for win and
+      mac.
+
 */
index 8034635..99de58b 100644 (file)
@@ -180,7 +180,7 @@ XBT_ATTRIB_DEPRECATED_v325("Please use CommImpl::finish()") XBT_PUBLIC void SIMI
 /******************************* Host simcalls ********************************/
 #ifdef __cplusplus
 XBT_PUBLIC e_smx_state_t simcall_execution_wait(const smx_activity_t& execution);
-XBT_PUBLIC e_smx_state_t simcall_execution_test(const smx_activity_t& execution);
+XBT_PUBLIC bool simcall_execution_test(const smx_activity_t& execution);
 #endif
 
 /**************************** Process simcalls ********************************/
@@ -233,7 +233,7 @@ XBT_PUBLIC unsigned int simcall_comm_waitany(smx_activity_t comms[], size_t coun
 XBT_PUBLIC unsigned int simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count,
                                              double timeout);
 XBT_PUBLIC void simcall_comm_wait(const smx_activity_t& comm, double timeout);
-XBT_PUBLIC int simcall_comm_test(const smx_activity_t& comm);
+XBT_PUBLIC bool simcall_comm_test(const smx_activity_t& comm);
 XBT_PUBLIC int simcall_comm_testany(smx_activity_t comms[], size_t count);
 XBT_PUBLIC int simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count);
 #endif
index 786e226..fa9c17d 100644 (file)
       parameter(MPI_COMM_NULL_DELETE_FN =0)
       integer MPI_COMM_DUP_FN
       parameter(MPI_COMM_DUP_FN =1)
-      integer MPI_WIN_NULL_COPY_FN, MPI_WIN_NULL_DELETE_FN
-      parameter(MPI_WIN_NULL_COPY_FN =0)
+      integer MPI_WIN_NULL_DELETE_FN
       parameter(MPI_WIN_NULL_DELETE_FN =0)
-      integer MPI_WIN_DUP_FN
-      parameter(MPI_WIN_DUP_FN =1)
       integer MPI_TYPE_NULL_COPY_FN, MPI_TYPE_NULL_DELETE_FN
       parameter(MPI_TYPE_NULL_COPY_FN =0)
       parameter(MPI_TYPE_NULL_DELETE_FN =0)
       external MPI_BCAST, MPI_BARRIER, MPI_REDUCE, MPI_ALLREDUCE
       external MPI_SCATTER, MPI_GATHER, MPI_ALLGATHER, MPI_SCAN
       external MPI_ALLTOALL, MPI_GATHERV, MPI_SENDRECV
+      external MPI_WIN_DUP_FN, MPI_WIN_NULL_COPY_FN
 
       external MPI_WTIME
       external MPI_WTICK
index be0e1b0..5454050 100644 (file)
@@ -12,10 +12,15 @@ namespace kernel {
 namespace activity {
 
 ActivityImpl::~ActivityImpl()
+{
+  clean_action();
+  XBT_DEBUG("Destroy activity %p", this);
+}
+
+void ActivityImpl::clean_action()
 {
   if (surf_action_) {
     surf_action_->unref();
-    XBT_DEBUG("Destroy activity %p", this);
     surf_action_ = nullptr;
   }
 }
@@ -48,6 +53,7 @@ void ActivityImpl::cancel()
   XBT_VERB("Activity %p is canceled", this);
   if (surf_action_ != nullptr)
     surf_action_->cancel();
+  state_ = SIMIX_CANCELED;
 }
 
 // boost::intrusive_ptr<Activity> support:
index 1719af4..0d16180 100644 (file)
@@ -35,6 +35,7 @@ public:
   virtual void post()   = 0; // What to do when a simcall terminates
   virtual void finish() = 0;
 
+  virtual void clean_action();
   virtual double get_remaining() const;
   // boost::intrusive_ptr<ActivityImpl> support:
   friend XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
index 5852dad..ae219f6 100644 (file)
@@ -229,7 +229,7 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, simgrid::kernel::activity:
 
 void simcall_HANDLER_comm_test(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* comm)
 {
-  int res;
+  bool res;
 
   if (MC_is_active() || MC_record_replay_is_active()) {
     res = comm->src_actor_ && comm->dst_actor_;
@@ -520,10 +520,7 @@ void CommImpl::cancel()
 /** @brief This is part of the cleanup process, probably an internal command */
 void CommImpl::cleanupSurf()
 {
-  if (surf_action_) {
-    surf_action_->unref();
-    surf_action_ = nullptr;
-  }
+  clean_action();
 
   if (src_timeout_) {
     src_timeout_->unref();
index ca65fd0..777d826 100644 (file)
@@ -27,18 +27,19 @@ public:
 
   CommImpl& set_type(CommImpl::Type type);
   CommImpl& set_size(double size);
-  double get_rate() { return rate_; }
-  CommImpl& set_rate(double rate);
   CommImpl& set_src_buff(void* buff, size_t size);
   CommImpl& set_dst_buff(void* buff, size_t* size);
+  CommImpl& set_rate(double rate);
+  double get_rate() { return rate_; }
 
-  CommImpl* start();
   void copy_data();
+
+  CommImpl* start();
   void suspend() override;
   void resume() override;
+  void cancel() override;
   void post() override;
   void finish() override;
-  void cancel() override;
 
   CommImpl::Type type_;        /* Type of the communication (SIMIX_COMM_SEND or SIMIX_COMM_RECEIVE) */
   MailboxImpl* mbox = nullptr; /* Rendez-vous where the comm is queued */
index 0e4d8ed..a2ca6a8 100644 (file)
@@ -37,7 +37,7 @@ void simcall_HANDLER_execution_wait(smx_simcall_t simcall, simgrid::kernel::acti
 
 void simcall_HANDLER_execution_test(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* synchro)
 {
-  int res = (synchro->state_ != SIMIX_WAITING && synchro->state_ != SIMIX_RUNNING);
+  bool res = (synchro->state_ != SIMIX_WAITING && synchro->state_ != SIMIX_RUNNING);
   if (res) {
     synchro->simcalls_.push_back(simcall);
     synchro->finish();
@@ -164,10 +164,8 @@ void ExecImpl::post()
 
   on_completion(*this);
 
-  if (surf_action_) {
-    surf_action_->unref();
-    surf_action_ = nullptr;
-  }
+  clean_action();
+
   if (timeout_detector_) {
     timeout_detector_->unref();
     timeout_detector_ = nullptr;
index d236948..b5b7a7a 100644 (file)
@@ -73,7 +73,8 @@ void SleepImpl::finish()
       SIMIX_simcall_answer(simcall);
     }
   }
-  SIMIX_process_sleep_destroy(this);
+
+  clean_action();
 }
 } // namespace activity
 } // namespace kernel
index 3f63777..407d18a 100644 (file)
@@ -207,8 +207,7 @@ void ActorImpl::exit()
 
     if (exec != nullptr && exec->surf_action_) {
       exec->cancel();
-      exec->surf_action_->unref();
-      exec->surf_action_ = nullptr;
+      exec->clean_action();
     } else if (comm != nullptr) {
       comms.remove(waiting_synchro);
       comm->cancel();
@@ -217,13 +216,13 @@ void ActorImpl::exit()
       if (i != waiting_synchro->simcalls_.end())
         waiting_synchro->simcalls_.remove(&simcall);
     } else if (sleep != nullptr) {
-      if (sleep->surf_action_)
-        sleep->surf_action_->cancel();
-      sleep->post();
+      sleep->cancel();
+      sleep->finish();
     } else if (raw != nullptr) {
       raw->finish();
     } else if (io != nullptr) {
       io->cancel();
+      io->finish();
     } else {
       simgrid::kernel::activity::ActivityImplPtr activity = waiting_synchro;
       xbt_die("Activity is of unknown type %s", simgrid::xbt::demangle(typeid(activity).name()).get());
@@ -439,7 +438,7 @@ void ActorImpl::throw_exception(std::exception_ptr e)
 
     activity::SleepImplPtr sleep = boost::dynamic_pointer_cast<activity::SleepImpl>(waiting_synchro);
     if (sleep != nullptr) {
-      SIMIX_process_sleep_destroy(sleep);
+      sleep->clean_action();
       if (std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), this) ==
               end(simix_global->actors_to_run) &&
           this != SIMIX_process_self()) {
@@ -590,7 +589,7 @@ void SIMIX_process_throw(smx_actor_t actor, xbt_errcat_t cat, int value, const c
     simgrid::kernel::activity::SleepImplPtr sleep =
         boost::dynamic_pointer_cast<simgrid::kernel::activity::SleepImpl>(actor->waiting_synchro);
     if (sleep != nullptr) {
-      SIMIX_process_sleep_destroy(sleep);
+      sleep->clean_action();
       if (std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), actor) ==
               end(simix_global->actors_to_run) &&
           actor != SIMIX_process_self()) {
@@ -691,16 +690,6 @@ void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration)
   simcall->issuer->waiting_synchro = sync;
 }
 
-void SIMIX_process_sleep_destroy(simgrid::kernel::activity::SleepImplPtr sleep)
-{
-  XBT_DEBUG("Destroy sleep synchro %p", sleep.get());
-
-  if (sleep->surf_action_) {
-    sleep->surf_action_->unref();
-    sleep->surf_action_ = nullptr;
-  }
-}
-
 /**
  * @brief Calling this function makes the process to yield.
  *
index f4ee3a8..c6324ec 100644 (file)
@@ -176,6 +176,4 @@ XBT_PUBLIC void create_maestro(const std::function<void()>& code);
 
 extern void (*SMPI_switch_data_segment)(simgrid::s4u::ActorPtr actor);
 
-XBT_PRIVATE void SIMIX_process_sleep_destroy(simgrid::kernel::activity::SleepImplPtr synchro);
-
 #endif
index cd27911..d80c375 100644 (file)
@@ -36,9 +36,9 @@ e_smx_state_t simcall_execution_wait(const smx_activity_t& execution)
   return (e_smx_state_t)simcall_BODY_execution_wait(static_cast<simgrid::kernel::activity::ExecImpl*>(execution.get()));
 }
 
-e_smx_state_t simcall_execution_test(const smx_activity_t& execution)
+bool simcall_execution_test(const smx_activity_t& execution)
 {
-  return (e_smx_state_t)simcall_BODY_execution_test(static_cast<simgrid::kernel::activity::ExecImpl*>(execution.get()));
+  return simcall_BODY_execution_test(static_cast<simgrid::kernel::activity::ExecImpl*>(execution.get()));
 }
 
 void simcall_process_join(smx_actor_t process, double timeout)
@@ -223,7 +223,7 @@ void simcall_comm_wait(const smx_activity_t& comm, double timeout)
  * @ingroup simix_comm_management
  *
  */
-int simcall_comm_test(const smx_activity_t& comm)
+bool simcall_comm_test(const smx_activity_t& comm)
 {
   return simcall_BODY_comm_test(static_cast<simgrid::kernel::activity::CommImpl*>(comm.get()));
 }
index e4dc4f0..5ce7bc8 100644 (file)
@@ -127,17 +127,17 @@ static inline void simcall_execution_test__set__execution(smx_simcall_t simcall,
 {
   simgrid::simix::marshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0], arg);
 }
-static inline int simcall_execution_test__get__result(smx_simcall_t simcall)
+static inline bool simcall_execution_test__get__result(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal<int>(simcall->result);
+  return simgrid::simix::unmarshal<bool>(simcall->result);
 }
-static inline int simcall_execution_test__getraw__result(smx_simcall_t simcall)
+static inline bool simcall_execution_test__getraw__result(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal_raw<int>(simcall->result);
+  return simgrid::simix::unmarshal_raw<bool>(simcall->result);
 }
-static inline void simcall_execution_test__set__result(smx_simcall_t simcall, int result)
+static inline void simcall_execution_test__set__result(smx_simcall_t simcall, bool result)
 {
-  simgrid::simix::marshal<int>(simcall->result, result);
+  simgrid::simix::marshal<bool>(simcall->result, result);
 }
 
 static inline smx_actor_t simcall_comm_send__get__sender(smx_simcall_t simcall)
@@ -710,17 +710,17 @@ static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, simgrid::
 {
   simgrid::simix::marshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0], arg);
 }
-static inline int simcall_comm_test__get__result(smx_simcall_t simcall)
+static inline bool simcall_comm_test__get__result(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal<int>(simcall->result);
+  return simgrid::simix::unmarshal<bool>(simcall->result);
 }
-static inline int simcall_comm_test__getraw__result(smx_simcall_t simcall)
+static inline bool simcall_comm_test__getraw__result(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal_raw<int>(simcall->result);
+  return simgrid::simix::unmarshal_raw<bool>(simcall->result);
 }
-static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result)
+static inline void simcall_comm_test__set__result(smx_simcall_t simcall, bool result)
 {
-  simgrid::simix::marshal<int>(simcall->result, result);
+  simgrid::simix::marshal<bool>(simcall->result, result);
 }
 
 static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__get__comms(smx_simcall_t simcall)
index 4234bb9..b86e34a 100644 (file)
@@ -64,11 +64,11 @@ inline static int simcall_BODY_execution_wait(simgrid::kernel::activity::ExecImp
   return simcall<int, simgrid::kernel::activity::ExecImpl*>(SIMCALL_EXECUTION_WAIT, execution);
 }
 
-inline static int simcall_BODY_execution_test(simgrid::kernel::activity::ExecImpl* execution)
+inline static bool simcall_BODY_execution_test(simgrid::kernel::activity::ExecImpl* execution)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
     simcall_HANDLER_execution_test(&SIMIX_process_self()->simcall, execution);
-  return simcall<int, simgrid::kernel::activity::ExecImpl*>(SIMCALL_EXECUTION_TEST, execution);
+  return simcall<bool, simgrid::kernel::activity::ExecImpl*>(SIMCALL_EXECUTION_TEST, execution);
 }
 
 inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout)
@@ -113,11 +113,11 @@ inline static void simcall_BODY_comm_wait(simgrid::kernel::activity::CommImpl* c
   return simcall<void, simgrid::kernel::activity::CommImpl*, double>(SIMCALL_COMM_WAIT, comm, timeout);
 }
 
-inline static int simcall_BODY_comm_test(simgrid::kernel::activity::CommImpl* comm)
+inline static bool simcall_BODY_comm_test(simgrid::kernel::activity::CommImpl* comm)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
     simcall_HANDLER_comm_test(&SIMIX_process_self()->simcall, comm);
-  return simcall<int, simgrid::kernel::activity::CommImpl*>(SIMCALL_COMM_TEST, comm);
+  return simcall<bool, simgrid::kernel::activity::CommImpl*>(SIMCALL_COMM_TEST, comm);
 }
 
 inline static int simcall_BODY_comm_testany(simgrid::kernel::activity::CommImpl** comms, size_t count)
index 5eeaa1a..b450dfe 100644 (file)
@@ -40,7 +40,7 @@ int  process_join(smx_actor_t process, double timeout) [[block]];
 int  process_sleep(double duration) [[block]];
 
 int           execution_wait(simgrid::kernel::activity::ExecImpl* execution) [[block]];
-int           execution_test(simgrid::kernel::activity::ExecImpl* execution) [[block]];
+bool          execution_test(simgrid::kernel::activity::ExecImpl* execution) [[block]];
 
 void           comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) [[block]];
 boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached);
@@ -48,7 +48,7 @@ void           comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buf
 boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
 int            comm_waitany(simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout) [[block]];
 void           comm_wait(simgrid::kernel::activity::CommImpl* comm, double timeout) [[block]];
-int            comm_test(simgrid::kernel::activity::CommImpl* comm) [[block]];
+bool           comm_test(simgrid::kernel::activity::CommImpl* comm) [[block]];
 int            comm_testany(simgrid::kernel::activity::CommImpl** comms, size_t count) [[block]];
 
 void        mutex_lock(smx_mutex_t mutex) [[block]];
index c25d519..99d27d8 100755 (executable)
@@ -54,7 +54,7 @@ class Simcall(object):
         # smx_host_t h)
         if self.simcalls_pre is None:
             self.simcalls_pre = set()
-            for fn in glob.glob('smx_*') + glob.glob('ActorImpl*') + \
+            for fn in glob.glob('smx_*') + glob.glob('../kernel/actor/ActorImpl*') + \
                     glob.glob('../mc/*cpp') + glob.glob('../kernel/activity/*cpp'):
                 f = open(fn)
                 self.simcalls_pre |= set(re.findall(r'simcall_HANDLER_(.*?)\(', f.read()))
index 9f3ce44..934f517 100644 (file)
@@ -226,15 +226,15 @@ void mpi_win_get_group_(int*  win, int* group, int* ierr){
  }
 }
 
-void mpi_win_get_attr_(int* win, int* type_keyval, int* attribute_val, int* flag, int* ierr){
-   int* value = nullptr;
+void mpi_win_get_attr_(int* win, int* type_keyval, MPI_Aint* attribute_val, int* flag, int* ierr){
+   MPI_Aint* value = nullptr;
   *ierr = MPI_Win_get_attr(simgrid::smpi::Win::f2c(*win), *type_keyval, &value, flag);
   if (*flag == 1)
     *attribute_val = *value;
 }
 
-void mpi_win_set_attr_(int* win, int* type_keyval, int* att, int* ierr){
int* val = (int*)xbt_malloc(sizeof(int));
+void mpi_win_set_attr_(int* win, int* type_keyval, MPI_Aint* att, int* ierr){
MPI_Aint* val = (MPI_Aint*)xbt_malloc(sizeof(MPI_Aint));
  *val=*att;
   *ierr = MPI_Win_set_attr(simgrid::smpi::Win::f2c(*win), *type_keyval, val);
 }
@@ -284,6 +284,19 @@ void mpi_win_flush_local_all_(int* win, int* ierr){
   *ierr = MPI_Win_flush_local_all(simgrid::smpi::Win::f2c(*win));
 }
 
+void mpi_win_null_copy_fn_( int* win, int* keyval, int* extrastate, MPI_Aint* valin, MPI_Aint* valout,
+                            int* flag, int* ierr ){
+  *flag=0;
+  *ierr=MPI_SUCCESS;
+}
+
+void mpi_win_dup_fn_( int* win, int* keyval, int* extrastate, MPI_Aint* valin, MPI_Aint* valout,
+                      int* flag, int* ierr ){
+  *flag=1;
+  *valout=*valin;
+  *ierr=MPI_SUCCESS;
+}
+
 void mpi_info_create_( int *info, int* ierr){
   MPI_Info tmp;
   *ierr =  MPI_Info_create(&tmp);
index 64f89dd..761ed29 100644 (file)
@@ -120,13 +120,14 @@ void mpi_reduce_scatter_block_ (void *sendbuf, void *recvbuf, int* recvcount, in
 void mpi_alltoallw_ ( void *sendbuf, int *sendcnts, int *sdispls, int* old_sendtypes, void *recvbuf, int *recvcnts,
                       int *rdispls, int* old_recvtypes, int* comm, int* ierr){
   int size = simgrid::smpi::Comm::f2c(*comm)->size();
-  sendbuf = static_cast<char *>( FORT_IN_PLACE(sendbuf));
   MPI_Datatype* sendtypes = new MPI_Datatype[size];
   MPI_Datatype* recvtypes = new MPI_Datatype[size];
   for(int i=0; i< size; i++){
-    sendtypes[i] = simgrid::smpi::Datatype::f2c(old_sendtypes[i]);
+    if(FORT_IN_PLACE(sendbuf)!=MPI_IN_PLACE)
+      sendtypes[i] = simgrid::smpi::Datatype::f2c(old_sendtypes[i]);
     recvtypes[i] = simgrid::smpi::Datatype::f2c(old_recvtypes[i]);
   }
+  sendbuf = static_cast<char *>( FORT_IN_PLACE(sendbuf));
  *ierr = MPI_Alltoallw( sendbuf, sendcnts, sdispls, sendtypes, recvbuf, recvcnts, rdispls,
                         recvtypes, simgrid::smpi::Comm::f2c(*comm));
   delete[] sendtypes;
@@ -301,13 +302,14 @@ void mpi_ialltoallw_ ( void *sendbuf, int *sendcnts, int *sdispls, int* old_send
                       int *rdispls, int* old_recvtypes, int* comm, int* request, int* ierr){
   MPI_Request req;
   int size = simgrid::smpi::Comm::f2c(*comm)->size();
-  sendbuf = static_cast<char *>( FORT_IN_PLACE(sendbuf));
   MPI_Datatype* sendtypes = new MPI_Datatype[size];
   MPI_Datatype* recvtypes = new MPI_Datatype[size];
   for(int i=0; i< size; i++){
-    sendtypes[i] = simgrid::smpi::Datatype::f2c(old_sendtypes[i]);
+    if(FORT_IN_PLACE(sendbuf)!=MPI_IN_PLACE)
+      sendtypes[i] = simgrid::smpi::Datatype::f2c(old_sendtypes[i]);
     recvtypes[i] = simgrid::smpi::Datatype::f2c(old_recvtypes[i]);
   }
+  sendbuf = static_cast<char *>( FORT_IN_PLACE(sendbuf));
  *ierr = MPI_Ialltoallw( sendbuf, sendcnts, sdispls, sendtypes, recvbuf, recvcnts, rdispls,
                         recvtypes, simgrid::smpi::Comm::f2c(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
index 455dbf5..0a20e1d 100644 (file)
@@ -784,7 +784,7 @@ int PMPI_Win_shared_query (MPI_Win win, int rank, MPI_Aint* size, int* disp_unit
 int PMPI_Win_get_attr (MPI_Win win, int keyval, void *attribute_val, int* flag)
 {
   static MPI_Aint size;
-  static int disp_unit;
+  static MPI_Aint disp_unit;
   if (win==MPI_WIN_NULL)
     return MPI_ERR_TYPE;
   else{
@@ -800,7 +800,7 @@ int PMPI_Win_get_attr (MPI_Win win, int keyval, void *attribute_val, int* flag)
       return MPI_SUCCESS;
     case MPI_WIN_DISP_UNIT :
       disp_unit=win->disp_unit();
-      *static_cast<int**>(attribute_val)  = &disp_unit;
+      *static_cast<MPI_Aint**>(attribute_val)  = &disp_unit;
       *flag = 1;
       return MPI_SUCCESS;
     default:
index 1aebcf6..69b2029 100644 (file)
@@ -90,7 +90,7 @@ int Coll_reduce_default::reduce(void *sendbuf, void *recvbuf, int count, MPI_Dat
                      MPI_Comm comm)
 {
   //non commutative case, use a working algo from openmpi
-  if (op != MPI_OP_NULL && not op->is_commutative()) {
+  if (op != MPI_OP_NULL && (datatype->flags() & DT_FLAG_DERIVED || not op->is_commutative())) {
     return Coll_reduce_ompi_basic_linear::reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
   }
   MPI_Request request;
@@ -100,6 +100,9 @@ int Coll_reduce_default::reduce(void *sendbuf, void *recvbuf, int count, MPI_Dat
 
 int Coll_allreduce_default::allreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
+  //FIXME: have mpi_ireduce and iallreduce handle derived datatypes correctly
+  if(datatype->flags() & DT_FLAG_DERIVED)
+    return Coll_allreduce_ompi::allreduce(sendbuf, recvbuf, count, datatype, op, comm);
   int ret;
   ret = Coll_reduce_default::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm);
   if(ret==MPI_SUCCESS)
index de6dff6..6adc870 100644 (file)
@@ -229,8 +229,8 @@ void mpi_win_detach_(int* win, int* base, int* ierr);
 void mpi_win_set_info_(int* win, int* info, int* ierr);
 void mpi_win_get_info_(int* win, int* info, int* ierr);
 void mpi_win_get_group_(int* win, int* group, int* ierr);
-void mpi_win_get_attr_(int* win, int* type_keyval, int* attribute_val, int* flag, int* ierr);
-void mpi_win_set_attr_(int* win, int* type_keyval, int* att, int* ierr);
+void mpi_win_get_attr_(int* win, int* type_keyval, MPI_Aint* attribute_val, int* flag, int* ierr);
+void mpi_win_set_attr_(int* win, int* type_keyval, MPI_Aint* att, int* ierr);
 void mpi_win_delete_attr_(int* win, int* comm_keyval, int* ierr);
 void mpi_win_create_keyval_(void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr);
 void mpi_win_free_keyval_(int* keyval, int* ierr);
@@ -242,6 +242,8 @@ void mpi_win_flush_(int* rank, int* win, int* ierr);
 void mpi_win_flush_local_(int* rank, int* win, int* ierr);
 void mpi_win_flush_all_(int* win, int* ierr);
 void mpi_win_flush_local_all_(int* win, int* ierr);
+void mpi_win_dup_fn_( int* win, int* keyval, int* extrastate, MPI_Aint* valin, MPI_Aint* valout, int* flag, int* ierr );
+void mpi_win_null_copy_fn_( int* win, int* keyval, int* extrastate, MPI_Aint* valin, MPI_Aint* valout, int* flag, int* ierr );
 void mpi_info_create_(int* info, int* ierr);
 void mpi_info_set_(int* info, char* key, char* value, int* ierr, unsigned int keylen, unsigned int valuelen);
 void mpi_info_free_(int* info, int* ierr);
index c491c8b..b2785bb 100644 (file)
@@ -93,6 +93,24 @@ C
      .                  MPI_SUM, comm, req, ierr)
       call MPI_Wait(req, MPI_STATUS_IGNORE, ierr)
 
+      call MPI_Iscatter(sbuf, NUM_INTS, MPI_INTEGER, rbuf, 
+     .                  NUM_INTS, MPI_INTEGER, 0, comm, req, ierr)
+      call MPI_Wait(req, MPI_STATUS_IGNORE, ierr)
+
+      call MPI_Iscatterv(sbuf, scounts, sdispls, MPI_INTEGER,
+     .                   rbuf, NUM_INTS, MPI_INTEGER,
+     .                   0, comm, req, ierr)
+      call MPI_Wait(req, MPI_STATUS_IGNORE, ierr)
+
+      call MPI_Iallgather(sbuf, NUM_INTS, MPI_INTEGER,
+     .                  rbuf, NUM_INTS, MPI_INTEGER, comm, req, ierr)
+      call MPI_Wait(req, MPI_STATUS_IGNORE, ierr)
+
+      call MPI_Iallgatherv(sbuf, NUM_INTS, MPI_INTEGER, 
+     .                  rbuf, rcounts, rdispls, MPI_INTEGER, 
+     .                  comm, req, ierr)
+      call MPI_Wait(req, MPI_STATUS_IGNORE, ierr)
+
       call mtest_finalize( errs )
       call MPI_Finalize( ierr )
       end
index e34c19d..1cadf23 100644 (file)
@@ -9,12 +9,11 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
   foreach(test winaccf
-             # winerrf
-              winfencef wingroupf
-            # baseattrwinf winattr2f winattrf
-               wingetf winnamef winscale1f
-            # winscale2f
-              )
+           winfencef wingroupf
+           baseattrwinf winattr2f winattrf
+           wingetf winnamef winscale1f
+         # winscale2f winerrf
+           )
     add_executable(${test} EXCLUDE_FROM_ALL ${test}.f)
     add_dependencies(tests ${test})
     target_link_libraries(${test} simgrid mtest_f77)
index fb0747f..5deb79d 100644 (file)
@@ -3,4 +3,4 @@ C
 C  (C) 2003 by Argonne National Laboratory.
 C      See COPYRIGHT in top-level directory.
 C
-       integer extrastate, valin, valout, val
+       integer(kind=MPI_ADDRESS_KIND) extrastate, valin, valout, val
index 9141374..db7670b 100644 (file)
@@ -9,6 +9,6 @@ winnamef 1
 wingroupf 4 needs_privatization=1
 winaccf 4 needs_privatization=1
 c2f2cwinf 1
-#baseattrwinf 1
-#winattrf 1
-#winattr2f 1
+baseattrwinf 1
+winattrf 1
+winattr2f 1
index 2dbd955..44b91b1 100644 (file)
@@ -10,11 +10,11 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
  
   foreach(test winaccf90
              # winerrf90
-              winfencef90 wingroupf90
-            # baseattrwinf90 winattr2f90 winattrf90
-              wingetf90 winnamef90 winscale1f90
-            # winscale2f90
-              )
+           winfencef90 wingroupf90
+           baseattrwinf90 winattr2f90 winattrf90
+           wingetf90 winnamef90 winscale1f90
+         # winscale2f90
+           )
     add_executable(${test} EXCLUDE_FROM_ALL ${test}.f90)
     add_dependencies(tests ${test})
     target_link_libraries(${test} simgrid mtest_f90)   
index 0686c73..80be344 100644 (file)
@@ -9,6 +9,6 @@ winnamef90 1
 wingroupf90 4 needs_privatization=1
 winaccf90 4 needs_privatization=1
 c2f2cwinf90 1
-#baseattrwinf90 1
-#winattrf90 1
-#winattr2f90 1
+baseattrwinf90 1
+winattrf90 1
+winattr2f90 1
index 32a5b24..d4956fa 100644 (file)
@@ -27,6 +27,12 @@ option(enable_documentation "Whether to produce documentation" on)
 option(enable_ns3            "Whether ns3 model is activated." off)
 option(enable_java           "Whether the Java bindings are activated." off)
 option(enable_lib_in_jar     "Whether the native libraries are bundled in a Java jar file" on)
+option(minimal_java          "Whether to compile the jarfile with the minimal dependency set" off)
+mark_as_advanced(minimal_java)
+if(minimal_java)
+  set(enable_java on)
+  set(enable_lib_in_jar on)
+endif()
 
 option(enable_lua            "Whether the Lua bindings are activated." off)
 
index 4e76b83..3a189e9 100644 (file)
@@ -14,5 +14,5 @@ RUN apt update && \
        chrpath \
        libdw-dev libevent-dev libunwind8-dev \
        && \
-    pip3 install breathe javasphinx sphinx>=1.8.0b1 sphinx_rtd_theme
+    pip3 install breathe javasphinx 'sphinx>=1.8.0b1' sphinx_rtd_theme
                   
\ No newline at end of file