Skip to content

ALCF Vesta

Glen Hansen edited this page Jul 18, 2014 · 24 revisions

Set up your build environment

Please place the following lines in your ~/.soft file:

	@default
	+hpctoolkit
	+cmake
	+mipwrapper-gcc

Install the required Third Party Libraries (TPLs) for Trilinos

Building ZLib

  • Version 1.2.8

      CC=gcc CXX=g++ CFLAGS=-O3 CXXFLAGS=-O3 ./configure --prefix=${HOME}/barn-shared/gcc
      make
      make install
    

Building Lapack

  • Version 3.4.2

      cd lapack-3.4.2
      mkdir build
      ./do-lapack
      make
      make install
    
  • do-lapack is the following shell script

      #!/bin/sh
      INSTALL_DIR=${HOME}/barn-shared/gcc
      cmake28 \
      -D CMAKE_BUILD_TYPE:STRING=RELEASE \
      -D CMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR} \
      -D CMAKE_Fortran_COMPILER:FILEPATH=/bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-gfortran \
      -D CMAKE_Fortran_FLAGS:STRING="-fno-underscoring" \
      ../
    

Building HDF5

  • Version 1.8.9

      ./configure CC=mpicc FC=mpif90 CXX=mpicxx CXXFLAGS="-fPIC -O3" CFLAGS="-fPIC -O3" FCFLAGS="-fPIC -O3" --enable-parallel --with-zlib=${HOME}/barn-shared/gcc --prefix=${HOME}/barn-shared/gcc/parallel
      make -j 4
      make install
    

Building Netcdf

  • Version 4.2.1.1

      ./configure --prefix=${HOME}/barn-share/gcc/parallel CC=mpicc FC=mpif90 CXX=mpicxx CFLAGS="-I${HOME}/barn-shared/gcc/include -I${HOME}/barn-shared/gcc/parallel/include -O3" LDFLAGS="-L${HOME}/barn-shared/gcc/lib -L${HOME}/barn-shared/gcc/parallel/lib" --disable-fsync --disable-cdmremote --disable-dap --disable-shared --disable-doxygen
      make -j 4 
      make install
    

Building boost

  • Version 1.53.0

  • Build boost with the commands

      echo "using gcc : 4.4.6 : /bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-g++ ;" >> ./tools/build/v2/user-config.jam
      echo "using mpi : /bgsys/drivers/ppcfloor/comm/gcc/bin/mpicxx ;" >> ./tools/build/v2/user-config.jam
      ./bootstrap.sh --with-libraries=signals,regex,filesystem,system,mpi,serialization,thread,program_options,exception --prefix=${HOME}/barn-shared/gcc
      ./b2 -j 4
      ./b2 -j 4 install
    

Building ParMetis

  • Version 4.0.3

  • Load the parmetis module

      module load parmetis/gnu/4.0.2
    

SuperLU

  • Version 4.3

  • Build paths

      mkdir /usr/local/xcode/SuperLU_4.3
      mkdir /usr/local/xcode/SuperLU_4.3/include
      mkdir /usr/local/xcode/SuperLU_4.3/lib
    
  • Edit make.inc for your machine and environment

      PLAT = _linux
      SuperLUroot = ${HOME}/barn-shared/gcc/SuperLU_4.3
      SUPERLULIB      = $(SuperLUroot)/lib/libsuperlu_4.3.a
      TMGLIB          = libtmglib.a
      BLASDEF     = -DUSE_VENDOR_BLAS
      BLASLIB     = -L${HOME}/barn-shared/gcc/lib -lblas
      LIBS        = $(SUPERLULIB) $(BLASLIB)
      ARCH         = ar
      ARCHFLAGS    = cr
      RANLIB       = ranlib
      CC           = mpicc
      CFLAGS       = -DPRNTlevel=0 -O3
      NOOPTS       =
      FORTRAN      = mpif90
      FFLAGS       = -O3
      LOADER       = $(CC)
      LOADOPTS     =
      CDEFS        = -DNoChange
      MATLAB       =
    
  • Build SuperLU

      make -j 4
      cd SRC
      cp *.h ${HOME}/barn-shared/gcc/include
    

Build Trilinos

Configure the Trilinos build

	mkdir build
	cd build
	./do-configure

Example do-configure script executed above

	#!/bin/sh
	#
	export TRILINOS_HOME=/home/ghansen/FASTMath/src/publicTrilinos
	BUILD_DIR=`pwd`
	INSTALL_DIR=/home/ghansen/FASTMath/Trilinos/MPI_REL
	BOOST_DIR=/home/ghansen/FASTMath
	MPI_BASE_DIR=/bgsys/drivers/ppcfloor/comm/gcc
	NETCDF=/home/ghansen/FASTMath
	HDFDIR=/home/ghansen/FASTMath
	PARMETISDIR=/home/ghansen/FASTMath
	BLAS=/gpfs/vesta-fs0/projects/FASTMath/install/blas/19Apr11/linux-rhel_6-ppc64-gcc-4.4.6
	LAPACK=/gpfs/vesta-fs0/projects/FASTMath/install/lapack/3.4.2/linux-rhel_6-ppc64-gcc-4.4.6
	
	export BOOST_ROOT=$BOOST_DIR
	EXTRA_ARGS=$@
	
	cmake \
	        -D Trilinos_EXTRA_REPOSITORIES:STRING=SCOREC \
	        -D Trilinos_CONFIGURE_OPTIONS_FILE:FILEPATH=$TRILINOS_HOME/sampleScripts/AlbanySettings.cmake \
	        -D CMAKE_BUILD_TYPE:STRING=NONE \
	        -D TPL_FIND_SHARED_LIBS:BOOL=OFF \
	\
	        -D CMAKE_CXX_COMPILER:FILEPATH=/bgsys/drivers/ppcfloor/comm/gcc/bin/mpicxx \
	        -D CMAKE_C_COMPILER:FILEPATH=/bgsys/drivers/ppcfloor/comm/gcc/bin/mpicc \
	        -D CMAKE_Fortran_COMPILER:FILEPATH=/bgsys/drivers/ppcfloor/comm/gcc/bin/mpif77 \
	        -D CMAKE_C_FLAGS:STRING="-O3 -ffast-math -funroll-loops -DCODE_MP -DDISABLE_MPIIO -DNO_FILE_LOCK -DTEMPLATE_FRIENDS_NOT_SUPPORTED -DMPICH_SKIP_MPICXX -DNDEBUG -DHAVE_CONFIG_H" \
	        -D CMAKE_CXX_FLAGS:STRING="-O3 -ffast-math -funroll-loops -DCODE_MP -DDISABLE_MPIIO -DNO_FILE_LOCK -DTEMPLATE_FRIENDS_NOT_SUPPORTED -DMPICH_SKIP_MPICXX -DNDEBUG -DHAVE_CONFIG_H" \
	        -D CMAKE_Fortran_FLAGS:STRING="-O3 -ffast-math -funroll-loops" \
	\
	        -D TPL_ENABLE_MPI:BOOL=ON \
	        -D MPI_BASE_DIR:PATH=$MPI_BASE_DIR \
	\
	        -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
	        -D Trilinos_VERBOSE_CONFIGURE:BOOL=OFF \
	\
	        -D Boost_INCLUDE_DIRS:PATH=$BOOST_DIR/include \
	        -D Boost_LIBRARY_DIRS:PATH=$BOOST_DIR/lib \
	        -D BoostAlbLib_INCLUDE_DIRS:PATH=$BOOST_DIR/include \
	        -D BoostAlbLib_LIBRARY_DIRS:PATH=$BOOST_DIR/lib \
	\
	        -D Netcdf_INCLUDE_DIRS:PATH="${NETCDF}/include" \
	        -D Netcdf_LIBRARY_DIRS:PATH="${NETCDF}/lib" \
	        -D TPL_Netcdf_LIBRARIES:STRING="/home/ghansen/FASTMath/lib/libnetcdf.a;/home/ghansen/FASTMath/lib/libhdf5_hl.a;/home/ghansen/FASTMath/lib/libhdf5.a;/home/ghansen/FASTMath/lib/libz.a" \
	        -D HDF5_INCLUDE_DIRS:PATH="${HDFDIR}/include" \
	        -D HDF5_LIBRARY_DIRS:PATH="${HDFDIR}/lib" \
	\
	        -D ParMETIS_INCLUDE_DIRS:PATH="${PARMETISDIR}/include" \
	        -D ParMETIS_LIBRARY_DIRS:PATH="${PARMETISDIR}/lib" \
	\
	\
	        -D TPL_ENABLE_BLAS:STRING=ON \
	        -D TPL_BLAS_LIBRARIES:FILEPATH="$BLAS/lib/blas.a" \
	        -D TPL_ENABLE_LAPACK:STRING=ON \
	        -D LAPACK_LIBRARY_DIRS:FILEPATH="$LAPACK/lib" \
	\
	        -D Trilinos_ENABLE_SCOREC:BOOL=ON \
	        -D Trilinos_ENABLE_SCORECmeshadapt:BOOL=ON \
	\
	        -D CMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR} \
	\
	$EXTRA_ARGS \
	${TRILINOS_HOME}




    #!/bin/sh
    export PREFIX_DIR=/gpfs/u/home/PGES/PGESgnzw/barn-shared
    export TRILINOS_HOME=/gpfs/u/home/PGES/PGESgnzw/scratch/trilinos/src
    cmake28 \
    -D CMAKE_BUILD_TYPE:STRING=NONE \
    -D CMAKE_CXX_FLAGS:STRING="-O3 -w" \
    -D CMAKE_C_FLAGS:STRING="-O3 -w" \
    -D CMAKE_Fortran_FLAGS:STRING="-O3 -w" \
    -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
    -D CMAKE_INSTALL_PREFIX:PATH="${HOME}/barn-shared/Trilinos" \
    \
    -D Trilinos_CONFIGURE_OPTIONS_FILE:FILEPATH="${TRILINOS_HOME}/sampleScripts/AlbanySettings.cmake" \
    -D Trilinos_VERBOSE_CONFIGURE:BOOL=OFF \
    -D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON \
    -D Trilinos_ASSERT_MISSING_PACKAGES:BOOL=OFF \
    \
    -D TPL_ENABLE_MPI:BOOL=ON \
    -D MPI_BASE_DIR:PATH="/bgsys/drivers/ppcfloor/comm/gcc" \
    \
    -D CMAKE_CXX_COMPILER:FILEPATH="/bgsys/drivers/ppcfloor/comm/gcc/bin/mpicxx" \
    -D CMAKE_C_COMPILER:FILEPATH="/bgsys/drivers/ppcfloor/comm/gcc/bin/mpicc" \
    -D CMAKE_Fortran_COMPILER:FILEPATH="/bgsys/drivers/ppcfloor/comm/gcc/bin/mpif77" \
    \
    -D TPL_ENABLE_Matio:BOOL=OFF \
    -D SEACAS_ENABLE_SEACASSVDI:BOOL=OFF \
    -D Trilinos_ENABLE_SEACASFastq:BOOL=OFF \
    -D Trilinos_ENABLE_SEACASBlot:BOOL=OFF \
    -D Trilinos_ENABLE_SEACASPLT:BOOL=OFF \
    -D TPL_ENABLE_X11:BOOL=OFF \
    -D TPL_ENABLE_Matio:BOOL=OFF \
    -D TPL_FIND_SHARED_LIBS:BOOL=OFF \
    \
    -D Boost_INCLUDE_DIRS:PATH="${PREFIX_DIR}/include" \
    -D BoostAlbLib_INCLUDE_DIRS:PATH="${PREFIX_DIR}/include" \
    -D Boost_LIBRARY_DIRS:PATH="${PREFIX_DIR}/lib" \
    -D BoostAlbLib_LIBRARY_DIRS:PATH="${PREFIX_DIR}/lib" \
    \
    -D TPL_ENABLE_Netcdf:STRING=ON \
    -D Netcdf_INCLUDE_DIRS:PATH="${PREFIX_DIR}/parallel/include" \
    -D Netcdf_LIBRARY_DIRS:PATH="${PREFIX_DIR}/parallel/lib" \
    -D TPL_Netcdf_LIBRARIES:STRING="${HOME}/barn-shared/parallel/lib/libnetcdf.a;${HOME}/barn-shared/parallel/lib/libhdf5_hl.a;${HOME}/barn-shared/parallel/lib/libhdf5.a" \
    \
    -D TPL_ENABLE_HDF5:STRING=ON \
    -D HDF5_INCLUDE_DIRS:PATH="${PREFIX_DIR}/parallel/include" \
    -D HDF5_LIBRARY_DIRS:PATH="${PREFIX_DIR}/parallel/lib" \
    \
    -D TPL_ENABLE_Zlib:STRING=ON \
    -D Zlib_INCLUDE_DIRS:PATH="${PREFIX_DIR}/include" \
    -D Zlib_LIBRARY_DIRS:PATH="${PREFIX_DIR}/lib" \
    \
    -D TPL_ENABLE_BLAS:STRING=ON \
    -D BLAS_LIBRARY_DIRS:FILEPATH="${PREFIX_DIR}/lib" \
    -D TPL_ENABLE_LAPACK:STRING=ON \
    -D LAPACK_LIBRARY_DIRS:FILEPATH="${PREFIX_DIR}/lib" \
    \
    -D TPL_ENABLE_ParMETIS:STRING=ON \
    -D ParMETIS_INCLUDE_DIRS:PATH="${PARMETIS_INSTALL_DIR}/include" \
    -D ParMETIS_LIBRARY_DIRS:PATH="${PARMETIS_INSTALL_DIR}/lib" \
    -D Trilinos_EXTRA_REPOSITORIES:STRING=SCOREC \
    \
    -D Zoltan_ENABLE_ULONG_IDS:BOOL=ON \
    \
    -D Trilinos_ENABLE_SCOREC:BOOL=ON \
    -D SCOREC_DISABLE_STRONG_WARNINGS:BOOL=ON \
    \ 
    -D TPL_ENABLE_SuperLU:STRING=ON \
    -D SuperLU_INCLUDE_DIRS:PATH="${PREFIX_DIR}/include" \
    -D SuperLU_LIBRARY_DIRS:PATH="${PREFIX_DIR}/lib" \
    \
    -D Trilinos_ENABLE_ThyraTpetraAdapters:BOOL=ON \
    -D Trilinos_ENABLE_Ifpack2:BOOL=ON \
    -D Trilinos_ENABLE_Amesos2:BOOL=ON \
    -D Trilinos_ENABLE_MueLu:BOOL=ON \
    -D Teuchos_ENABLE_COMPLEX:BOOL=OFF \
    \
    ${TRILINOS_HOME}
  • Build Trilinos

      make -j 4
      make install
    

Build Albany

  • CMake configure script:

      #!/bin/sh
      #
      export ALB_ENABLE_SCOREC=ON
      export ALB_ENABLE_LCM=ON
      export ALB_ENABLE_MOR=OFF
      export ALB_ENABLE_SPECULATIVE=OFF
      export ALB_ENABLE_LAME=OFF
      export ALB_ENABLE_SG_MP=OFF
      export ALB_ENABLE_INSTALL=ON
      export TRILINOS_INSTALL_DIR=${HOME}/barn-shared/Trilinos
      export ALBANY_INSTALL_DIR=${HOME}/barn-shared/Albany
    
      cmake28 \
      -D ALBANY_TRILINOS_DIR:FILEPATH="$TRILINOS_INSTALL_DIR" \
      -D ENABLE_LCM:BOOL=${ALB_ENABLE_LCM} \
      -D ENABLE_LCM_SPECULATIVE:BOOL=${ALB_ENABLE_SPECULATIVE} \
      -D ENABLE_SCOREC:BOOL=${ALB_ENABLE_SCOREC} \
      -D ENABLE_MOR:BOOL=${ALB_ENABLE_MOR} \
      -D ENABLE_SG_MP:BOOL=${ALB_ENABLE_SG_MP} \
      -D ENABLE_INSTALL:BOOL=${ALB_ENABLE_INSTALL} \
      -D CMAKE_INSTALL_PREFIX:FILEPATH=${ALBANY_INSTALL_DIR} \
      -D ALBANY_MPI_OPTIONS:BOOL=ON \
      -D ALBANY_MPI_EXEC:STRING="srun" \
      -D ALBANY_MPI_EXEC_NUMPROCS_FLAG:STRING="-n" \
      -D ALBANY_MPI_EXEC_MAX_NUMPROCS:STRING="4" \
      -D ALBANY_MPI_LEADING_OPTIONS:STRING="--output=test_output.out;--time=10" \
      \
      ../
    
  • Build Albany

      make -j 4
      make install
    
Clone this wiki locally