Configuring Eclipse to run MPI4PY

If Eclipse is your IDE of choice then you can configure it to run MPI4PY tools from within the editor itself.

The primary app we use for running parallel programms is mpiexec and this needs to be run as an external application from Eclipse, this is asked from the Top Level Run menu, then click External Tools, and then click External Tool Configurations

Run -> External Tools -> External Tool Configurations...

This will bring up the following screen

Select Program in the list on the left, and then click the Add New Icon, which is the left most icons, the square with the + on it

In Location: we put the full path to the app we want to run. You can get this from the command line by typing ‘which mpiexec’ and using the result returned in that field

In Working Directory: use the Eclipse Variable workspace_loc with the addition of the path to where the Python files are stored


Finally in Arguments: use the following information. You can edit this to change the number of processes as and when

-n 4 -f machinefile python ${resource_name}


Your email address will not be published. Required fields are marked *