Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Per Madsen (Per.Madsen_at_[hidden])
Date: 2007-07-26 01:48:54


I have found a solution to my problem with executing a MPI program from within a MPI program via a system call.

A related problem has been discussed in the thread: “Recursive use of orterun”.

The problem was the setup and export of environment variables.

I solved my problem by adding the following to the script starting the second MPI program:

    for i in $(env | grep OMPI_MCA |sed 's/=/ /' | awk '{print $1}')
       unset $i

This clear the environment for the child process for all variables with name starting with “OMPI_NCA”

Per Madsen
Senior scientist
Det Jordbrugsvidenskabelige Fakultet / Faculty of Agricultural Sciences
Forskningscenter Foulum / Research Centre Foulum
Genetik og Bioteknologi / Dept. of Genetics and Biotechnology
Blichers Allé 20, P.O. BOX 50
DK-8830 Tjele