int fdout = open(target_executable.c_str(), O_CREAT | O_RDWR, S_IRWXU);
xbt_assert(fdout >= 0, "Cannot write into %s", target_executable.c_str());
+ XBT_DEBUG("Copy %ld bytes into %s", static_cast<long>(fdin_size), target_executable.c_str());
#if HAVE_SENDFILE
ssize_t sent_size = sendfile(fdout, fdin, NULL, fdin_size);
xbt_assert(sent_size == fdin_size,
"Error while copying %s: only %zd bytes copied instead of %ld (errno: %d -- %s)",
target_executable.c_str(), sent_size, fdin_size, errno, strerror(errno));
#else
- XBT_VERB("Copy %d bytes into %s", static_cast<int>(fdin_size), target_executable.c_str());
const int bufsize = 1024 * 1024 * 4;
char buf[bufsize];
while (int got = read(fdin, buf, bufsize)) {
// Called either directly from the user code, or from the code called by smpirun
void SMPI_init(){
- simgrid::s4u::Actor::onCreation.connect([](simgrid::s4u::ActorPtr actor) {
- if (not actor->isDaemon()) {
+ simgrid::s4u::Actor::on_creation.connect([](simgrid::s4u::ActorPtr actor) {
+ if (not actor->is_daemon()) {
process_data.insert({actor, new simgrid::smpi::Process(actor, nullptr)});
}
});
- simgrid::s4u::Actor::onDestruction.connect([](simgrid::s4u::ActorPtr actor) {
+ simgrid::s4u::Actor::on_destruction.connect([](simgrid::s4u::ActorPtr actor) {
auto it = process_data.find(actor);
if (it != process_data.end()) {
delete it->second;