int optind_ = 1; /*for getopt replacement */
#endif
std::string tracing_category_ = "";
+ MPI_Info info_env_;
#if HAVE_PAPI
/** Contains hardware data as read by PAPI **/
s4u::ActorPtr get_actor();
int get_optind();
void set_optind(int optind);
+ MPI_Info info_env();
};
} // namespace smpi
mailboxes_mutex_ = s4u::Mutex::create();
timer_ = xbt_os_timer_new();
state_ = SmpiProcessState::UNINITIALIZED;
+ info_env_ = MPI_INFO_NULL;
if (MC_is_active())
MC_ignore_heap(timer_, xbt_os_timer_size());
return comm_self_;
}
+MPI_Info ActorExt::info_env()
+{
+ return info_env_;
+}
+
MPI_Comm ActorExt::comm_intra()
{
return comm_intra_;
{
return optind_;
}
+
void ActorExt::set_optind(int new_optind)
{
optind_ = new_optind;
return smpi_process()->comm_self();
}
+MPI_Info smpi_process_info_env(){
+ return smpi_process()->info_env();
+}
+
void smpi_process_init(int *argc, char ***argv){
simgrid::smpi::ActorExt::init();
}
int main(int argc, char *argv[])
{
char value[MPI_MAX_INFO_VAL];
- char *keys[] = { "command", "argv", "maxprocs", "soft", "host", "arch", "wdir", "file",
+ const char *keys[] = { "command", "argv", "maxprocs", "soft", "host", "arch", "wdir", "file",
"thread_level", 0
};
int flag, i;
MPI_Init(NULL, NULL);
for (i = 0; keys[i]; i++) {
- MPI_Info_get(MPI_INFO_ENV, keys[i], MPI_MAX_INFO_VAL, value, &flag);
+ MPI_Info_get(MPI_INFO_ENV, (char*)keys[i], MPI_MAX_INFO_VAL, value, &flag);
if (flag && verbose)
printf("command: %s\n", value);
}