X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fe304706848f0a64477d4687b3ea97d5b9a0c35c..b6dde5ff6f208b83545a4b4e9e81712d0d8617a1:/src/smpi/include/smpi_win.hpp diff --git a/src/smpi/include/smpi_win.hpp b/src/smpi/include/smpi_win.hpp index d067226a82..f9a1206884 100644 --- a/src/smpi/include/smpi_win.hpp +++ b/src/smpi/include/smpi_win.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2019. The SimGrid Team. +/* Copyright (c) 2010-2020. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -8,6 +8,7 @@ #define SMPI_WIN_HPP_INCLUDED #include "simgrid/s4u/Barrier.hpp" +#include "smpi_errhandler.hpp" #include "smpi_f2c.hpp" #include "smpi_keyvals.hpp" #include "xbt/synchro.h" @@ -22,7 +23,7 @@ class Win : public F2C, public Keyval { void* base_; MPI_Aint size_; int disp_unit_; - int assert_; + int assert_ = 0; MPI_Info info_; MPI_Comm comm_; std::vector *requests_; @@ -40,6 +41,7 @@ class Win : public F2C, public Keyval { int mode_; // exclusive or shared lock int allocated_; int dynamic_; + MPI_Errhandler errhandler_; public: static std::unordered_map keyvals_; @@ -76,9 +78,8 @@ public: int get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Request* request=nullptr); - int compare_and_swap(const void *origin_addr, void *compare_addr, - void *result_addr, MPI_Datatype datatype, int target_rank, - MPI_Aint target_disp); + int compare_and_swap(const void* origin_addr, const void* compare_addr, void* result_addr, MPI_Datatype datatype, + int target_rank, MPI_Aint target_disp); static Win* f2c(int id); int lock(int lock_type, int rank, int assert); @@ -92,6 +93,8 @@ public: int finish_comms(); int finish_comms(int rank); int shared_query(int rank, MPI_Aint* size, int* disp_unit, void* baseptr); + MPI_Errhandler errhandler(); + void set_errhandler( MPI_Errhandler errhandler); };