Difference between revisions of "OpenMPI"
From HCL
Zhongziming (talk | contribs) |
Zhongziming (talk | contribs) (→Debugging applications on Multiprocessors/Multicores) |
||
Line 15: | Line 15: | ||
* [http://www.open-mpi.org/faq/?category=debugging#serial-debuggers Serial debugger (eg:gdb)] | * [http://www.open-mpi.org/faq/?category=debugging#serial-debuggers Serial debugger (eg:gdb)] | ||
− | ** 1. Attach to individual MPI processes after they are running. | + | ** 1. Attach to individual MPI processes after they are running.<br /> For example, launch your MPI application as normal with mpirun. Then login to the node(s) where your application is running and use the --pid option to gdb to attach to your application. |
− | + | ** 2. Use mpirun to launch xterms (or equivalent) with serial debuggers.<br /> shell$ mpirun -np 4 xterm -e gdb my_mpi_application | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ** 2. Use mpirun to launch xterms (or equivalent) with serial debuggers. | ||
− |
Revision as of 10:08, 12 January 2011
MCA parameter files
If you want to permanently use some MCA parameter settings, you can create a file $HOME/.openmpi/mca-params.conf, e.g.:
cat $HOME/.openmpi/mca-params.conf btl_tcp_if_exclude = lo,eth1
Running applications on Multiprocessors/Multicores
Process can be bound to specific sockets and cores on nodes by choosing right options of mpirun.
Debugging applications on Multiprocessors/Multicores
- Serial debugger (eg:gdb)
- 1. Attach to individual MPI processes after they are running.
For example, launch your MPI application as normal with mpirun. Then login to the node(s) where your application is running and use the --pid option to gdb to attach to your application. - 2. Use mpirun to launch xterms (or equivalent) with serial debuggers.
shell$ mpirun -np 4 xterm -e gdb my_mpi_application
- 1. Attach to individual MPI processes after they are running.