= Installation on Solaris/SPARC = * Hardware: ''!SunFire 2900'' nodes with [[http://www.sun.com/processors/UltraSPARC-IVplus/|UltraSPARC IV+]] processors * Operating system: [[http://www.sun.com/software/solaris/|Sun Solaris]] 10 (5.10) * Compiler: [[http://developers.sun.com/sunstudio/|Sun Studio]] 12 (update 1) * Other software: * BLAS/LAPACK: [[http://developers.sun.com/sunstudio/overview/topics/computing.jsp|Sun Performance Library]] (Sun Studio) * MPI: ''Sun MPI'' 7.0 ([[http://www.sun.com/software/products/clustertools/|Sun HPC Cluster Tools]] 6) == Problems and patches == * ''SUNDIAL''`s configure script fails on a compiler optimization option. [[attachment:sundials_ss12hpc.diff]] * The ''PETSc'' configure scripts use a deprecated compiler option for 64bit targets. [[attachment:petsc_ss12hpc.diff]] * ''TAO'' makes use of `isinf` (defined by the C99 standard) which is not supported by the Sun Studio 12 C++ compiler. [[attachment:tao_ss12hpc.diff]] * ''magpar'' makes use of variable length arrays (defined by the C99 standard) which are not supported by the Sun Studio 12 C++ compiler. [[attachment:src_ss12hpc.diff]] == Step-by-step procedure == === Prepare directory and download magpar === {{{#!shell cd $HOME # $HOME mkdir magpar-0.8 cd magpar-0.8 # $HOME/magpar-0.8 wget http://www.magpar.net/static/magpar/download/magpar-0_8.tar.gz tar xzf magpar-0_8.tar.gz cd magpar-0_8 # $HOME/magpar-0.8/magpar-0_8 MAGPAR_HOME=$PWD; export MAGPAR_HOME # $HOME/magpar-0.8/magpar-0_8 PD=$MAGPAR_HOME/libs; export PD # $HOME/magpar-0.8/magpar-0_8/libs }}} === ParMetis === {{{#!shell cd $PD # $HOME/magpar-0.8/magpar-0_8/libs lib=ParMetis-3.1.1 wget -N http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/$lib.tar.gz tar xzf $lib.tar.gz cd $lib # $HOME/magpar-0.8/magpar-0_8/libs/ParMetis-3.1.1 }}} Note:: `ld` needs the deprecated `-xarch=v9b` switch to use the correct library paths for 64bit! {{{#!shell #make "CC=mpcc -g -m64 -xarch=sparcvis2" "LD=mpcc -xarch=v9b" "XTRALIBS=-lmpi" "OPTFLAGS=-fast -xtarget=ultra4plus" # with symbol table make "CC=mpcc -m64 -xarch=sparcvis2" "LD=mpcc -xarch=v9b" "XTRALIBS=-lmpi" "OPTFLAGS=-fast -xtarget=ultra4plus" }}} === SUNDIALS === {{{#!shell cd $PD # $HOME/magpar-0.8/magpar-0_8/libs lib=sundials-2.3.0 # get sundials-2.3.0.tar.gz tar xzf $lib.tar.gz cd $lib # $HOME/magpar-0.8/magpar-0_8/libs/sundials-2.3.0 }}} Note:: :: Sun Studio's `-fast` expands to: :: `-fns -fsimple=2 -xarch -xbuiltin=%all -xcache -xchip -xdepend -xlibmil -xlibmopt -xmemalign -xO5 -xtarget=native` :: `-xlibmil` has problems with `return fabs ();`. Changing this to `return fabs (1);` works, but may not be what was intended by the `configure` script. {{{#!shell patch -p1 < ../../../sundials_ss12hpc.diff #./configure --prefix=$PD/sundials --with-cflags="-g -fast -xtarget=ultra4plus -m64 -xarch=sparcvis2" --with-ldflags="-xarch=v9b" --with-mpicc=mpcc --with-mpif77=mpf77 --with-mpi-libs="-lmpi" # with symbol table ./configure --prefix=$PD/sundials --with-cflags="-fast -xtarget=ultra4plus -m64 -xarch=sparcvis2" --with-ldflags="-xarch=v9b" --with-mpicc=mpcc --with-mpif77=mpf77 --with-mpi-libs="-lmpi" make && make -i install }}} === PETSc === {{{#!shell cd $PD # $HOME/magpar-0.8/magpar-0_8/libs lib=petsc-2.3.3-p15 wget ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/$lib.tar.gz tar xzf $lib.tar.gz cd $lib # $HOME/magpar-0.8/magpar-0_8/libs/petsc-2.3.3-p15 PETSC_DIR=$PD/$lib; export PETSC_DIR # $HOME/magpar-0.8/magpar-0_8/libs/petsc-2.3.3-p15 }}} Note:: The configure scripts use the deprecated `-xarch=v9` switch for 64bit targets. Fixed to use `-m64` instead. {{{#!shell patch -p1 < ../../../petsc_ss12hpc.diff }}} Give all options as parameters to the configure script instead of writing a configuration file. Note:: With `--with-debugging=0` ''magpar'' crashes. {{{#!shell unset PETSC_ARCH #./config/configure.py --with-gnu-compilers=0 --with-64-bit-pointers=1 --with-precision=double --with-blas-lapack-lib=libsunperf.a --with-mpi-root="/opt/SUNWhpc" --with-x=0 --with-clanguage=C++ --with-debugging=1 --CC=mpcc --CXX=mpCC --FC=mpf77 --CFLAGS="-g -m64 -xarch=sparcvis2" --CXXFLAGS="-g -m64 -xarch=sparcvis2" --FFLAGS="-g -m64 -xarch=sparcvis2" --LDFLAGS="-xarch=v9b" --COPTFLAGS="-fast -xtarget=ultra4plus -xlic_lib=sunperf" --CXXOPTFLAGS="-fast -xtarget=ultra4plus -xlic_lib=sunperf" --FOPTFLAGS="-fast -xtarget=ultra4plus -xlic_lib=sunperf" --with-shared=0 --with-dynamic=0 # debug version with symbol table ./config/configure.py --with-gnu-compilers=0 --with-64-bit-pointers=1 --with-precision=double --with-blas-lapack-lib=libsunperf.a --with-mpi-root="/opt/SUNWhpc" --with-x=0 --with-clanguage=C++ --with-debugging=1 --CC=mpcc --CXX=mpCC --FC=mpf77 --CFLAGS="-m64 -xarch=sparcvis2" --CXXFLAGS="-m64 -xarch=sparcvis2" --FFLAGS="-m64 -xarch=sparcvis2" --LDFLAGS="-xarch=v9b" --COPTFLAGS="-fast -xtarget=ultra4plus -xlic_lib=sunperf" --CXXOPTFLAGS="-fast -xtarget=ultra4plus -xlic_lib=sunperf" --FOPTFLAGS="-fast -xtarget=ultra4plus -xlic_lib=sunperf" --with-shared=0 --with-dynamic=0 PETSC_ARCH=solaris2.10-cxx-debug; export PETSC_ARCH # debug version make all }}} === TAO === {{{#!shell cd $PD # $HOME/magpar-0.8/magpar-0_8/libs lib=tao-1.9 wget -N http://www-unix.mcs.anl.gov/tao/download/$lib.tar.gz tar xzf $lib.tar.gz cd $lib # $HOME/magpar-0.8/magpar-0_8/libs/tao-1.9 TAO_DIR=$PD/$lib; export TAO_DIR # $HOME/magpar-0.8/magpar-0_8/libs/tao-1.9 }}} Note:: Sun Studio's C++ compiler does not provide `isinf`. {{{#!shell patch -p1 < ../../../tao_ss12hpc.diff make # Options are taken from PETSc. }}} === magpar === {{{#!shell cd $MAGPAR_HOME/src # $HOME/magpar-0.8/magpar-0_8/src cp Makefile.in.defaults Makefile.in.ss12hpc }}} Note:: Sun Studio's C++ compiler does not support variable length arrays. For workaround see [[http://forums.sun.com/thread.jspa?threadID=5348093]]. Note:: `PETSC_ARCH` has to be adjusted in `Makefile`. {{{#!shell patch -p1 < ../../src_ss12hpc.diff cp -p Makefile.in.ss12hpc Makefile.in.$HOSTNAME make varinfo | less # Check compilation options. }}} Note:: Some options are taken from ''PETSc''. {{{#!shell #CC=mpcc CXX=mpCC F77=mpf77 FC=mpf77 F90=mpf90 CFLAGS="-g -m64 -xarch=sparcvis2 -DPNG -DZLIB" OPTFLAGS="-fast -xtarget=ultra4plus -xlic_lib=sunperf" EXTERNAL_LIB="-lpng -lz" make # with symbol table CC=mpcc CXX=mpCC F77=mpf77 FC=mpf77 F90=mpf90 CFLAGS="-m64 -xarch=sparcvis2 -DPNG -DZLIB" OPTFLAGS="-fast -xtarget=ultra4plus -xlic_lib=sunperf" EXTERNAL_LIB="-lpng -lz" make }}} Run magpar by calling `mprun -np magpar.exe`. == Download patches == <> <>