system call to mpirun
18 views (last 30 days)
Show older comments
Hi all,
I have a matlab file which includes a call to the matlab system command. The command looks like:
'mpirun -machinefile node.list -np 4 /pathtoexecutable/stg > /home/eide/log.txt'
The problem is the stg does not run properly - it crashes with the following error: rank 3 in job 1 name_of_clusternode caused collective abort of all ranks exit status of rank 3: killed by signal 9
If I run the same command from console it works perfectly. The path to mpirun and the executable are listed in the $PATH variable, so matlab knows the location. I also tried absolute paths - also not working. Does anyone have a suggestion? From the fact that the program runs in console but not via the matlab system call makes me wonder if the console matlab is opening internally is missing some info although the path is known. I am running matlab R2010B on a RedHat enterprise 4 cluster with tcsh
regards
Eide
0 Comments
Answers (4)
Jason Ross
on 3 Oct 2011
Compare the results of system('env') and 'env' in the shell. You might need to further configure the environment with setenv.
Also, make sure that you are running the same shell environment when you shell out (sh, csh, etc.) as you are when you run your bare shell command.
You might also investigate which mpirun is being called -- run "system('which mpirun') and 'which mpirun' in the shell.
Walter Roberson
on 3 Oct 2011
Sounds like either the PATH is incomplete or the LD_LIBRARY_PATH is incomplete.
You should be able to debug the problem using a combination of ldd and ptrace.
Eide
on 4 Oct 2011
1 Comment
Walter Roberson
on 4 Oct 2011
Your hypothesis is plausible, but I would not expect _more_ libraries to be listed unless there was at least one library in the above list that was loaded from a different place and that different place happened to reference additional libraries.
Eide
on 5 Oct 2011
1 Comment
Walter Roberson
on 5 Oct 2011
The default for those things is to fall back to LANG=C, and there is only an error if it cannot find the definition for that. Otherwise it is a normal search procedure looking from the most specific versions of your current settings towards less and less specific until it finds a definition file.
You might want to try setting LANG=C in your shell environment before starting up MATLAB. I don't think it will make any substantial difference.
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!