system call to mpirun
Ältere Kommentare anzeigen
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
Antworten (4)
Jason Ross
am 3 Okt. 2011
0 Stimmen
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.
1 Kommentar
Eide
am 4 Okt. 2011
Walter Roberson
am 3 Okt. 2011
0 Stimmen
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.
1 Kommentar
Eide
am 4 Okt. 2011
Eide
am 4 Okt. 2011
1 Kommentar
Walter Roberson
am 4 Okt. 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
am 5 Okt. 2011
1 Kommentar
Walter Roberson
am 5 Okt. 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.
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!