Before, the field of actors were used to store the SMPI data directly,
but now it's free.
With a bit of luck, this change will help StarPU
which fails since a few days, possibly because it tries to get the
userdata from an actor using smpi_process_get_userdata while that
actor is not from SMPI (I'm not sure, that's just a wild guess).
If my guess is right, retriving the userdata from the s4u::Actor will
certainly help. If it's wrong, the change shouldn't harm anything and
it will improve by a tiny bit our memory footprint.
MPI_Comm comm_self_ = MPI_COMM_NULL;
MPI_Comm comm_intra_ = MPI_COMM_NULL;
MPI_Comm* comm_world_ = nullptr;
- void* data_ = nullptr; /* user data */
SmpiProcessState state_;
int sampling_ = 0; /* inside an SMPI_SAMPLE_ block? */
std::string instance_id_;
void mark_as_initialized();
void set_replaying(bool value);
bool replaying();
- void set_user_data(void* data);
- void* get_user_data();
smpi_trace_call_location_t* call_location();
void set_privatized_region(smpi_privatization_region_t region);
smpi_privatization_region_t privatized_region();
return replaying_;
}
-void ActorExt::set_user_data(void* data)
-{
- data_ = data;
-}
-
-void* ActorExt::get_user_data()
-{
- return data_;
-}
-
ActorPtr ActorExt::get_actor()
{
return actor_;
}
void * smpi_process_get_user_data(){
- return smpi_process()->get_user_data();
+ return Actor::self()->get_impl()->get_user_data();
}
void smpi_process_set_user_data(void *data){
- return smpi_process()->set_user_data(data);
+ Actor::self()->get_impl()->set_user_data(data);
}