Kurt,

the error is "valgrind myApp" is not an executable (but this is a
command a shell can interpret)
so you have several options:
 - use a wrapper (e.g. myApp.valgrind) that forks&exec valgrind myApp)
 - MPI_Comm_spawn("valgrind", argv, ...) after you inserted "myApp" at
the beginning of argv
 - use the fork agent: mpirun --mca orte_fork_agent valgrind.sh ...
  so mpirun/orted will fork&exec valgrind.sh a.out instead of the
default a.out (and it is up to you to write the valgrind.sh wrapper)

Cheers,

Gilles

On Sun, May 10, 2020 at 4:31 AM Mccall, Kurt E. (MSFC-EV41) via users
<users@lists.open-mpi.org> wrote:
>
> How can I run OpenMPI’s Memchecker on a process created by MPI_Comm_spawn()?  
>  I’ve configured OpenMPI 4.0.3 for Memchecker, along with Valgrind 3.15.0 and 
> it works quite well on processes created directly by mpiexec.
>
>
>
> I tried to do something analogous by pre-pending “valgrind” onto the command 
> passed to MPI_Comm_spawn(), but the process is not launched and it returns no 
> error code.
>
>
>
> char *argv[n];
>
> MPI_Info info;
>
> MPI_Comm comm;
>
> int error_code[1];
>
>
>
> MPI_Comm_spawn (“valgrind   myApp”,  argv,  1,  info,  0,  MPI_COMM_SELF,  
> &comm,  error_code);
>
>
>
> I didn’t change the array of myApp arguments argv after adding “valgrind” to 
> the command;   maybe it needs to be adjusted somehow.
>
>
>
> Thanks,
>
> Kurt
>
>

Reply via email to