Skip to content

Commit

Permalink
patch the preloadee to use PID for MPI recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
lquenti committed Mar 4, 2024
1 parent ed21f87 commit f4e01b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion preloadee/preloadee.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ static void init_state() {
current_state = malloc(sizeof(state_t));

int timestamp = (int)time(NULL);
pid_t pid = getpid();
char filename[256];
sprintf(filename, "./io_recordings_%d.csv", timestamp);
sprintf(filename, "./io_recordings_%d_%d.csv", pid, timestamp);
current_state->orig_read = dlsym(RTLD_NEXT, "read");
current_state->orig_write = dlsym(RTLD_NEXT, "write");
current_state->orig_open = dlsym(RTLD_NEXT, "open");
Expand Down

0 comments on commit f4e01b2

Please sign in to comment.