views:

40

answers:

2

Hello

How to strace all processes of mpi parallel job, started with mpiexec (mpich2, linux)?

-o will mess outputs from different processes

A: 

You may want to try STAT (Stack Trace Analysis Tool). Check out the STAT Homepage. It will give you a high level overview of your process behavior, and works especially well in the case of a hung process.

Jharrod
sorry. this project is interesting, but i can't run it on target platform (StackWalker API is not ported, but strace is).
osgx
What platform is it? Try using gcc 4.1.2, we've had problems compiling with newer versions (StackWalker specifically).
Jharrod
+1  A: 

Create a wrapper around your program, which will be launched by mpiexec. Something like:

#!/bin/sh
LOGFILE="strace-$(hostname).$$"
exec strace -o"$LOGFILE" my_mpi_program
Roman Cheplyaka
I work on SMP, so hostname wil be the same ^(
osgx
It's ok, file names still will be different due to $$ part -- it is the PID of the current process.
Roman Cheplyaka