From ef4e9ee2f4da4d5fdac4c5af0c31c489269ae34b Mon Sep 17 00:00:00 2001 From: Brian Swenson Date: Wed, 11 Jul 2012 11:01:23 -0400 Subject: [PATCH] Added example showing how to setup environmental variables for MPI --- src/mpi/doc/distributed.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/mpi/doc/distributed.rst b/src/mpi/doc/distributed.rst index bda795c16..7341b5dd1 100644 --- a/src/mpi/doc/distributed.rst +++ b/src/mpi/doc/distributed.rst @@ -111,6 +111,21 @@ these executables can be used. Finally, if openmpi complains about the inability to open shared libraries, such as libmpi_cxx.so.0, it may be necessary to add the openmpi lib directory to LD_LIBRARY_PATH. +Here is an example of setting up PATH and LD_LIBRARY_PATH using a bash shell::: + + For a 32-bit Linux distribution: + + export PATH=$PATH:/usr/lib/openmpi/bin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/openmpi/lib + + For a 64-bit Linux distribution: + + export PATH=$PATH:/usr/lib64/openmpi/bin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/openmpi/lib + +These lines can be added into ~/.bash_profile or ~/.bashrc to avoid having to +retype them when a new shell is opened. + Building and Running Examples +++++++++++++++++++++++++++++