A modified cb_console_runner
to allow users to run MPI programs using
multiple processes from Code::Blocks. Currently, the modifications has only
been made for the following platform(s):
- Linux
- Linux (Test on Ubuntu 14.04)
- Code::Blocks IDE (Tested on Code::Blocks 16.01)
Append -mpi <path/to/mpiexec> -n <number of processes>
to your program
arguments under Project > Set program's arguments... Both mpiexec
and
mpirun
are supported. Both -n
and -np
can be used as well.
-mpi /usr/bin/mpiexec -n 4
- Open the project file
MPI-CodeBlocks-ConsoleRunner.cbp
in Code::Blocks. - Select the
Release
build target and clickBuild
. - Check that
cb_console_runner
has been created in thebin/<build_target>/
subdirectory. - Backup your existing
cb_console_runner
(Optional but recommended)
mv path/to/existing/cb_console_runner path/to/existing/cb_console_runner.old
- Make
cb_console_runner
and executable (If using the prebuilt version)
chmod +x path/to/modified/cb_console_runner
- Copy the modified
cb_console_runner
to the original path of the existingcb_console_runner
.
cp path/to/MPI-CodeBlocks-ConsoleRunner/bin/<build_target>/cb_console_runner \
path/to/existing/cb_console_runner
- Initial release