Skip to content

Mountain Lion using Intel

Glen Hansen edited this page Nov 8, 2014 · 10 revisions

Building ZLib

  • Version 1.2.8

      CC=icc CXX=icpc CFLAGS=-O3 CXXFLAGS=-O3 ./configure --archs="-arch x86_64" --prefix=/usr/local/intel
      make -j 4
      make install
    

Building HDF5

  • Version 1.8.11

      ./configure CC=mpicc FC=mpif90 CXX=mpicxx CXXFLAGS="-fPIC -O3" CFLAGS="-fPIC -O3" FCFLAGS="-fPIC -O3" --enable-parallel --with-zlib=/usr/local/intel --prefix=/usr/local/intel/parallel
      make -j 4
      make install
    

Building Netcdf

  • Version 4.3.0

      ./configure --prefix=/usr/local/intel/parallel CC=mpicc FC=mpif90 CXX=mpicxx CFLAGS="-I/usr/local/intel/parallel/include -O3" LDFLAGS=-L/usr/local/intel/parallel/lib --disable-fsync --disable-cdmremote --disable-dap --disable-shared --disable-doxygen
      make -j 4 
      make install
    

Building boost

  • Version 1.55.0

  • Build boost with the commands

      echo "using mpi : /opt/intel/bin/mpicxx ;" >> ./tools/build/v2/user-config.jam
      echo "using intel-darwin : /opt/intel/bin/icpc ;" >> ./tools/build/v2/user-config.jam
      ./bootstrap.sh --with-toolset=intel-darwin --with-libraries=signals,regex,filesystem,system,mpi,serialization,thread,program_options,exception --prefix=/usr/local/intel
      ./b2 -j 4
      ./b2 -j 4 install
    
  • The above bjam command gave me an error, so I removed the following lines from project-config.jam:

      if ! intel-darwin in [ feature.values <toolset> ]
      {
      	using intel-darwin ;
      }
    

Building ParMetis

  • Version 4.0.3

  • Edit metis.h to use an IDXTYPEWIDTH of 64

      cd parmetis-4.0.3/metis/include
      vi metis.h
      #define IDXTYPEWIDTH 64
    
  • Run CMake to build metis

      cd /usr/local/src/parmetis-4.0.3/metis
      mkdir build
      cd build
      export metis=/usr/local/src/parmetis-4.0.3/metis
      cmake \
      -DCMAKE_INSTALL_PREFIX=/usr/local/intel/parmetis-4.0.3 \
      -DMETIS_PATH=$metis \
      -DGKLIB_PATH=$metis/GKlib \
      -DCMAKE_C_COMPILER=mpicc \
      -DCMAKE_CXX_COMPILER=mpicxx \
      ..
      make -j 4
      make install
    
  • Run CMake to build parmetis

      cd /usr/local/src/parmetis-4.0.3 
      mkdir builddir
      cd builddir
      export metis=/usr/local/src/parmetis-4.0.3/metis/  
      cmake \
      -DCMAKE_INSTALL_PREFIX=/usr/local/intel/parmetis-4.0.3 \
      -DMETIS_PATH=$metis \
      -DGKLIB_PATH=$metis/GKlib \
      -DCMAKE_C_COMPILER=mpicc \
      -DCMAKE_CXX_COMPILER=mpicxx \
      ..
      make -j 4
      make install
    

SuperLU

  • Version 4.3

  • Build paths

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

      PLAT = _lion
      SuperLUroot = /usr/local/intel/SuperLU_4.3
      SUPERLULIB      = $(SuperLUroot)/lib/libsuperlu_4.3.a
      TMGLIB          = libtmglib.a
      BLASDEF     = -DUSE_VENDOR_BLAS
      BLASLIB     = -L/opt/intel/mkl/lib -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
      LIBS        = $(SUPERLULIB) $(BLASLIB)
      ARCH         = ar
      ARCHFLAGS    = cr
      RANLIB       = ranlib
      CC           = icc
      CFLAGS       = -ftz -O3
      NOOPTS       =
      FORTRAN      = ifort
      FFLAGS       = -ftz -O3
      LOADER       = $(CC)
      LOADOPTS     =
      CDEFS        = -DAdd_
      MATLAB       = /usr/sww/matlab
    
  • Build SuperLU

      make -j 4
      cd SRC
      cp *.h /usr/local/intel/SuperLU_4.3/include		
    

Build HWLOC

  • HWLOC is an optional package that can be used for thread pinning by Kokkos. If you are not building Kokkos, or if you don't care about thread pinning, please skip.

  • Version 1.8

      ./configure CC=mpicc CXX=mpicxx --prefix=/usr/local/intel
      make -j 4
      make install
    

Build Trilinos

  • There appears to be an issue with std::complex not being found in the resolution of #include. I added the path to a known definition:

      export CPLUS_INCLUDE_PATH=/usr/include/c++/4.2.1
    
  • do-configure script

      #!/bin/sh
      #
      export TRILINOS_HOME=/Users/gahanse/Codes/Trilinos
      BUILD_DIR=`pwd`
      INSTALL_DIR=/usr/local/trilinos/MPI_INTEL
      BOOST_DIR=/usr/local/intel
      HWLOC_PATH=/usr/local/intel
      MPI_BASE_DIR=/opt/intel
      NETCDF=/usr/local/intel/parallel
      HDFDIR=/usr/local/intel/parallel
      ZDIR=/usr/local/intel
      PARMETISDIR=/usr/local/intel/parmetis-4.0.3
      SUPERLUDIR=/usr/local/intel/SuperLU_4.3
      MKL_PATH=/opt/intel
      LABLAS_LIBRARY_DIRS="$MKL_PATH/mkl/lib"
      LABLAS_LIBRARY_NAMES="mkl_intel_lp64;mkl_sequential;mkl_core;pthread"
      
      export BOOST_ROOT=$BOOST_DIR
      EXTRA_ARGS=$@
      cmake \
          -D Trilinos_CONFIGURE_OPTIONS_FILE:FILEPATH=$TRILINOS_HOME/sampleScripts/AlbanySettings.cmake \
          -D Trilinos_EXTRA_REPOSITORIES:STRING=SCOREC \
          -D Trilinos_ENABLE_SCOREC:BOOL=ON \
          -D SCOREC_DISABLE_STRONG_WARNINGS:BOOL=ON \
          -D CMAKE_BUILD_TYPE:STRING=RELEASE \
          -D CMAKE_C_FLAGS:STRING="-wd161 -wd47" \
          -D CMAKE_CXX_FLAGS:STRING="-wd161 -wd47" \
          -D CMAKE_AR:STRING="xiar" \
          -D CMAKE_LINKER:STRING="xild" \
      \
          -D TPL_ENABLE_MPI:BOOL=ON \
          -D MPI_BASE_DIR:PATH=$MPI_BASE_DIR \
      \
          -D TPL_ENABLE_Pthread:BOOL=ON \
      \
          -D Boost_INCLUDE_DIRS:PATH=$BOOST_DIR/include \
          -D BoostLib_INCLUDE_DIRS:PATH=$BOOST_DIR/include \
          -D BoostAlbLib_INCLUDE_DIRS:PATH=$BOOST_DIR/include \
          -D Boost_LIBRARY_DIRS:PATH=$BOOST_DIR/lib \
          -D BoostLib_LIBRARY_DIRS:PATH=$BOOST_DIR/lib \
          -D BoostAlbLib_LIBRARY_DIRS:PATH=$BOOST_DIR/lib \
      \
          -D TPL_ENABLE_Netcdf:STRING=ON \
          -D Netcdf_INCLUDE_DIRS:PATH="${NETCDF}/include" \
          -D Netcdf_LIBRARY_DIRS:PATH="${NETCDF}/lib" \
      \
          -D TPL_ENABLE_HDF5:STRING=ON \
          -D HDF5_INCLUDE_DIRS:PATH="${HDFDIR}/include" \
          -D TPL_HDF5_LIBRARIES:PATH="${HDFDIR}/lib/libhdf5_hl.a;${HDFDIR}/lib/libhdf5.a;${ZDIR}/lib/libz.a" \
      \
          -D TPL_ENABLE_Zlib:STRING=ON \
          -D Zlib_INCLUDE_DIRS:PATH="${ZDIR}/include" \
          -D TPL_Zlib_LIBRARIES:PATH="${ZDIR}/lib/libz.a" \
      \
          -D TPL_ENABLE_ParMETIS:STRING=ON \
          -D ParMETIS_INCLUDE_DIRS:PATH="${PARMETISDIR}/include" \
          -D ParMETIS_LIBRARY_DIRS:PATH="${PARMETISDIR}/lib" \
      \
          -D TPL_ENABLE_SuperLU:STRING=ON \
          -D SuperLU_INCLUDE_DIRS:STRING="${SUPERLUDIR}/include" \
          -D SuperLU_LIBRARY_DIRS:STRING="${SUPERLUDIR}/lib" \
      \
          -D TPL_ENABLE_BLAS:STRING=ON \
          -D TPL_ENABLE_LAPACK:STRING=ON \
          -D BLAS_LIBRARY_DIRS:STRING=$LABLAS_LIBRARY_DIRS \
          -D BLAS_LIBRARY_NAMES:STRING=$LABLAS_LIBRARY_NAMES \
          -D LAPACK_LIBRARY_DIRS:STRING=$LABLAS_LIBRARY_DIRS \
          -D LAPACK_LIBRARY_NAMES:STRING=$LABLAS_LIBRARY_NAMES \
      \
          -D CMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR} \
      \
      $EXTRA_ARGS \
      ${TRILINOS_HOME}
    
  • In the above, two warnings are disabled, "-wd161 -wd47". These ignore clang pragma warnings.

  • The paths to the mkl and MPI libraries are added to the path:

      export DYLD_LIBRARY_PATH=/opt/intel/mkl/lib:/opt/intel/lib
    

Build Albany

  • CMake configure script:

      #!/bin/sh
      
      export ALB_ENABLE_SCOREC=ON
      export ALB_ENABLE_LCM=ON
      export ALB_ENABLE_LAME=ON
      export ALB_ENABLE_HYDRIDE=ON
      export ALB_ENABLE_QCAD=ON
      export ALB_ENABLE_MOR=ON
      export ALB_ENABLE_ASCR=ON
      export ALB_ENABLE_AERAS=ON
      export ALB_ENABLE_FELIX=ON
      export ALB_ENABLE_AlbanyCI=OFF
      export ALB_DEBUG=OFF
      export ALB_ENABLE_CHECK_FPE=OFF
      export ALB_ENABLE_SPECULATIVE=OFF
      export ALB_ENABLE_SG_MP=ON
      export ALB_ENABLE_PERF_TESTS=ON
      export TRILINOS_INSTALL_DIR=/usr/local/trilinos/MPI_INTEL
      
      export ALB_VERBOSE=OFF
      
      cmake \
            -D ALBANY_TRILINOS_DIR:FILEPATH="$TRILINOS_INSTALL_DIR" \
            -D ENABLE_LCM:BOOL=${ALB_ENABLE_LCM} \
            -D ENABLE_AERAS:BOOL=${ALB_ENABLE_AERAS} \
            -D ENABLE_QCAD:BOOL=${ALB_ENABLE_QCAD} \
            -D ENABLE_HYDRIDE:BOOL=${ALB_ENABLE_HYDRIDE} \
            -D ENABLE_LCM_SPECULATIVE:BOOL=${ALB_ENABLE_SPECULATIVE} \
            -D ENABLE_LAME:BOOL=${ALB_ENABLE_LAME} \
            -D CMAKE_VERBOSE_MAKEFILE:BOOL=${ALB_VERBOSE} \
            -D ENABLE_DEBUGGING:BOOL=${ALB_DEBUG} \
            -D ENABLE_CHECK_FPE:BOOL=${ALB_ENABLE_CHECK_FPE} \
            -D ENABLE_SCOREC:BOOL=${ALB_ENABLE_SCOREC} \
            -D ENABLE_FELIX:BOOL=${ALB_ENABLE_FELIX} \
            -D ENABLE_MOR:BOOL=${ALB_ENABLE_MOR} \
            -D ENABLE_ALBANY_CI:BOOL=${ALB_ENABLE_AlbanyCI} \
            -D ENABLE_ASCR:BOOL=${ALB_ENABLE_ASCR} \
            -D ENABLE_SG_MP:BOOL=${ALB_ENABLE_SG_MP} \
            -D ENABLE_PERFORMANCE_TESTS:BOOL=${ALB_ENABLE_PERF_TESTS} \
            -D ALBANY_CTEST_TIMEOUT:INTEGER=70 \
      \
      ..
    
Clone this wiki locally