Jonathan Olmsted

Installing Rmpi

| Comments

After having to search for the same website several times this past year, re-setting Rmpi up on my work machine (Mac Pro) was the final straw. Thanks to this and likely others over the last two years, I use the following for Rmpi with my macports install of OpenMPI:

Rmpi Installation Code
1
2
3
4
5
6
install.packages("Rmpi", configure.args="
--with-Rmpi-include=/opt/local/include/openmpi/
--with-Rmpi-libpath=/opt/local/lib/openmpi/
--with-Rmpi-type=OPENMPI
"
)

@ Princeton

If you happen to be setting up Rmpi on one of the TIGRESS systems at Princeton, I suggest a slightly different solution. It has the same effect, but is a bit more self-documenting which allows for users to more obviously edit the setup as their environment changes.

Assuming you use Bash as a shell (and if you don’t know what that means, on the TIGRESS systems, it means you use Bash), add the following to .bashrc.

.bashrc Addition
1
2
3
4
5
6
7
8
## MPI START ##
MPI_ROOT=/usr/local/openmpi/1.4.5/gcc/x86_64/
export MPI_ROOT
LD_LIBRARY_PATH=/usr/local/openmpi/1.4.5/gcc/x86_64/lib64
export LD_LIBRARY_PATH
PATH=/usr/local/openmpi/1.4.5/gcc/x86_64/bin:$PATH
export PATH
## MPI END ##

This sets the values of several environmental variables. This is not a flexible approach. It is requiring you to use OpenMPI version 1.4.5 (compiled withg GCC). Should you want something else, you need to edit these values accordingly.

Comments