Friday February 20, 2009
Jim Langston's Weblog
Building OpenMPI 1.2.9 for OpenSolaris with Studio 12
Building OpenMPI 1.29 for OpenSolaris with Studio 12
The last version of OpenMPI 1.2x is released. OpenMPI 1.29 is out and available for download from http://wwww.openmpi.org/
As I have in a previous blog, built 129rc1, this build is similar, but a big fix for OpenSolaris (as I documented in my blog) has made it into the source tree. This is great, you will find the build goes really smoothly.
Getting started
OpenSolaris 2008.11
OpenMPI 1.2.9
Studio 12 compilers
GNU utilities
OpenMPI 1.2.9 can be obtained at: http://www.openmpi.org/
For OpenSolaris, use the package manager and the opensolaris.org repository to download the Studio 12 compilers for C/C++ and GNU utilities, the repository is great and as a developer on OpenSolaris, you should get use to this tool to manage your environment, it is a fantastic addition, I use it heavily.
Building OpenMPI 1.2.9
# gzip -d openmpi-1.2.9.tar.gz
# tar xvf openmpi-1.2.9.tar
This is a basic delivery of source, it utilizes configure for the environment build. Configure will pick up the Studio compilers by setting the enviroment variables: CC, CFLAGS, CXX, CXXFLAGS, F77, FFLAGS
# export CC=/export/home/langston/COMPILER/SUNWspro/bin/cc
# export CXX=/export/home/langston/COMPILER/SUNWspro/bin/CC
# export F77=/export/home/langston/COMPILER/SUNWspro/bin/f77
With /export/home/langston/COMPILER/SUNWspro where I have Sun Studio 12 installed.
# configure –prefix=/usr/local/openmpi1.29
You can aim the prefix anywhere you like, but I'm finding that it is best to put OpenMPI is a location rather than let it default to /usr/local – I have too many version running around and I need them isolated from each other.
# gmake
Installing OpenMPI and running an example
# gmake install
Make sure you have that path in your PATH, in my case, /usr/local/openmpi1.29/bin , this will find things such as mpicc
Make sure you have LD_LIBRARY_PATH set with /usr/local/openmpi1.29/lib include
# export PATH=$PATH:/usr/local/openmpi1.29/bin
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openmpi1.29/lib
# cd examples
langston@alpha:~/OPENMPI/openmpi-1.2.9/examples$ gmake hello_c
mpicc -g hello_c.c -o hello_c
langston@alpha:~/OPENMPI/openmpi-1.2.9/examples$ ldd hello_c
libmpi.so.0 => /usr/local/openmpi1.29/lib/libmpi.so.0
libopen-rte.so.0 => /usr/local/openmpi1.29/lib/libopen-rte.so.0
libopen-pal.so.0 => /usr/local/openmpi1.29/lib/libopen-pal.so.0
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1 => /lib/libnsl.so.1
libm.so.2 => /lib/libm.so.2
libthread.so.1 => /lib/libthread.so.1
libc.so.1 => /lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
langston@alpha:~/OPENMPI/openmpi-1.2.9/examples$ orterun --mca btl tcp,self -np 2 hello_c
Hello, world, I am 0 of 2
Hello, world, I am 1 of 2
Caveats
For Sun, a great alternative is to use ClusterTools 8, it is based on OpenMPI 1.3
Posted at 02:09PM Feb 20, 2009 by langston in HPC - High Performance Computing | Comments[0]