- Click on the project name in Project Explorer.
- Right click and choose "Properties"
- Choose "Run/Debug Settings"
- Edit one of the launch configurations or create a new one.
- Under the tab "Main", change C/C++ Application to be "/usr/local/bin/mpirun"
- Go to the tab "Arguments", change the program arguments to be "-np 4 ${workspace_loc:project_name}/Debug/project_name"
Saturday, October 30, 2010
Run MPI Programs in Eclipse with 1-Click
Open MPI Installation
In Ubuntu, key in the following command:
Then execute the following commands:
- apt-get install openmpi-bin openmpi-doc libopenmpi-dev
- reference: http://www.cs.ucsb.edu/~hnielsen/cs140/openmpi-install.html
Then execute the following commands:
mpicc -o testMPI testMPI.c
mpirun -np 4 testMPI
reference:
http://wiki.eclipse.org/PTP/release_notes/4.0
Subscribe to:
Posts (Atom)